Commit 535434f 1 parent cf69487 commit 535434f Copy full SHA for 535434f
File tree 1 file changed +12
-1
lines changed
com.opendoorlogistics.core/src/com/opendoorlogistics/core/gis/map
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 10
10
import java .util .List ;
11
11
import java .util .Random ;
12
12
13
+
14
+
13
15
import com .opendoorlogistics .api .geometry .LatLong ;
14
16
import com .opendoorlogistics .api .tables .ODLDatastore ;
15
17
import com .opendoorlogistics .api .tables .ODLDatastoreAlterable ;
29
31
import com .opendoorlogistics .core .utils .Colours ;
30
32
import com .opendoorlogistics .core .utils .Pair ;
31
33
import com .opendoorlogistics .core .utils .strings .Strings ;
34
+ import com .vividsolutions .jts .geom .Envelope ;
32
35
33
36
final public class MapUtils {
34
37
@@ -70,7 +73,15 @@ public static LatLongBoundingBox getLatLongBoundingBox(Iterable<? extends Drawab
70
73
if (Strings .isEmpty (legendKeyFilter ) || Strings .equalsStd (pnt .getLegendKey (), legendKeyFilter )){
71
74
if (pnt .getGeometry ()==null ){
72
75
ret .add (pnt );
73
- }else if (pnt .getGeometry ().getWGSCentroid ()!=null ){
76
+ }
77
+ else if (pnt .getGeometry ().getWGSBounds ()!=null ){
78
+ Envelope env = pnt .getGeometry ().getWGSBounds ();
79
+ ret .add (env .getMinY (), env .getMinX ());
80
+ ret .add (env .getMinY (), env .getMaxX ());
81
+ ret .add (env .getMaxY (), env .getMinX ());
82
+ ret .add (env .getMaxY (), env .getMaxX ());
83
+ }
84
+ else if (pnt .getGeometry ().getWGSCentroid ()!=null ){
74
85
ret .add (pnt .getGeometry ().getWGSCentroid ());
75
86
}
76
87
}
You can’t perform that action at this time.
0 commit comments