Skip to content
Andrew Hobden edited this page May 23, 2017 · 2 revisions

Regions in wheelmap are geo-spatial entities that cover an area on this earth. Those regions are aligned in an hierarchical order. The levels are like this:

  • World
    • Continent
      • Country
        • County
          • Subcounty/city

In order to import new regions you need a textual representation of this area as WKT (https://en.wikipedia.org/wiki/Well-known_text) format. This can be retrieved with a region id from OpenStreetMap on this website: http://polygons.openstreetmap.fr/ Punch in the id of the relation. On the result page make sure the region does not have more than 10.000 points. If it does, try to reduce the complexity by filling "0.0001000" into the X,Y,Z fields and regenerate again. Increase the number slowly, if it is still more than 10.000 points.

Now once you have the wkt file, find the corresponding super region in https://github.com/sozialhelden/wheelmap/tree/master/db/data/wkt directory in this repo. Name the wkt file with the name of the region. Please replace spaces with underscores. Those will be translated back to spaces in the db later.

Check in the new files into git, deploy to staging and get onto the server. Find the current directory and run bundle exec rake region:import RAILS_ENV=staging/production

This should import the region into wheelmap. But rightnow, no POI is associated with this region yet. Either wait an hour or trigger the bundle exec rake poi:locate RAILS_ENV=staging/production rake task manually.

All done, happy wheelmappers.