Update search
This commit is contained in:
parent
c2363f8dd4
commit
71ef807f56
1 changed files with 32 additions and 27 deletions
|
@ -173,7 +173,7 @@ public class GeocodingUtilities {
|
|||
GeocodingResult rs = new GeocodingResult(r);
|
||||
rs.street = (Street) object;
|
||||
rs.city = rs.street.getCity();
|
||||
if(d > THRESHOLD_STREET_CHANGE_CONNECTION_POINT) {
|
||||
if(d < THRESHOLD_STREET_CHANGE_CONNECTION_POINT) {
|
||||
rs.connectionPoint = rs.street.getLocation();
|
||||
}
|
||||
streetsList.add(rs);
|
||||
|
@ -192,6 +192,9 @@ public class GeocodingUtilities {
|
|||
|
||||
final List<GeocodingResult> res = new ArrayList<GeocodingResult>();
|
||||
// FIXME interpolation
|
||||
if(streetsList.size() == 0) {
|
||||
res.add(r);
|
||||
} else {
|
||||
for (GeocodingResult s : streetsList) {
|
||||
final List<GeocodingResult> streetBuildings = new ArrayList<GeocodingResult>();
|
||||
reader.preloadBuildings(s.street, null);
|
||||
|
@ -214,7 +217,8 @@ public class GeocodingUtilities {
|
|||
}
|
||||
while (it.hasNext()) {
|
||||
GeocodingResult nextBld = it.next();
|
||||
if(nextBld.getDistance() > knownMinBuidlingDistance * THRESHOLD_MULTIPLIER_SKIP_BUILDINGS_AFTER) {
|
||||
if (nextBld.getDistance() > knownMinBuidlingDistance
|
||||
* THRESHOLD_MULTIPLIER_SKIP_BUILDINGS_AFTER) {
|
||||
break;
|
||||
}
|
||||
res.add(nextBld);
|
||||
|
@ -222,6 +226,7 @@ public class GeocodingUtilities {
|
|||
}
|
||||
res.add(s);
|
||||
}
|
||||
}
|
||||
Collections.sort(res, DISTANCE_COMPARATOR);
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue