This commit is contained in:
Victor Shcherb 2016-06-15 16:54:09 +02:00
parent dd94f5f810
commit c71aeafdc1
2 changed files with 10 additions and 5 deletions

View file

@ -70,14 +70,14 @@ public class BinaryInspector {
// test cases show info // test cases show info
if ("test".equals(args[0])) { if ("test".equals(args[0])) {
in.inspector(new String[]{ in.inspector(new String[]{
"-vpoi", // "-vpoi",
// "-vmap", "-vmapobjects", // "-vmapcoordinates", // "-vmap", "-vmapobjects", // "-vmapcoordinates",
// "-vrouting", // "-vrouting",
// "-vaddress", "-vcities","-vstreetgroups", "-vaddress", "-vcities","-vstreetgroups",
// "-vstreets", "-vbuildings", "-vintersections", "-vstreets", "-vbuildings", "-vintersections",
// "-bbox=28.7379,50.186,28.7471,50.183", // "-bbox=12.8145,50.8025,12.9107,50.7365",
// "-osm="+System.getProperty("maps.dir")+"/map.obf.osm" // "-osm="+System.getProperty("maps.dir")+"/map.obf.osm"
System.getProperty("maps.dir")+"/Ukraine_merge.road.obf" System.getProperty("maps.dir")+"/Map.obf"
}); });
} else { } else {
in.inspector(args); in.inspector(args);

View file

@ -2,6 +2,7 @@ package net.osmand.osm.edit;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.osm.edit.OSMSettings.OSMTagKey; import net.osmand.osm.edit.OSMSettings.OSMTagKey;
import net.osmand.util.Algorithms;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
@ -257,6 +258,10 @@ public abstract class Entity implements Serializable {
public Set<String> getIsInNames() { public Set<String> getIsInNames() {
String values = getTag(OSMTagKey.IS_IN); String values = getTag(OSMTagKey.IS_IN);
if (values == null) { if (values == null) {
String city = getTag(OSMTagKey.ADDR_CITY);
if(!Algorithms.isEmpty(city)) {
return Collections.singleton(city.trim());
}
return Collections.emptySet(); return Collections.emptySet();
} }
if (values.indexOf(';') != -1) { if (values.indexOf(';') != -1) {