LINZ
For information on the Austrian city, please see Linz Austria.
LINZ (Land Information New Zealand) is the NZ government department which is responsible for creating and holding information concerning land ownership. They have data for all of New Zealand's roads, released under a license which is compatible with that of OSM.
They also maintain data on other features, which is of interest to OSM. Work on incorporating this data is also underway.
- To avoid wasted effort please join the NZ OpenGIS mailing list and introduce yourself before uploading any LINZ data on your own. We are doing bulk uploads in a managed way, by consensus and with automation. When folks inadvertently bulk upload random chunks of LINZ data outside of this process it makes a huge duplication mess which takes a lot of energy to clean up, and we'd rather spend that energy on adding stuff instead of deleting it. Thanks for understanding.
Please see NZ for general information on all imports.
This data could be used within Openstreetmap and provide a very high level of detail/completeness for the whole of New Zealand.
As of 2011-08-23, LINZ gave their consent to use the new licensing terms:
Further to my phone call yesterday, this email is to confirm that LINZ gives permission to re-license our LDS CC-by data under OSM’s new terms and licences for the purposes of third parties wishing to contribute to the OSM database.
As of 2008-03-18, LINZ gave their consent to include, modify and derive LINZ data in OSM with suitable attribution.
Apologies for the delay - after gaining advice from our legal team we have concluded that you are able to use the information providing that you use the following clause for inclusion with the data that is supplied: " Contains data sourced from Land Information New Zealand. Crown Copyright reserved. Land Information New Zealand gives no warranty in relation to the data, including its accuracy, reliability and suitability and accepts no liability whatsoever in relation to any loss, damage or other costs relating to the use of any data, any compilations, derivative works or modifications of the data"
There are currently (2010-03) discussions to use further LINZ datasets; more information will be made available as it is known.
Contents
|
Status
[ August 2011 ]
- Permission has been granted to continue uploading to LINZ
- Some bugs need to be fixed in the linz2osm tool
- Offshore island data is now available on the LINZ LDS and Rob has a task to get this into linz2osm
- Some people are still worried/concerned about the new license so may not be motivated to continue.
[ June 2011 ]
With the Chathams are done we are working on the NZ mainland.
- We're ~ 30% of the way through the mainland layers.
- Progress has come to a halt due to the ODbL license and Contributor Terms change.
- We need explicit permission from LINZ to proceed under the new rules. (and so do you!)
- Some of our upload team is not motivated to proceed under the new license.
- The Chatham Islands upload is now compete!
- We still need to revisit the revisit list
- Need to work on removal of targeted duplicate nodes.
- The JOSM Validator plugin is a good place to start.
Completed so far
Data License
- Lawyers at LINZ have decided that their data can be used in the OSM database, with attribution in the form of the following statement (as of 2008-03-18).
"Contains data sourced from Land Information New Zealand. Crown Copyright reserved. Land Information New Zealand gives no warranty in relation to the data, including its accuracy, reliability and suitability and accepts no liability whatsoever in relation to any loss, damage or other costs relating to the use of any data, any compilations, derivative works or modifications of the data".
This approval has been submitted to the legal-talk list, requesting a suitable technical solution for displaying the note where applicable.
The general consensus so far on OSM seems to be that attribution will be:
- On the LINZ page in the Openstreetmap wiki
- A link to the Contributors page with the anchor for LINZ: http://wiki.osm.org/wiki/Contributors#LINZ
- An attribute/tag in the data itself specifying the author (this might be by creating a special user for the import, whose user page and contact details relate to the import and have details of attribution)
OSM License change to ODBL
OSM are more than likely going to change their license to ODBL
If this goes ahead (tentatively early-2011, but this may blow out), we have been advised to ask LINZ again for their permission to distribute their data under the new license.
Method 1: JR
(for more see below)
- A method has been devised for converting the data into a format that can be imported into osm. It is detailed on the LINZ Trial Import wiki page. (current method used by JR is LINZ → .mp → .osm)
- A test import to a dev server has been completed and is being discussed on the nzopengis mailing list. Unless a better option is available list problems found in the trial import on the LINZ Trial Import page.
Method 2: RC
(for more see below)
Overview
- Raw LINZ IFF data has been loaded into a PostGIS database
- LINZ->OSM tagging and export is done via the online LINZ-2-OSM web app
- The user exports a .osm file from the web app and saves it locally
- The .osm file is imported into JOSM or Merkaartor.
- The layer for import is checked with the JOSM Validator plugin
- The layer is uploaded to OSM
Underway
(for more see below)
- Import of Chatham Islands data is now complete. There was no previous data here to merge with, so we could focus on OSM tagging issues.
- bbox=-177,-44.5,-175.5,-43.5
- Import of the Mainland layers: We're starting to tentatively add minor layers while we work out merging issues & methods, and create new tools.
- The coastline is slowly being imported, moving counter clockwise around the South Island starting in Southland. This does not include nearshore and offshore islands (that's in the island_poly layer).
TODO
- Learn more about merge methods used by other bulk imports around the world
- By clump: New Jersey: A descriptive blog post.
- By tile + quadtree: CanVec from NRCan (Natural Resources Canada)
- Decide on our own merge method
- Import data for mainland NZ
- bbox=157.5,-59.0,179.5,-25.5
How to help
- After studying this page thoroughly, say hello on the NZOpenGIS mailing list and
- see the LINZ/Howto wiki page for some tips on getting started.
- (page is currently still a work in progress)
Key people
This list is in progress. Feel free to add yourself, e.g. for any particular area, even as an expert for a particular geographic zone (for checking merging)
LINZ (NZOGPS) to Openstreetmap import
- User:Rcoup - Linz2osm tool, dev servers
- User:JoeRichards - the script itself, dev server for map comparison (OSM vs import)
- Graeme Williams - NZOGPS founder, knows a lot about what data is there and what "value-added" bits are present. Also MP (polish map format) and Garmin codes.
- Sam Giffney - Zenbu founder & NZOGPS mapper, managed merge of new LINZ data to NZOGPS and added numbering, well practiced with MP data and written various scripts to manage it
- User:Hamish - available as a general dogsbody to help with code & technical problems. Experienced with bulk editing massive files, mostly work in Bourne shell and C but passably multilingual with most UNIXy systems. On the software side pretty good with GDAL/OGR, PROJ.4, and GRASS GIS tools.
- rcr - available where required. Helped out with coastline and border imports in other countries. Currently spend a lot of time manually fixing invalid data like unconnected or crossing ways in the existing data so don't mind long tedious JOSM sessions.
- myfanwy - i'm keen to help wherever. i'm willing to help with merging/qa of data, particularly round the auckland area, where there is plenty of existing good quality data. imo a lot of the akl data needs to be kept, rather than replaced. i'm prepared to carry out manual joining work at the interface, and manually fill in small gaps, where the odd road is missing
- Acrosscanadatrails - I'm happy to be of assistance where possible to share ideas from the Canada data import process, experiences & methods.
NZOGPS road data
- NZ Open GPS homepage
- Improved road data layer as of Sept 2010 (shapefiles, etc)
- Prepared .osm files (may be a bit out of date now)
- Contact: Graeme Williams
- NZOGPS source data is in Polish format, intended for Garmins. We have been producing routable maps for Garmin equipment since 2007. The data was based on a LINZ import initially but has had substantial editing, manipulation, and other value added data.
- Further explain what this is here and why it is valuable to our cause...
- LINZ data on it's own is raw - it's road center lines only. A good example are roundabouts (not included in LINZ) or dual carriageway roads (shown as a single line in LINZ).
- The NZOGPS data has been very modified and edited since 2007. It includes full routing data such as road direction, turn restrictions, road center lines of both lanes on dual carriageway roads (eg Fenton Street in Rotorua), other information like LINZ SUFI, street numbering, suburbs / town association.
LINZ topo v16 data
These are 166 vector map layers covering everything from topographic contour lines to waterfall positions to power pylons to high resolution vector coastline. A full set of roads and railways for the country are included. Basically these layers are everything that they use create the 1:50,000 printed topo maps.
License is BSD-like with attribution, see Crown Copyright statement above.
Cadastral boundary imports
Any people particularly interested and/or know about the existing datasets, please put your names here
- User:JoeRichards - would like to know more :)
-- which datasets in particular were you thinking about? Property boundaries + house numbers? Regional council borders?
Some other public domain shapefile data is available from the statistics office:
http://www.stats.govt.nz/methods_and_services/access-data/geographical-boundaries.aspx
http://www.stats.govt.nz/publications/businessperformanceenergyandagriculture/download-digital-boundaries.aspx
- Compressed in zip format, the files contain the following geographic layers:
- meshblock (MB),
- area unit (AU),
- urban area (UA),
- territorial authorities (TA) and
- regional council (RC).
"Copyright
Information obtained from Statistics New Zealand may be freely used, reproduced, or quoted unless otherwise specified. In all cases Statistics New Zealand must be acknowledged as the source."
Geographic area volunteers
(north to south)
Primarily people who would like to be involved in merging of the data in any particular area
North Island
- Auckland (CBD) -
- Sam Giffney -
- myfanwy
- Sam Larsen
- others?
- Hamilton
- rcr - not local but traced large parts of Hamilton from Yahoo, happy to help get rid of these unnamed roads and import the real thing.
- Wellington
- Olly Betts - I live in the Hutt Valley and have done a fair bit of mapping there and around the greater Wellington area.
- Leigh - I live in Whitby, and may be able to help review/QA merged data in Porirua area.
South Island
- Nelson
- anyone?
- Motueka, Golden Bay & Abel Tasman area
- Joe Richards - did a bit of mapping here, willing to help, but happy to have others join me
- Christchurch & North Canterbury
- rcr - been doing mapping based on imagery and gps around Rangiora and in ChCh, happy to help with importing and merging.
- EliotB - live in south Christchurch
- gerkin - (West CHCH) - have been busy with CHCH and Canterbury road, walking track & back-country mapping etc., happy to help with data checking/general dogs-body
- South Canterbury
- Queenstown (CBD)
- Joe Richards - just the central areas and the drive to Glenorchy
- GrantH - any parts of Queenstown District
- Dunedin
- Joe Richards - used to live here so I don't mind helping with merging central/north Dunedin
Data import
Datasets
- Datasets we have access to:
- See LINZ data sets for more information
- The LINZ website has 1:50,000 GeoTiffs of the new-series topo maps (NZTopo50) for download as GeoTiffs, as well as some aerial 2.5m orthophotos. They can be added to a WMS server, or more cheaply into a TMS server (Merkaartor only?).
- Old NZMG 2.5m res. orthophotos can be georegistered using their topo map bounds (see .csv file on website). Adjust bounds by 1/2 a cell to correct for grid vs. cell-centre convention.
- Marco in Italy has all the NZ nautical charts registered in BSB format as part of the kapgen project. (GDAL can read BSB)
Areas
("bbox" is short for "bounding box", and is given in x for degrees longitude and y for degrees latitude. Southern and Western hemispheres get a negative sign. Thus bbox=west,south,east,north bounds)
OSM will not export data across the international date line in one blob - these need to be extracted as two separate pieces, and joined together (or not, as needs) at a later point. The Chatham Islands are on the opposite side of this line to the rest of New Zealand.
- NZ Regional (eastern hemisphere)
- bbox=157.5,-59.0,179.9,-25.5
- bbox=171.90,-41.75,178.70,-33.95
- bbox=166.3,-46.68,174.48,-40.31
- bbox=-177,-44.5,-175.5,-43.5
- bbox=-176.373,-44.450,-175.973,-44.115
- bbox=167.25,-47.34,168.31,-46.66
- bbox=175.2,-36.4,175.6,-36
- bbox=174.98,-36.8525,175.206,-36.7186
Method
- See the resulting bugs or issues page at LINZ Trial Import
- Upload changeset sizes must be smaller than 50,000! I'm pretty sure that uploading in chunks of 750 or 1000 with JOSM's Advanced upload options (while helpful) will not help with that restriction.
Mark I: Joe Richard's custom mp2osm.py
- Good for importing NZOpenGPS's polish format updates
Joe will fill this in shortly (2009-09-15). Code is here
http://trac.openstreetmap.org/browser/applications/utils/import/linz2osm/mp2osm_linz_jr.py
the resulting XML OSM files are available here:
http://joerichards.dev.openstreetmap.org/files.html
The old-dev server comparorator is now at: (mostly working again)
http://joerichards.dev.openstreetmap.org/index-new.html
Mark II: Rob Coup's LINZ-2-OSM web app
April 2010
- LINZ raw IFF format is loaded into PostGIS database with the linz_topo tool hosted in google_code.
- Visit the web app site http://linz2osm.coup.net.nz/
- (helpers can ask on the nzogps mailing list or contact User:Rcoup at robert@coup.net.nz for a login)
- The base web app code can be found at linz2osm in github.
- You then match the LINZ attribute with OSM wiki approved tags in the web app, details in the comments section, and then request the web app to create a .osm export file for you. If there is no matching OSM tag already use LINZ:attribute_name as the tag.
- Be logical about adding things if needed (eg natural=tundra doesn't officially exist but it is pretty obvious that is probably just because of a lack of OSM effort in those parts). Do lodge new keys as a Proposal in the OSM wiki.
- If it is as good as it's going to get for now, but there are lingering doubts, add the issue to the LINZ revisit list.
- Import this .osm file into JOSM/Merkaartor/whatever and check for defects, correct tags, etc.
- Use the JOSM Validator plugin to check for errors. Please email feedback to the nzopengis mailing list or file a bug at the github site so we can fix the problem at its root in the export scripts.
- If you have doubts, trial upload it to api06.dev.openstreetmap.org, not the main live database.
- Let the dust settle, see if it still looks normal in the morning.
- After review & consensus that it is ok and finalized, upload to the main database.
- Once uploaded, make note of this in the LINZ-2-OSM web app and the List of LINZ layers and notes wiki page(s).
Tools
Comparison maps
- Reuben's NZTopoMaps site has a Google Maps mashup with a LINZ 1:50k paper topo maps overlay. These are essentially the same data as we are importing from LINZ.
- Gavin's similarly named NZ Topo Map is another mashup which includes both the LINZ 1:50k and the 1:250k topo map overlays.
- Joe Richard's old dev server had a nice comparorator, but it's currently only mostly functional.
QA maps
- Duplicate nodes map (about, stats, and hints on how to manually fix)
-
Script for merging duplicate nodes in a targeted way(within a single or between two already-uploaded LINZ layers, e.g. Golf Course area boundary and fence lines) [not needed: just use Xapi + the JOSM Validator tool; see below]
-
- Coastline error checker (often weeks behind)
- Keep Right! - (NZ) (Chathams)
Stats
- TagWatch - tag popularity contest
- Data upload stats
Scripts
- Script for adding a boat ramp tag to the last node of a slipway polyline
- Script for cleaning up the descriptive text LINZ layer
Bridges
- Script for snapping nodes to nearby nodes (align bridges to roads)
or
- Bridges almost align with road nodes, but not exactly. Roads are downloaded by JOSM with a precision of 6 or 7 numbers after the decimal point (~11cm; "%.9g"?), while bridges are delivered from LINZ-2-OSM with 9 or 10 (~.1mm; "%.12g"?). To merge we will have to round the bridge nodes to '%.9g' precision; then snap duplicate nodes in the JOSM Validator; then somehow spit the road at the end nodes of the bridge; then combine duplicate ways, merging tags using the JOSM Validator overlapping ways tool (which lets you know about them but doesn't fix them). ^%*!$#@!
- Script for reducing the precision of nodes
- todo: Wish for the Validator plugin to get a threshold parameter
- todo: Wish for the Validator plugin to fix overlapping highways by safe merge
Place names
- Here is a page for discussion of New Zealand/Place names, including Māori localization and what to call populated places of varying sizes.
Trial import to OSM development server
User:JoeRichards has carried out a test import, using a dev server rather than the live osm data. information on the import is at this link: LINZ Trial Import
| Generic OSM API v0.6 dev server for trial uploads: api06.dev.openstreetmap.org |
Live OSM server data import
A trial import was carried out on 2010-03-27 by Glen Barnes, Andrew Coup and Robin Paulson.
The Area selected was the Chatham Islands, because:
- There was no previous OSM coverage apart from the coastline, so we would not be trampling on data put in by OSM mappers;
- The area is well demarcated from the rest of the country, so there are no problems with merging;
- No other entities (at least google and yahoo, anyway) show maps of the Chatham Islands, we would be the first;
The data source was the raw dataset from LINZ, as NZOGPS data does not include the Chatham Islands.
The data was made available in ArcGIS shape file (.shp) format. OSM cannot deal with these files, so a converter, shp2osm, had to be used.
Shp2osm requires a rules file, to map the parameters in the shape file to corresponding parameters in the osm file
Tags used
(See eventual LINZ-2-OSM's data_dir.xml file for the latest authoritative list)
- See the LINZ attribute matching wiki page
- also, the LINZ geo_name matching wiki page
All layers
- attribution = http://wiki.osm.org/wiki/Attribution#LINZ
- [link to the attribution page on the wiki, with the required attribution page required by LINZ]
- source_ref = http://www.linz.govt.nz/topography/topo-maps/
- [link to the relevant page for this dataset, on the LINZ website]
- LINZ:source_version=V16
- [the version of the data set we have imported; currently V16]
Some LINZ-specific tags were also created, to tie in with LINZ attributes which are not required by OSM, but which will enable the data to be updated more easily:
- LINZ:key=value
Roads
- highway = road
- [this is what is used in OSM when the type of highway is unknown]
- surface = metalled|unmetalled|gravel
- [the surface of the road - the LINZ data sepcifies one of three surface types; there are several more in OSM, so the closest three were chosen]
- name = [name of the road, where applicable]
- access = unknown
- [this tag was only used for roads without a road_name_id tag; it was (wisely) assumed these roads may not be for public access]
- LINZ:road_name_id
- [a 13 digit unique number; one is given by LINZ to every road in NZ]
Troubleshooting
Stale tiles
- Step 1: clear your web browser's cache
- Step 2: make sure you are not behind a proxy server
If you only edit a tag and not the base spatial data the slippy tile may not get marked as dirty and so Mapnik won't know to rebuild it. If that happens you can right-click on the osm.org OpenLayers canvas and 'view image' to view just the one tile. then in the address bar add /status to the end of the png's URL to see the last time it was rebuilt. add /dirty to the end of the URL to get it rebuilt the next time someone views it. (There will be a slight delay lag before this happens, so be patient and you also probably have to bypass your web browser's cache (shift-reload) to see the new version). /dirty is only meant for limited development debugging, use sparingly.
"Leaky" Osamarender tiles
While trying to clean up some Coastline I notice that in osm.org's Osmarender that some tiles are "flooded". In a manual audit + JOSM's Validation tool I don't find any obvious errors, but perhaps I missed something. The osm.nl coastline checker seems to be offline since last April and the osm.org Mapnik coastline is too long out of date to be useful feedback. I read somewhere that for osm.org's Osmarender there is a file in svn somewhere which states which tiles are wet, which are dry, and which are mixed. Is there a way of seeing (maybe an OpenLayers overlay) what a particular tile is classified as? so then a request could be filed somewhere to get its wet/dry/mixed status updated? Or maybe it just takes a while for the renderers to sort themselves out?
examples of the breakage:
-
http://osm.org/go/urMYb_G?layers=Ofixed! -
http://osm.org/go/r9ZniE2?layers=Ofixed! -
http://osm.org/go/upqLDFd--?layers=Ofixed! - Westport http://osm.org/go/upLq0w8--?layers=O
- Haast http://osm.org/go/uoFJusA-?layers=O
- Jamestown http://osm.org/go/uip7f4x-?layers=O
- Paterson Inlet http://osm.org/go/r3uSnT3-?layers=O
Fixing duplicate nodes between two layers
Some layers, like roads+tracks or fences+hedges will naturally connect be be provided in two separate source layers. Where they meet their nodes should be merged. The trick here is to only merge duplicate nodes between layers which really need it- for example connecting a road network to a fence line might lead to some unfortunate turn-by-turn direction routing one day!
Single key, multiple values
Using JOSM to download
(clustered features)
- Download an area to work on in JOSM
- Use the search tool to select e.g. "natural=wood|water|mud|sand|wetland|scrub|heath" by replacement
Using Xapi to download
(sparse features)
The Xapi download interface can be used with the wget program to download just the two layers we are interested in. Those can then be uploaded into JOSM and duplicates found using the JOSM Validator plugin, merge them, then upload the changes. The data in this example will be fences and hedges in the Chatham Islands.
- Make sure both way layers are already uploaded.
- Download with wget + Xapi:
wget -O chatham_hedges_and_fences.osm \ "http://osmxapi.hypercube.telascience.org/api/0.6/way[barrier=hedge|fence][LINZ:source_version=V16][bbox=-177,-44.5,-175.5,-43.5]"
- If way layers are already uploaded you must re-download them from the server.
- Import this .osm file into a new JOSM session. (don't download anything else)
- Zoom out a little, then drag a box around everything to select all
Fixing with the Validator
- Make sure the Validator controls are running (tick-mark button on left, text window in bottom right)
- With area of interest selected press the [Validate] button (bottom right)
- Expand the error tree in the validate controls by clicking on the little sideways lollipop
- Expand and click on "Duplicate nodes" to select+highlight them
- Investigate, confirm (click on map canvas to unselect all, right click on error list item & 'zoom to error')
- TODO
- Verify tags are preserved (eg gate nodes into roadways)
- Press the [Fix] button (bottom right). This only acts on items selected+highlighted in the error list.
- This may take care of a bunch of other Validation warnings. So start on the duplicate nodes first, then re-validate!
- Check the command list changes
- Upload to the main server
- Done!
Xapi takes a while to get updates from the main data server, so when using it you need to wait a little while before re-downloading something you've just uploaded.
Multiple keys
This is the same as above but you have to run Xapi twice and import each .osm file individually. If merging nodes to ways (for example gates to roads) it might be possible to proceed with only the roadways already uploaded (untested). If that works it will be the preferred method.
If you try and merge two layers not yet uploaded to the main server it is likely that the upload will get confused if it tries to modify nodes on the server which do not exist yet. In these cases you might export the locally modified .osm files to a new merged one, then close JOSM and then reopen with the new single merged .osm file. Then upload that. (untested, and more dangerous). Generally to aid with fixing mistakes you will want to upload the raw data in one step, then fix it in another. That way if the fix has to be reverted it is possible to do so. (aka "atomic commits").
Undoing uploads
- You can use Xapi to download a .osm file with just the selected changeset ID. Download all the features from that changeset (and only that changeset!) using Xapi, open it into JOSM/Merkaartor, delete everything, then upload changes. untested - use care
wget -O changeset_4593253.osm \
"http://osmxapi.hypercube.telascience.org/api/0.6/*[@changeset=4593253]"
Be quick! If anything has changed since the upload this is likely to break.
- There are several OSM Revert scripts around the wiki to have a look at.
Fixing bulk tagging mistakes after upload
(try not to get here)
- You can use Xapi to download a .osm file with just the selected query attributes. Set the bounding box (bbox=w,s,e,n) term to constrain it to a certain geographic area. For example if you wanted to change all features with access=unknown to access=private in the Chatham Islands you could run:
wget -O chatham_access_unknown.osm \ "http://osmxapi.hypercube.telascience.org/api/0.6/*[access=unknown][LINZ:source_version=V16][bbox=-177,-44.5,-175.5,-43.5]"
- Next open this .osm file in your OSM data editor but do not download more.
- In Merkaartor do:
- Right click on the download.osm layer and Zoom to it
- Edit → Find
- Set Key to "access" and Value to "unknown" and hit [Ok]
- A list of matching features should be selected in the bottom-left of the program window. In the middle of the left side is a list of shared tags.
- Change the tags as needed and then review
- When you are ready Upload the changes.
- In JOSM... ??
See the Xapi help page for information on how to make more complex or specific queries.
- See also Revert scripts
After the dance
- Together with the contour data it would be great to make some TopOSM renderings
- (but if you are just after pretty contour lines and hill shading, and don't really care about road names too much, you might as well just use gdal2tiles.py to convert the LINZ NZTopo50 300dpi GeoTiff raster scans of the topo sheets into a WMS/TMS server and save yourself a lot of trouble...)
- What other nice OSM → hardcopy tools are out there?
Previous discussions and notes
- see the Talk page