Centroid evaluation
This commit is contained in:
parent
54e2b190d1
commit
888ff97c50
|
@ -150,8 +150,8 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
GCubeSDILayer.BBOX bbox = GCubeSDILayer.BBOX.fromGeoJSON(object.getBbox());
|
||||
|
||||
log.info("Found declared BBOX {} ", bbox);
|
||||
Double pointX = (bbox.getMaxX() - bbox.getMinX());
|
||||
Double pointY = bbox.getMaxY() - bbox.getMinY();
|
||||
Double pointX = (bbox.getMaxX() + bbox.getMinX())/2;
|
||||
Double pointY = (bbox.getMaxY() + bbox.getMinY())/2;
|
||||
String wkt = String.format("POINT (%1$f %2$f) ",
|
||||
pointX, pointY);
|
||||
|
||||
|
@ -183,8 +183,8 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
if(toSet== null)
|
||||
throw new IndexingException("No BBOX has been evaluated from project");
|
||||
|
||||
Double pointX=(toSet.getMaxX()-toSet.getMinX());
|
||||
Double pointY = toSet.getMaxY()-toSet.getMinY();
|
||||
Double pointX=(toSet.getMaxX()+toSet.getMinX())/2;
|
||||
Double pointY = (toSet.getMaxY()+toSet.getMinY())/2;
|
||||
log.info("Evaluated BBOX {} ",toSet);
|
||||
String wkt = String .format("POINT (%1$f %2$f) ",
|
||||
pointX, pointY);
|
||||
|
|
Loading…
Reference in New Issue