[Talk-ca] Geobase Canadian Geopolitical Boundaries - take 2

Michel Gilbert michcasa at gmail.com
Sat Jan 17 02:24:13 GMT 2009


2009/1/16 Sam Vekemans <acrosscanadatrails at gmail.com>

> I updated the main wiki page with 'completed: 14 Jan 2009':-)   Great Job!
>  Well done.
>
> Would you be able to post on the wiki a link to the script that you used to
> preform the import? And the steps you took to get the import done?
>

As I mentioned before in other threads, I used FME to import geopolitical
boundaries. It is not that I do not want to share my script but I must admit
that the code isn't very clear. I have done it as a one shot job so I didn't
pay attention to the "style". For the roads which I am starting to look at
I'll be more careful in order to sharing my script.

The steps to import the Geobase boundaries:

1) Read the Geobase Administrative area (prov_ab_p_geo83_e.shp)
2) Change the boundaries from polygons to lines
3) Add OSM tags to the lines as defined at the Geobase osm
wiki<http://wiki.openstreetmap.org/wiki/GeoBase:_Canadian_Geopolitical_Boundaries>
4) Split the lines to 500 nodes max.
5) Add way id to the lines (negative numbers)
6) Dissolve the lines to create points
7) Eliminate duplicate points (some boundaries share the same points)
8) Add node id to the points (negative numbers)
9) Build the ways using lines (step 6) and the nodes (step 8)
10) Write osm file (python script embedded in fme)
11) Read the osm file within JOSM
12) Upload in osm with JOSM

Michel


>
> Thanks,
> Sam Vekemans
> Across Canada Trails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ca/attachments/20090116/f64efc9b/attachment.html>


More information about the Talk-ca mailing list