<div dir="ltr"><div>Dear All</div><div><br></div><div>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)</div>

<div><br></div><div>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.</div><div><br></div>

<div>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.</div><div><br></div><div><br></div><div>The idea is to classify each poi by a unique Identifier based on the value of the tags in the database</div>

<div><br></div><div>classifications can then be associated to each unique identifier to display on the map and thus a unique icon.</div><div><br></div><div>Consider this like a "Grouping of Similar Poi's"</div>

<div><br></div><div>(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)</div><div><br></div><div>(All tests are done on values converted to Upper Case with Lead and Trailing Spaces stripped)</div>

<div><br></div><div>Unique Identifiers are determined by the following logic:</div><div><br></div><div>for all amenitiy tags that have a value and where shop tags do NOT have a value - Save Value as a Classification</div>

<div>for all shop tags that are non null and have not already been classified - Save Value as Classification</div><div>for all craft tags that are non null and have not already been classified - Save Value as Classification</div>

<div>for all leisure tags that are non null and have not already been classified - Save Value as Classification</div><div>for all place:ph tags that are non null and have not already been classified - Save Value as Classification</div>

<div>for all place tags that are non null and have not already been classified - Save Value as Classification</div><div>for all office tags that are non null and have not already been classified - Save Value as Classification</div>

<div>for all tourism tags that are non null and have not already been classified - Save Value as Classification</div><div><br></div><div><br></div><div>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</div>

<div><br></div><div><b>The resultant list of unique Classification's in a spreadsheet can be sen at (its interesting):</b></div><div><b><br></b></div><div><b><a href="https://docs.google.com/spreadsheets/d/1qPztRTpJz3VmHdrcvYs2sOE_h7M0i9McVLZ0WY8-QMI/edit?usp=sharing">https://docs.google.com/spreadsheets/d/1qPztRTpJz3VmHdrcvYs2sOE_h7M0i9McVLZ0WY8-QMI/edit?usp=sharing</a></b></div>

<div><br></div><div><br></div><div><br></div><div>If you are SQL aware, the following sql statements were used (to make it clearer to the Tech People)</div><div><br></div><div><br></div><div> update planet_osm_point set classification = (upper(ltrim(rtrim(amenity)))) where amenity<>'' AND shop is null and classification is null;</div>

<div> update planet_osm_point set classification = (upper(ltrim(rtrim(shop)))) where ( shop <> '' or shop is not null ) and classification is null;</div><div> update planet_osm_point set classification = (upper(ltrim(rtrim(craft)))) where classification is null and ( craft is not null or craft <> '');</div>

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

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

<div> update planet_osm_point set classification = (upper(ltrim(rtrim(tourism)))) where classification is null and ( tourism is not null or tourism <> '');</div><div><br></div><div><div dir="ltr"><div><br></div>

<div>Regards</div><div><br></div><div>Mark Cupitt</div><div><br></div><div>"If we change the world, let it bear the mark of our intelligence"</div><div><a></a><span></span><span></span><div><br></div></div><div>

<a href="https://www.openstreetmap.org/user/Mark_Cupitt" target="_blank">See me on Open StreetMap</a><br></div><div><br></div><div><a href="http://ph.linkedin.com/in/markcupitt" target="_blank">See me on LinkedIn</a></div>

<div><img src="http://s.c.lnkd.licdn.com/scds/common/u/img/webpromo/btn_myprofile_160x33.png"><br></div><div><span style="font-family:'arial black',sans-serif"><b><br><a href="http://gis.stackexchange.com/users/17846/mark-c" target="_blank">See me on StackExchange</a></b></span></div>

<div><img src="http://gis.stackexchange.com/users/flair/17846.png"><br></div><div>===============================================================================================</div><div>The contents of this email are intended only for the individual(s) to whom it is addressed and may contain</div>

<div>confidential or privileged information.  If you are not the intended recipient, you must not disclose, copy, distribute,</div><div>or use the contents of this email.  If you have received this email in error, please notify the sender immediately and</div>

<div>delete the email and any attachments.<br></div><div>
===============================================================================================
</div></div></div>
</div>