2010-04-27 23:42:19 +02:00
|
|
|
package com.osmand.osm;
|
|
|
|
|
|
|
|
public class OSMSettings {
|
|
|
|
|
|
|
|
public enum OSMTagKey {
|
|
|
|
NAME("name"),
|
|
|
|
// ways
|
|
|
|
HIGHWAY("highway"),
|
|
|
|
BUILDING("building"),
|
|
|
|
|
|
|
|
// address
|
|
|
|
PLACE("place"),
|
|
|
|
ADDR_HOUSE_NUMBER("addr:housenumber"),
|
|
|
|
ADDR_STREET("addr:street"),
|
|
|
|
|
|
|
|
// POI
|
|
|
|
AMENITY("amenity"),
|
|
|
|
SHOP("shop"),
|
2010-04-30 00:47:07 +02:00
|
|
|
LEISURE("leisure"),
|
|
|
|
TOURISM("tourism"),
|
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){
|
|
|
|
String[] cars = new String[]{"trunk", "motorway", "primary", "secondary", "tertiary", "service", "residential",
|
|
|
|
"trunk_link", "motorway_link", "primary_link", "secondary_link", "residential_link",
|
|
|
|
"tertiary_link", "track" };
|
|
|
|
for(String c : cars){
|
|
|
|
if(c.equals(tagHighway)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|