Fix atm amenity

This commit is contained in:
Victor Shcherb 2016-08-12 22:54:33 +02:00
parent 43cee4239f
commit b73e912e23
3 changed files with 13 additions and 6 deletions

View file

@ -71,15 +71,15 @@ public class BinaryInspector {
// test cases show info
if ("test".equals(args[0])) {
in.inspector(new String[]{
// "-vpoi",
"-vpoi",
// "-vmap", "-vmapobjects", // "-vmapcoordinates",
// "-vrouting",
"-vrouting",
// "-vaddress", "-vcities","-vstreetgroups",
// "-vstreets", "-vbuildings", "-vintersections",
// "-lang=ru",
// "-bbox=4.8486,52.3084,4.8747,52.2970",
// "-osm="+System.getProperty("maps.dir")+"/map.obf.osm",
System.getProperty("maps.dir")+"/Gb_england_europe_simple.obf"
System.getProperty("maps.dir")+"/Map.obf"
});
} else {
in.inspector(args);

View file

@ -575,10 +575,10 @@ public class MapPoiTypes {
if (!p.isReference()) {
String key = null;
if (p.isAdditional()) {
key = p.isText() ? p.getOsmTag() :
(p.getOsmTag() + "/" + p.getOsmValue());
key = p.isText() ? p.getRawOsmTag() :
(p.getRawOsmTag() + "/" + p.getOsmValue());
} else {
key = p.getOsmTag() + "/" + p.getOsmValue();
key = p.getRawOsmTag() + "/" + p.getOsmValue();
}
if (poiTypesByTag.containsKey(key)) {
throw new UnsupportedOperationException("!! Duplicate poi type " + key);

View file

@ -48,6 +48,13 @@ public class PoiType extends AbstractPoiType {
return osmTag;
}
public String getRawOsmTag() {
if(isReference()) {
return referenceType.getOsmTag();
}
return osmTag;
}
public void setOsmTag(String osmTag) {
this.osmTag = osmTag;
}