Introduce fast check for boundaries
This commit is contained in:
parent
5f39f05ae0
commit
ed71b91423
1 changed files with 4 additions and 0 deletions
|
@ -303,6 +303,10 @@ public class Multipolygon {
|
||||||
private void updateCacheOfRings() {
|
private void updateCacheOfRings() {
|
||||||
if (outerRings == null) {
|
if (outerRings == null) {
|
||||||
outerRings = Ring.combineToRings(getOuterWays());
|
outerRings = Ring.combineToRings(getOuterWays());
|
||||||
|
maxLat = -90;
|
||||||
|
minLat = 90;
|
||||||
|
maxLon = -180;
|
||||||
|
minLon = 180;
|
||||||
for(Ring r : outerRings) {
|
for(Ring r : outerRings) {
|
||||||
for(Node n : r.getBorder()){
|
for(Node n : r.getBorder()){
|
||||||
maxLat = (float) Math.max(maxLat, n.getLatitude());
|
maxLat = (float) Math.max(maxLat, n.getLatitude());
|
||||||
|
|
Loading…
Reference in a new issue