[talk-ph] OSMPH POI Classification Analysys

Erwin Olario govvin at gmail.com
Mon May 19 04:22:09 UTC 2014


Good job Mark! Can you generate another without converting the tags to
upper case? Technically, OSM is case-sensitive.

*Erwin Olario*
- - - - - - - - - - - - - - - - - - -
» email: erwin@ <erwin at ngnuity.net>*n**GNU**it**y**.**net*<http://ngnuity.net/>
 | govvin at gmail.com
» mobile: (PHL): +63 908 817 2013 | (USA): +1 347 746 9461
» OpenPGP key: 3A93D56B | 5D42 7CCB 8827 9046 1ACB 0B94 63A4 81CE 3A93 D56B


On Mon, May 19, 2014 at 12:11 PM, Mark Cupitt <markcupitt at gmail.com> wrote:

> 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.
> ===============================================================================================
>
>
> _______________________________________________
> talk-ph mailing list
> talk-ph at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-ph
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ph/attachments/20140519/5543491e/attachment-0001.html>


More information about the talk-ph mailing list