[Talk-ca] Help for Canvec to OSM for part of NB
steggink at steggink.org
Sat Nov 21 05:03:04 GMT 2009
I've converted one NTS tile (021N08, Edmunston), and uploaded it here:
 This way you can give it a try right away, in case you get stuck
with the installation of the GDAL bindings. The Edmunston area
corresponds with the following location in OSM:  . You can paste that
URL directly into JOSM, in order to download data for that area.
One thing what is odd is that there are really a lot of nodes in this
file. I haven't seen this to this extent in the Quebec data. It would be
better to clean this up somehow, but it could also be done at a later
time. Because of this, and also in order to keep the work manageable, it
is important to upload small chunks. (Small = about a couple of thousand
of nodes.) There are already some roads in Edmunston itself, so you only
had to add missing roads.
When importing data, it works best to do cleanup immediately, or shortly
after the import. This is connecting nodes, removing duplicate nodes,
other inconsistencies, etc. It would be much more tedious if this needs
to be done at a later moment. If you don't use it already, please check
out the Validator plugin of JOSM, and learn how to use it.
Frank Steggink wrote:
> Hi John,
> It's been a while ago since I installed this. I didn't have GDAL on my
> machine before, so I'm using the latest version (still 1.6.2). And after
> the installation I didn't bother about it anymore ;)
> Which OS are you using? If you're using Windows, then you should be able
> to use the installer for the Python version you're using at the bottom
> of the page. Maybe you also need to install GDAL 1.6.1, if you're
> currently using an older version, but it might still work if you have an
> older version. If you're not sure what to choose, you can best try to
> contact Howard Butler. He is the author of these bindings, and his
> e-mail address is listed on the page.
> If this doesn't work for you, I could make a number of files available,
> which you can import. A while back I did that also for someone else,
> which worked well.
> By the way, I forgot to add in my first mail that when you're using the
> Geobase files, you'll have the same attributes which are used in most of
> the country. This won't be the case for Canvec.
> Hope this helps,
> JOHN SMART wrote:
>> Hi Frank
>> Thanks for your reply. I'll use the NRN data for now then. I have
>> grabbed the NB NRN files, no problem there.
>> What I have done so far and where I am stuck now:
>> -- following what's written in
>> - installed python 2.6 (I already had python 2.something as part of
>> FWTools but python version is too early to support Shapely)
>> - installed Shapely 1.0.14 under the Python directory tree
>> but now I am stuck at installing "OGR Python bindings osgeo.ogr Python
>> GDAL" <http://pypi.python.org/pypi/GDAL/>
>> Question: what, exactly, do I need to download and install here.
>> Note that I already have the FWTools (http://fwtools.maptools.org)
>> installation which includes GDAL and OGR.
>> What more / different do I need, to satisfy this Python bindings
>> Am I still on the right track?
>> Thanks for any more help
>> *From:* Frank Steggink <steggink at steggink.org>
>> *To:* John Smart <smartowka at rogers.com>
>> *Cc:* talk-ca at openstreetmap.org
>> *Sent:* Thu, November 19, 2009 11:33:29 PM
>> *Subject:* Re: [Talk-ca] Help for Canvec to OSM for part of NB
>> Hi John,
>> Thanks for looking at the scripts. Please see below.
>> John Smart wrote:
>>> I would like to take a shot at updating the OSM for some of New
>> Brunswick, which presently does not have very much mapping compiled.
>> The plan I think I'd like to follow is:
>>> 1. Select an NTS 1:50 000 area that has few roads and which has no
>> OSM or minimal OSM.
>>> 2. Run script(s) to generate OSM from the Canvec data set. At this
>> point I am only interested in roads, to prove the process for that.
>>> 3. Upload the OSM.
>>> 4. Have some people (you?) review the data, make comments.
>>> 5. Iterate the process a bit till quality good (or I give up!)
>>> 6. If I'm still here, maybe add some more.
>>> Any comments on my plan are very welcome, especially helpful tips!
>> Regarding the road data, Canvec is derived from Geobase NRN, so it
>> might be better to use the latter. The CITS guys here should be able
>> to give a better answer ;) For Geobase NRN there is a different
>> script, named geobase2osm.py .With that it is possible to convert
>> certain areas (like a NTS tile) to an OSM file, and then you can use
>> JOSM to import the data. There is a wiki page describing the Geobase
>> process , but it still describes the convoluted process involving
>> The current process is:
>> * create a bounds file for a certain area for geobase2osm.py
>> * execute geobase2osm.py
>> * download OSM data for this area from JOSM
>> * open the resulting OSM file in JOSM
>> * copy over the features which do not exist
>> -> make sure you connect the new roads to the existing roads in OSM
>> -> depending on the density of the data, it is generally better to
>> work in multiple iterations
>> * upload the data to OSM
>> -> indicate in the description of the changeset that you imported data
>> from Geobase for tile 999x00.
>> Several people on this list have experience with this process, so
>> don't hesitate to ask any questions you might have.
>> For Canvec we're organizing a meeting in a few weeks, in order to get
>> some experience with the import, and to work on the process.
>>> The part I'm currently interested in is #2, generating OSM from
>> Canvec. I saw on the mailing list that there is a python script called
>> canvec_to_osm_features.py, and I have downloaded that. However, I have
>> difficulty running it on my Windows XP box. Specifically:
>>> - I can launch python (which I happen to have on my path)
>>> - But if I just run "C:\Canvec2Osm>python canvec_to_osm_features.py
>> --version" then nothing happens.
>>> I'd appreciate any comments on exactly what I need to do to get this
>> .py script to work.
>> The script you should execute is canvec-to-osm.py. :) The other script
>> only contains the list of features which should be imported. I
>> separated it to make it easier to manage. (Unfortunately the second
>> script file contains underscores, but I'll update that soon. Maybe I
>> should just rename it to "features.py", so that it is immediately
>> obvious that this script should not be called directly.)
>>> Lastly (for now) I think that if I get the .py working, I will
>> immediately run into a problem with shp-to-osm. Like the .py readme
>> said, I have made a bin directory and I've put the shp-to-osm in
>> there. Actually I have both:
>>> 2009-11-11 17:37 7,365,493
>>> 2009-11-11 17:37 7,365,493 shp-to-osm.jar
>>> in case there is some naming problem. Have I done the right thing?
>> Ian Dees always uses the longer name when building the jar file, so
>> you only have to keep the first one. You'll learn quickly enough if
>> the jar file can't be found for some reason :)
>>> Thanks for any help. I hope I won't get frustrated and that I'll be
>> able to help the project a bit!
>> Helping us would be wonderful. Especially New Brunswick still has
>> large white areas, so it would be excellent to see that filled up!
>>  http://wiki.openstreetmap.org/wiki/Geobase2osm
>>  http://wiki.openstreetmap.org/wiki/Geobase
> Talk-ca mailing list
> Talk-ca at openstreetmap.org
More information about the Talk-ca