On Sun, 12 Sep 2010 20:22:10 -0500, Samuel <samueld...@gmail.com> wrote:
> Hi
> 
> After thinking about it for a while, I realized that I can keep relying 
> on others to do CanVec imports for me, so I resolved to figure out how 
> to do it myself. I have a few questions.
> 
> 1. Can and import be done using just JOSM?
> 2. If not, how do I convert the SHP file to OSM XML?
> 3. How do I merge the existing OSM data into the CanVec data?
> 
> Thanks


Importing Canvec data is pretty easy.
Download the OSM version of the data you want to import:
ftp://ftp2.cits.rncan.gc.ca/osm/pub

Usually each area is split up into a number of smaller files as
illustrated here:
http://wiki.openstreetmap.org/wiki/Canvec#Canvec_Product_-_Osm_format

Choose the part you'd like to work on, and open it up in JOSM.

Download the existing OSM data for that area as a new layer in JOSM.

Copy and paste the data from the Canvec file into the OSM layer in JOSM.

Choose "Select All" to select all data you've got, and hit the "Validate"
button in the "Validation Errors" panel.  Expand the "Duplicate Nodes"
entry, and select all entries and click "Fix".  Typically there will be
duplicate nodes between canvec tiles.  If you don't fix them, you can end
up with roads that don't connect between canvec tiles. 

Once you're done, upload your changes and update the spreadsheet:
http://spreadsheets.google.com/ccc?key=0Am70fsptsPF2dERFUlBodFFmbmJiR3BBMHR4MzJDM1E&hl=en

Some things to note:
Canvec classifies pretty much all numbered highways in MAnitoba a PRIMARY
highways.
ONLY the single and double digit highways should be primaries; the 3 digit
highways should be set to SECONDARY.

The easiest way to find these highways is to use his the "Search" button
in the selection pane.
For the search string, enter: ref=[0-9]{1,2}[A-Z]{0,1}
Choose "Replace Selection", and check the "Regular Expressions" checkbox.
This will find you all single or double digit highways.
To find the secondary highways, search for: ref=[0-9]{3,3}

Typically provincial highways in Canvec are named something like "Highway
10", or not named anything at all.
I name all numbered roads in Manitoba according to the provincial highway
naming standards.
All single or double digit highways are marked as primary, and the name is
"Provincial Trunk Highway XY" where XY is the reference number (ie 2, 20,
10A) of the highway.
All triple digit highways are marked as secondary, and the name is
"Provincial Road XYZ" where XYZ is the reference number.

Leave the "farm roads" classified as "tertiary".  I've been downgrading
all single lane tertiary highways to "unclassified".  To find these, search
for "highway:tertiary lanes:1", making sure to uncheck "REgular
Expressions".  

There are a small number of highways in Manitoba that need their status
UPGRADED to TRUNK.
These are any routes with ref=1,10,16, or 75.  

Some other things to look for in the Canvec data:
- Often twinned highways don't have the highway direction set right and
are missing the "oneway=yes" tag.  
- Named roads have the name, name:en, and name:fr tags set.  Unfortuantely
the name:fr is the default entry in the name field.  Unless a road is
clearly named in french, I'd say it's best to set the name to the name:en
tag value.
- When merging Canvec data into the existing data, make sure the existing
roads are connected to the canvec data.  For an existing road in OSM  that
spans the canvec tile I'm working on, I typically split the road at the
border of the canvec tile and delete the portion of the road within the
canvec tile.  Then after I paste in the road from Canvec, I select the end
node of the existing road, SHIFT-click the node in the Canvec road I want
to join up with, and choose "Merge Node" under the "Tools" menu.  I
typically do NOT use the "Combine Ways" option to merge existing OSM ways
with Canvec ways.  I do this so that it's easier when merging in the next
adjacent tile.

Let me know if this makes sense.  If you don't want to bother with the
merging feel free to let me know of an area you'd like to work on and I can
merge in the Canvec data for you.  I typically merge in a few canvec files
every week, so it's no problem to work on ones I know someone else is going
to be improving first.

Tyler

_______________________________________________
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca

Reply via email to