Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-03-19 07:11:02 -06:00
rodzic 935f2ad9e3
commit c4ddb900a9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -181,9 +181,12 @@ public class StreetAddressOrder extends Test {
if (address instanceof OsmPrimitive && way instanceof Way) {
Node centroid = getCentroid(address);
WaySegment seg = Geometry.getClosestWaySegment((Way) way, (OsmPrimitive) address);
boolean right = Geometry.angleIsClockwise(seg.getFirstNode(), seg.getSecondNode(), centroid);
if (left != right) {
addressesToReturn.add(address);
if (seg.getFirstNode().getEastNorth() != null && seg.getSecondNode().getEastNorth() != null
&& centroid.getEastNorth() != null) {
boolean right = Geometry.angleIsClockwise(seg.getFirstNode(), seg.getSecondNode(), centroid);
if (left != right) {
addressesToReturn.add(address);
}
}
}
}