/** * Computes the distance between two {@link Geometry} items, * using the {@link Geometry#distance(Geometry)} method. * * @param item1 an item which is a Geometry * @param item2 an item which is a Geometry * @return the distance between the geometries * @throws ClassCastException if either item is not a Geometry */ public double distance(ItemBoundable item1, ItemBoundable item2) { Geometry g1 = (Geometry) item1.getItem(); Geometry g2 = (Geometry) item2.getItem(); return g1.distance(g2); } }
static public double distance(Geometry arg0,Geometry arg1) { if (arg0 == null || arg1 == null) return -1d; Geometry _this = arg0; return _this.distance(arg1); }
static public double distance(Geometry arg0,Geometry arg1) { Geometry _this = arg0; return _this.distance(arg1); }
/** * @param a Geometry instance or null * @param b Geometry instance or null * @return the 2-dimensional minimum Cartesian distance between two geometries * in projected units (spatial ref units) */ public static Double distance(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.distance(b); } }
/** * @param a Geometry instance or null * @param b Geometry instance or null * @return the 2-dimensional minimum Cartesian distance between two geometries * in projected units (spatial ref units) */ public static Double distance(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.distance(b); } }
/** * @param a Geometry instance or null * @param b Geometry instance or null * @return the 2-dimensional minimum Cartesian distance between two geometries * in projected units (spatial ref units) */ public static Double distance(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.distance(b); } }
public double distance(Geometry g) { return geometry.distance(g); }
@Override public double distanceTo(double x, double y) { return this.geom.distance(geom.getFactory().createPoint(new Coordinate(x, y))); }
public static Double distance(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.distance(g2); }
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { NearFeature s1 = (NearFeature) item1.getItem(); NearFeature s2 = (NearFeature) item2.getItem(); return s1.location.distance(s2.location); } });
public static Double distance(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.distance(g2); }
public static Double distance(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.distance(g2); }
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { NearFeature s1 = (NearFeature) item1.getItem(); NearFeature s2 = (NearFeature) item2.getItem(); return s1.location.distance(s2.location); } });
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { Geometry s1 = (Geometry) item1.getItem(); Geometry s2 = (Geometry) item2.getItem(); return s1.distance(s2); } });
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { Hub s1 = (Hub) item1.getItem(); Hub s2 = (Hub) item2.getItem(); return s1.location.distance(s2.location); } });
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { NearFeature s1 = (NearFeature) item1.getItem(); NearFeature s2 = (NearFeature) item2.getItem(); return s1.location.distance(s2.location); } });
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { NearFeature s1 = (NearFeature) item1.getItem(); NearFeature s2 = (NearFeature) item2.getItem(); return s1.location.distance(s2.location); } });
@Override public Item item(final QueryContext qc, final InputInfo ii) throws QueryException { return Dbl.get(checkGeo(0, qc).distance(checkGeo(1, qc))); } }
@Override public Measure getDistance( Geometry geometry, Unit requestedUnit ) { // TODO respect unit double dist = getJTSGeometry().distance( getAsDefaultGeometry( geometry ).getJTSGeometry() ); return new Measure( Double.toString( dist ), null ); }
@Override public double distance(ItemBoundable item1, ItemBoundable item2) { SimpleFeature s1 = (SimpleFeature) item1.getItem(); SimpleFeature s2 = (SimpleFeature) item2.getItem(); Geometry g1 = (Geometry) s1.getDefaultGeometry(); Geometry g2 = (Geometry) s2.getDefaultGeometry(); return g1.distance(g2); } });