[Imports] NYC building + address import - to merge or not to merge?
Paul Norman
penorman at mac.com
Fri Oct 25 02:33:57 UTC 2013
I used a different strategy than Eric, but I also looked at this question
For the queries I ran to see how McDonald's were merged to ways I used this
with an osm2pgsql database to find McDonalds mapped as a node within a
building with no other POIs in the building:
SELECT COUNT(*)
FROM planet_osm_point AS pt
JOIN planet_osm_polygon AS bp ON ST_Intersects(pt.way, bp.way)
LEFT JOIN planet_osm_point AS po ON (
ST_Intersects(bp.way, po.way)
AND po.osm_id != pt.osm_id)
WHERE pt.name='McDonald''s'
AND bp.building IS NOT NULL
AND po IS NULL;
Getting the number mapped on buildings is simple, as is the total number
mapped as nodes, and with subtraction you can get the same measures that
Eric did.
There are
* 2208 McDonald's points inside building polygons with no other points
inside
* 3315 McDonald's polygons
* 1484 McDonald's points inside building polygons with other points inside
* 3721 McDonald's points not inside a building polygon at all
The first two are the relevant numbers for this.
To change it to addresses is simple, but expect a much slower query as there
are a lot more addresses.
I believe this is actually a more accurate method than Eric used as it
explicitly considers if a node has other POIs in the same building, but
Eric's result was conservative in finding that it is at least 10:3 in favour
of addresses on the way.
From: Clifford Snow [mailto:clifford at snowandsnow.us]
Sent: Thursday, October 24, 2013 7:17 PM
To: Alex Barth
Cc: imports at openstreetmap.org
Subject: Re: [Imports] NYC building + address import - to merge or not to
merge?
On Thu, Oct 24, 2013 at 5:57 PM, Alex Barth <alex at mapbox.com> wrote:
Eric Fischer and I got curious, he just ran numbers on the entire planet, I
posted a summary here: http://www.openstreetmap.org/user/lxbarth/diary/20261
The short is that for better or worse, tagging addresses on buildings where
possible is most common in OSM. Whether that's good or bad is a different
discussion, for OSM NYC we'll stick to this convention. Especially as the
location of the address point is not always meaningful in this dataset.
Can you post a howto on how you pulled the data? I'm struggling trying to
get address info out.
Thanks,
--
Clifford
OpenStreetMap: Maps with a human touch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/imports/attachments/20131024/ab22f664/attachment.html>
More information about the Imports
mailing list