LINZ Trial Import

From OpenStreetMap Wiki
Jump to: navigation, search

User:JoeRichards ran an import of LINZ & NZOGPS and put the results on a dev server. The maps can be compared against live OSM data here.

The source code is visible in a pretty trac page here

or download via subversion, e.g.

svn co http://svn.openstreetmap.org/applications/utils/import/linz2osm

TODO:


The actual XML OSM files output by the script run are here:

http://joerichards.dev.openstreetmap.org/files.html

This page is intended for listing problems and queries regarding the test import and preparing for the next run.

Contents

Issues/Bugs/Problems/Questions

Roundabouts

roundabouts are broken

Roundabouts are apparently split. This is caused by roundabouts being tagged as junction=roundabout, but not highway=*

roundabouts are there, just lacking highway tags

Roundabouts are present, just split up and lacking highway=* tags

Problem:

The roundabouts are maybe caused through
one of the authoring requirements for
Garmin maps - they are split into two unique
polylines to avoid a self intersecting line.

Right, they look like a donut with two bits taken out. At least the ones I've spotted so far.

Solution

Speed limits

Problem:

Proposed Solution(s):

Typical road speeds in NZ are 100 kph for motorways and highways and 50 kph for residential roads. The remaining 9.999% will consist of 5,10,15,20,30,40,60,70,80,90.

Braided rivers

Problem:

small rivers are blocky

Proposed Solution(s):

Apparently cut down in that dataset in order to save space for more roady things.
-- Just grab the original data from the LINZ topo dataset river_poly layer. Koordinates.com have these available for download as a shapefile. --HB

Town sizes

Problem:

too many place names at 1:1.5M

At the moment the garmin codes (which roughly specify a region/city/town/locality etc) are translated into osm tags, but they might be at the right scale (e.g. a village might be tagged as a hamlet). This might mean that we see too many (I think!) or too few localities at a particular zoom level.


Solution(s):

Abbreviations used

Problem The NZOGPS data uses common (and not-so-common) abbreviations such as St for Street. Openstreetmap doesn't use abbreviations. So we need to retranslate these back to their unabbreviated forms, without doing it in the wrong places, e.g. St Heliers is not Street Heliers.

A list of abbrevations and their full version (thanks to Mike Oberdries) is here: http://docs.google.com/Doc?docid=0AT8ugvNNx8UZZHh3OHZ0NV83Mmdxc3pwdmZ4&hl=en

Solution(s)


Link roads

Robin P said:

yes, the on/off ramps have all been imported as secondary_link - they
should be motorway_link

TODO - check this outside of Auckland and in Auckland. They might just be motorway_link in the examples he's checked (since he's in Auckland). Or it might be that all of them really need to be motorway_link after all.

Dual-carriageways

>> there are a lot of dual-carriageways that have been imported as single
>> carriageway roads. again, is this a lack of data?
>
> Are you zoomed in enough?  At zoom 16 they should be visible.  Again,
> something for the check-list, cheers!

no, looks like it's a lack of data

Double-check. Is it just a particular area? Can we get around this during our manual merge process?

General issues/bugs

Problems with Garmin types

http://koordinates.com/layer/560-nz-runways-and-airstrips-v14/
http://koordinates.com/layer/123-nz-airports-v14/
-- maybe these have been cut down to save space in the .mp file, same the river_poly's were? or perhaps they are just crude representations for the topo maps -- HB
http://koordinates.com/layers/global/oceania/new-zealand/?q=building
http://koordinates.com/layer/588-nz-saddles-v14/
http://koordinates.com/layer/587-nz-fords-v14/
A matrix of OSM icons can be found here. See transport → track (no listed OSM Condition)
-- Yes, the LINZ topo4 shapefiles's height_pnt.dbf includes a single-precision floating point column called "Elevation" containing the peak height (ridges too). You can also get the trig station database from LINZ as well as a different dataset. --HB
see http://koordinates.com/layers/global/oceania/new-zealand/?q=height

Minor problems

Also need to check this:

>> also, what are the rust-brown areas. in some places they appear to
>> correspond to landuse=industrial/commercial/retail in others to
>> building=yes?
>
> I'd say building from what you mentioned, but if you have any specific
> examples, take a look at the .osm files

yeah, 0x13 has been imported as building, probably should be
landuse=commercial or retail 

hmm, 0x13 looks like it includes a lot of things. hard to say what to
do here. newmarket and eden terrace are covered in them

Data sources

Used in import

Sources: LINZ, Corax, Zenbu
http://mapcenter2.cgpsmapper.com/mapsetview.php?id=185
Public data license: BSD-like with attribution:
"Where data from NZTopo is reproduced, derived or copied,
the following acknowledgement note must be shown on the
product and associated media:

   Sourced from NZTopo Database. Crown Copyright Reserved"
-- http://www.linz.govt.nz/topography/topographic-data/vector-extracts/index.aspx

Additional data

Many LINZ layers are available for download from Koordinates.com.

For example: train stations:
http://koordinates.com/layer/606-nz-railway-stations-v14/

A comprehensive place name database can be downloaded from http://www.geonames.org. Geonames data is largely an import (http://forum.geonames.org/gforum/posts/list/26.page) of the LINZ placename data, from several years ago - better to go to the source http://www.linz.govt.nz/placenames/find-names/nz-gazetteer-official-names/index.aspx . In my opinion that data is of questionable value, odd mix of data, coords read from paper maps... --Zenbu

We have started mapping the LINZ layers to OSM types. Each layer needs to be looked at individually to see what tags we should use and what manual work will need to be done to clean things up once imported. We are using the Chatham Island's as a test bed as this has very little OSM data already so we won't be overwriting any existing work. See the List of LINZ layers and notes for details of the progress. I will update this section with notes on the mapping process once i have this documented - Barnaclebarnes


Comparative datasets

data: http://www.openstreetmap.org/traces/tag/TransitHSDC2008
about: http://www.gis.org.nz/wiki/Transit_High_Speed_Data_Collection_Survey

Import script

Previous version:

Which was in turn based on:


Fixed Now

 def capwords(words):
return ' '.join([x.capitalize() for x in words.split()])
LINZ topo v4 DBF: 
 Id         : 111056
 Name       : Glen Nevis Station Road
 Crt date   : 
 Mod date   : 
 Surface    : unmetalled
 Status     : 
 Lane count : 1
 Hway numbe : 
 Road image : 
 Way count  : 
 Name id    : 1030000192208
Southland.mp:
 ;sufi=1030000192208
 ;Auto-numbered=20080524
 [POLYLINE]
 Type=0x6
 Label=GLEN NEVIS STATION RD
 EndLevel=1
 CityIdx=4
 RoadID=22944
 RouteParam=2,0,0,0,0,0,0,0,0,0,0,0
 Data0= [...]
Joe's Southland.osm:
  <way id="-129" visible="true">
   <tag k="source" v="LINZ & NZ Open GIS" />
   <tag k="linz:sufi" v="1030000192208" />
   <tag k="linz:garmin_type" v="0x6" />
   <tag k="highway" v="residential" />
   <tag k="name" v="Glen Nevis Station Rd" />
   <tag k="linz:RoadID" v="22944" />
   ...

So process would be like:

  1. Get;sufi= from .mp file
  2. Lookup the Name ID value in the LINZ topo shapefile .dbf database
  3. If found, check that the strings before the [end] .split(' ') space match. If so use the expanded name from the DBF. If not output debug message + full details to stderr and use .capwords() or .title() version of the .mp string.
  4. If not found in DBF use .capwords() on the .mp string and a switch table to expand common ' Rd$'→Road, ' St$'→Street, etc.
  5. Profit!


The same is true for road surface type and number of lanes, etc.

Retrieved from "http://wiki.openstreetmap.org/wiki/LINZ_Trial_Import"
Personal tools
Namespaces
Variants
Actions
site
Toolbox