2010-08-17 00:36:24 +02:00
|
|
|
package net.osmand.osm;
|
2010-04-27 23:42:19 +02:00
|
|
|
|
|
|
|
public class OSMSettings {
|
|
|
|
|
|
|
|
public enum OSMTagKey {
|
2010-06-19 19:13:52 +02:00
|
|
|
NAME("name"), //$NON-NLS-1$
|
|
|
|
NAME_EN("name:en"), //$NON-NLS-1$
|
2010-08-04 23:07:15 +02:00
|
|
|
|
2010-04-27 23:42:19 +02:00
|
|
|
// ways
|
2010-06-19 19:13:52 +02:00
|
|
|
HIGHWAY("highway"), //$NON-NLS-1$
|
|
|
|
BUILDING("building"), //$NON-NLS-1$
|
2011-01-10 01:03:40 +01:00
|
|
|
BOUNDARY("boundary"), //$NON-NLS-1$
|
2010-06-19 23:39:03 +02:00
|
|
|
POSTAL_CODE("postal_code"), //$NON-NLS-1$
|
2010-07-01 14:41:57 +02:00
|
|
|
RAILWAY("railway"), //$NON-NLS-1$
|
2010-09-11 12:17:51 +02:00
|
|
|
ONEWAY("oneway"), //$NON-NLS-1$
|
|
|
|
LAYER("layer"), //$NON-NLS-1$
|
|
|
|
BRIDGE("bridge"), //$NON-NLS-1$
|
2010-09-13 20:39:20 +02:00
|
|
|
TUNNEL("tunnel"), //$NON-NLS-1$
|
2010-09-11 12:17:51 +02:00
|
|
|
TOLL("toll"), //$NON-NLS-1$
|
|
|
|
JUNCTION("junction"), //$NON-NLS-1$
|
2010-09-02 13:52:03 +02:00
|
|
|
|
|
|
|
|
2010-06-14 23:14:36 +02:00
|
|
|
// transport
|
2010-06-19 19:13:52 +02:00
|
|
|
ROUTE("route"), //$NON-NLS-1$
|
|
|
|
OPERATOR("operator"), //$NON-NLS-1$
|
|
|
|
REF("ref"), //$NON-NLS-1$
|
2010-04-27 23:42:19 +02:00
|
|
|
|
|
|
|
// address
|
2010-06-19 19:13:52 +02:00
|
|
|
PLACE("place"), //$NON-NLS-1$
|
|
|
|
ADDR_HOUSE_NUMBER("addr:housenumber"), //$NON-NLS-1$
|
|
|
|
ADDR_STREET("addr:street"), //$NON-NLS-1$
|
2010-08-13 01:46:45 +02:00
|
|
|
ADDR_CITY("addr:city"), //$NON-NLS-1$
|
2010-06-19 19:13:52 +02:00
|
|
|
ADDR_POSTCODE("addr:postcode"), //$NON-NLS-1$
|
2010-08-16 00:22:24 +02:00
|
|
|
|
2010-08-04 23:07:15 +02:00
|
|
|
ADDRESS_TYPE("address:type"), //$NON-NLS-1$
|
|
|
|
ADDRESS_HOUSE("address:house"), //$NON-NLS-1$
|
|
|
|
TYPE("type"), //$NON-NLS-1$
|
2010-11-30 20:53:19 +01:00
|
|
|
IS_IN("is_in"), //$NON-NLS-1$
|
2010-04-27 23:42:19 +02:00
|
|
|
|
|
|
|
// POI
|
2010-06-19 19:13:52 +02:00
|
|
|
AMENITY("amenity"), //$NON-NLS-1$
|
|
|
|
SHOP("shop"), //$NON-NLS-1$
|
|
|
|
LEISURE("leisure"), //$NON-NLS-1$
|
|
|
|
TOURISM("tourism"), //$NON-NLS-1$
|
|
|
|
SPORT("sport"), //$NON-NLS-1$
|
|
|
|
HISTORIC("historic"), //$NON-NLS-1$
|
|
|
|
NATURAL("natural"), //$NON-NLS-1$
|
|
|
|
INTERNET_ACCESS("internet_access"), //$NON-NLS-1$
|
2010-06-11 12:28:09 +02:00
|
|
|
|
2010-11-11 23:09:11 +01:00
|
|
|
|
|
|
|
CONTACT_WEBSITE("contact:website"), //$NON-NLS-1$
|
|
|
|
CONTACT_PHONE("contact:phone"), //$NON-NLS-1$
|
|
|
|
|
2010-09-13 20:39:20 +02:00
|
|
|
OPENING_HOURS("opening_hours"), //$NON-NLS-1$
|
2010-11-11 23:09:11 +01:00
|
|
|
PHONE("phone"), //$NON-NLS-1$
|
|
|
|
WEBSITE("website"), //$NON-NLS-1$
|
|
|
|
URL("url"), //$NON-NLS-1$
|
|
|
|
WIKIPEDIA("wikipedia"), //$NON-NLS-1$
|
2010-04-27 23:42:19 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
private final String value;
|
|
|
|
private OSMTagKey(String value) {
|
|
|
|
this.value = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum OSMHighwayTypes {
|
|
|
|
TRUNK, MOTORWAY, PRIMARY, SECONDARY, RESIDENTIAL, TERTIARY, SERVICE, TRACK,
|
|
|
|
|
|
|
|
// TODO is link needed?
|
|
|
|
TRUNK_LINK, MOTORWAY_LINK, PRIMARY_LINK, SECONDARY_LINK, RESIDENTIAL_LINK, TERTIARY_LINK, SERVICE_LINK, TRACK_LINK,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean wayForCar(String tagHighway){
|
|
|
|
if(tagHighway != null){
|
2010-06-19 19:13:52 +02:00
|
|
|
String[] cars = new String[]{"trunk", "motorway", "primary", "secondary", "tertiary", "service", "residential", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
|
|
|
|
"trunk_link", "motorway_link", "primary_link", "secondary_link", "residential_link", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
2010-08-16 00:22:24 +02:00
|
|
|
"tertiary_link", "track", "unclassified" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
2010-04-27 23:42:19 +02:00
|
|
|
for(String c : cars){
|
|
|
|
if(c.equals(tagHighway)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|