use of org.h2.mvstore.rtree.SpatialKey in project ignite by apache.
the class GridH2SpatialIndex method getEnvelope.
/**
* @param row Row.
* @param rowId Row id.
* @return Envelope.
*/
private SpatialKey getEnvelope(SearchRow row, long rowId) {
Value v = row.getValue(columnIds[0]);
Geometry g = ((ValueGeometry) v.convertTo(Value.GEOMETRY)).getGeometry();
Envelope env = g.getEnvelopeInternal();
return new SpatialKey(rowId, (float) env.getMinX(), (float) env.getMaxX(), (float) env.getMinY(), (float) env.getMaxY());
}
Aggregations