[talk-ph] OSMPH POI Classification Analysys

Mark Cupitt markcupitt at gmail.com
Mon May 19 04:11:14 UTC 2014


Dear All

I have analyzed the OSM POI database in Postgres from the Philippines OSM
Imports and have applied the following logic to determine unique POI's from
the OSM Philippines data (Nodes not associated with ways)

You guys all know the tagging scheme very well and I would appreciate it if
anyone can see any flaws in the logic or tags I have missed that should be
evaluated, please let me know.

Also, if anyone would be willing to help by assigning icons to to these
classifications using a spreadsheet, it would be of immense help. Please
contact me.


The idea is to classify each poi by a unique Identifier based on the value
of the tags in the database

classifications can then be associated to each unique identifier to display
on the map and thus a unique icon.

Consider this like a "Grouping of Similar Poi's"

(NOTE: Military, Bridges, Tunnels, Culverts, wetland, aeroway, aerial_way,
area, barrier, harbor will be handled on the base map, not as POI's if
possible)

(All tests are done on values converted to Upper Case with Lead and
Trailing Spaces stripped)

Unique Identifiers are determined by the following logic:

for all amenitiy tags that have a value and where shop tags do NOT have a
value - Save Value as a Classification
for all shop tags that are non null and have not already been classified -
Save Value as Classification
for all craft tags that are non null and have not already been classified -
Save Value as Classification
for all leisure tags that are non null and have not already been classified
- Save Value as Classification
for all place:ph tags that are non null and have not already been
classified - Save Value as Classification
for all place tags that are non null and have not already been classified -
Save Value as Classification
for all office tags that are non null and have not already been classified
- Save Value as Classification
for all tourism tags that are non null and have not already been classified
- Save Value as Classification


There are a total of 10,680,563 records in the POI database (Unique Nodes
with tags present) and this logic accounted for all of them

*The resultant list of unique Classification's in a spreadsheet can be sen
at (its interesting):*

*https://docs.google.com/spreadsheets/d/1qPztRTpJz3VmHdrcvYs2sOE_h7M0i9McVLZ0WY8-QMI/edit?usp=sharing
<https://docs.google.com/spreadsheets/d/1qPztRTpJz3VmHdrcvYs2sOE_h7M0i9McVLZ0WY8-QMI/edit?usp=sharing>*



If you are SQL aware, the following sql statements were used (to make it
clearer to the Tech People)


 update planet_osm_point set classification =
(upper(ltrim(rtrim(amenity)))) where amenity<>'' AND shop is null and
classification is null;
 update planet_osm_point set classification = (upper(ltrim(rtrim(shop))))
where ( shop <> '' or shop is not null ) and classification is null;
 update planet_osm_point set classification = (upper(ltrim(rtrim(craft))))
where classification is null and ( craft is not null or craft <> '');
 update planet_osm_point set classification =
(upper(ltrim(rtrim(leisure)))) where classification is null and ( leisure
is not null or leisure <> '');
 update planet_osm_point set classification =
(upper(ltrim(rtrim('place:ph')))) where classification is null and (
'place:ph' is not null or 'place:ph' <> '');
 update planet_osm_point set classification = (upper(ltrim(rtrim(place))))
where classification is null and ( place is not null or place <> '');

 update planet_osm_point set classification = (upper(ltrim(rtrim(office))))
where classification is null and ( office is not null or office <> '');
 update planet_osm_point set classification =
(upper(ltrim(rtrim(tourism)))) where classification is null and ( tourism
is not null or tourism <> '');


Regards

Mark Cupitt

"If we change the world, let it bear the mark of our intelligence"

See me on Open StreetMap <https://www.openstreetmap.org/user/Mark_Cupitt>

See me on LinkedIn <http://ph.linkedin.com/in/markcupitt>


*See me on StackExchange <http://gis.stackexchange.com/users/17846/mark-c>*

===============================================================================================
The contents of this email are intended only for the individual(s) to whom
it is addressed and may contain
confidential or privileged information. If you are not the intended
recipient, you must not disclose, copy, distribute,
or use the contents of this email. If you have received this email in
error, please notify the sender immediately and
delete the email and any attachments.
===============================================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ph/attachments/20140519/97deb2b3/attachment.html>


More information about the talk-ph mailing list