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());
|
GCubeSDILayer.BBOX bbox = GCubeSDILayer.BBOX.fromGeoJSON(object.getBbox());
|
||||||
|
|
||||||
log.info("Found declared BBOX {} ", bbox);
|
log.info("Found declared BBOX {} ", bbox);
|
||||||
Double pointX = (bbox.getMaxX() - bbox.getMinX());
|
Double pointX = (bbox.getMaxX() + bbox.getMinX())/2;
|
||||||
Double pointY = bbox.getMaxY() - bbox.getMinY();
|
Double pointY = (bbox.getMaxY() + bbox.getMinY())/2;
|
||||||
String wkt = String.format("POINT (%1$f %2$f) ",
|
String wkt = String.format("POINT (%1$f %2$f) ",
|
||||||
pointX, pointY);
|
pointX, pointY);
|
||||||
|
|
||||||
|
@ -183,8 +183,8 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
||||||
if(toSet== null)
|
if(toSet== null)
|
||||||
throw new IndexingException("No BBOX has been evaluated from project");
|
throw new IndexingException("No BBOX has been evaluated from project");
|
||||||
|
|
||||||
Double pointX=(toSet.getMaxX()-toSet.getMinX());
|
Double pointX=(toSet.getMaxX()+toSet.getMinX())/2;
|
||||||
Double pointY = toSet.getMaxY()-toSet.getMinY();
|
Double pointY = (toSet.getMaxY()+toSet.getMinY())/2;
|
||||||
log.info("Evaluated BBOX {} ",toSet);
|
log.info("Evaluated BBOX {} ",toSet);
|
||||||
String wkt = String .format("POINT (%1$f %2$f) ",
|
String wkt = String .format("POINT (%1$f %2$f) ",
|
||||||
pointX, pointY);
|
pointX, pointY);
|
||||||
|
|
Loading…
Reference in New Issue