Add amenity compare
This commit is contained in:
parent
6555001d57
commit
bfae9d6794
2 changed files with 18 additions and 23 deletions
|
@ -72,8 +72,8 @@ public class BinaryInspector {
|
|||
if ("test".equals(args[0])) {
|
||||
in.inspector(new String[] {
|
||||
|
||||
// "-vpoi",
|
||||
"-vmap", "-vmapobjects",
|
||||
"-vpoi",
|
||||
// "-vmap", "-vmapobjects",
|
||||
// "-vmapcoordinates",
|
||||
// "-vrouting",
|
||||
// "-vtransport",
|
||||
|
@ -81,11 +81,9 @@ public class BinaryInspector {
|
|||
// "-vstreets", "-vbuildings", "-vintersections",
|
||||
// "-lang=ru",
|
||||
// "-bbox=30.4981,50.4424,30.5195,50.4351",
|
||||
"-osm="+System.getProperty("maps.dir")+"/map_full_1.obf.osm",
|
||||
System.getProperty("maps.dir")+"/diff/Diff.obf"
|
||||
// System.getProperty("maps.dir")+"/diff/Ukraine_kiev-city_europe.obf"
|
||||
// System.getProperty("maps.dir")+"../temp/kiev/Ukraine_kiev-city_europe_17_06_05.obf",
|
||||
// System.getProperty("maps.dir")+"Ukraine_kiev-city_europe_2.obf",
|
||||
// "-osm="+System.getProperty("maps.dir")+"/map_full_1.obf.osm",
|
||||
System.getProperty("maps.dir")+"/diff/Russia_vladimir_asia_17_08_30_2.obf"
|
||||
// System.getProperty("maps.dir")+"/Ukraine_kiev-city_europe_2.obf"
|
||||
});
|
||||
} else {
|
||||
in.inspector(args);
|
||||
|
|
|
@ -36,8 +36,6 @@ public class Amenity extends MapObject {
|
|||
private String openingHours;
|
||||
private Map<String, String> additionalInfo;
|
||||
private AmenityRoutePoint routePoint; // for search on path
|
||||
private TIntArrayList x;
|
||||
private TIntArrayList y;
|
||||
|
||||
public Amenity() {
|
||||
}
|
||||
|
@ -65,20 +63,6 @@ public class Amenity extends MapObject {
|
|||
this.subType = subType;
|
||||
}
|
||||
|
||||
public TIntArrayList getX() {
|
||||
if (x == null) {
|
||||
x = new TIntArrayList();
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
public TIntArrayList getY() {
|
||||
if (y == null) {
|
||||
y = new TIntArrayList();
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
public String getOpeningHours() {
|
||||
// getAdditionalInfo("opening_hours");
|
||||
return openingHours;
|
||||
|
@ -271,6 +255,19 @@ public class Amenity extends MapObject {
|
|||
setAdditionalInfo(OPENING_HOURS, openingHours);
|
||||
}
|
||||
|
||||
|
||||
public boolean comparePoi(Amenity thatObj) {
|
||||
if (this.id == thatObj.id &&
|
||||
Algorithms.objectEquals(this.type.getKeyName(), thatObj.type.getKeyName()) &&
|
||||
Algorithms.objectEquals(getLocation(), thatObj.getLocation()) &&
|
||||
Algorithms.objectEquals(this.subType, thatObj.subType) &&
|
||||
Algorithms.objectEquals(this.additionalInfo, thatObj.additionalInfo) &&
|
||||
Algorithms.objectEquals(this.getNamesMap(true), thatObj.getNamesMap(true))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(MapObject o) {
|
||||
int cmp = super.compareTo(o);
|
||||
|
|
Loading…
Reference in a new issue