Commit 39c5a72c authored by Eliot Blennerhassett's avatar Eliot Blennerhassett

doc: updates

parent 6b909939
This is to support import of LINZ address database into OSM
Discussion at
nz-street-address.gpkg obtained from LINZ
LINZ simplified street address database:
Full nz-street-address.gpkg obtained from
Run to obtain nz_address-osm_raw.sqlite
OSM items with addr:housenumber key:
Run to obtain nz_address-osm_raw.sqlite
Run spatialite osmlinzaddr.sqlite < init_osmlinzaddr_spatialite.sql
to initialize working database
......@@ -14,5 +18,5 @@ to import the LINZ and OSM datasets, and create a cross reference
of duplicate addresses.
Run to generate OSM changesets
(currently hardcoded to subdirectory bysuburb)
--help shows options.
......@@ -29,7 +29,7 @@ SELECT
FROM osm_addr as o
JOIN linz_addr as l on
o.housenumber = l.full_address_number
and ((o.street = l.full_road_name))
and o.street = l.full_road_name
and D < 0.001
-- remaining OSM entries with streets
......@@ -51,3 +51,20 @@ left outer join exact
on osm_addr.osm_id = exact.osm_id
where exact.osm_id is null and street is null
order by street, housenumber
create table temp.streetnull_linz as
o.osm_id as osm_id,
l.linz_id as linz_id,
Distance(o.geom, l.geom) as D
FROM streetnull as o
JOIN linz_addr as l on
o.housenumber = l.full_address_number
and D < 0.001
-- items in streetnull that had no identified LINZ equivalent
SELECT "type", a."osm_id", "housenumber", "street", "geom"
FROM "streetnull" as a
outer left join streetnull_linz as b
on a.osm_id = b.osm_id
where b.osm_id is NULL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment