/** * Computes the JTS equivalent of this geometry. */ protected com.vividsolutions.jts.geom.Geometry computeJTSPeer() { return JTSUtils.directPositionToPoint(position); }
/** * Computes the JTS equivalent of this geometry. */ protected com.vividsolutions.jts.geom.Geometry computeJTSPeer() { return JTSUtils.directPositionToPoint(position); }
/** * Returns true if the given position lies in this geometry within the * tolerance of the floating point representation. */ public boolean contains(DirectPosition point) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = JTSUtils.directPositionToPoint(point); return JTSUtils.contains(jtsGeom1, jtsGeom2); }
/** * Returns true if the given position lies in this geometry within the * tolerance of the floating point representation. */ public boolean contains(DirectPosition point) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = JTSUtils.directPositionToPoint(point); return JTSUtils.contains(jtsGeom1, jtsGeom2); }
/** * Returns the manifold dimension of the geometry at the given point. The * point must lie on the geometry. * * For geometries that consist of multiple parts, this returns the dimension * of the part intersecting the given point. When multiple parts coincide * at the given point, this returns the least dimension of those geometries. * Returns Integer.MAX_VALUE if the given point is not on this geometry. */ public final int getDimension(final DirectPosition point) { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); if (jtsGeom instanceof com.vividsolutions.jts.geom.GeometryCollection) { com.vividsolutions.jts.geom.Point p = JTSUtils.directPositionToPoint(point); return getDimension(p, (com.vividsolutions.jts.geom.GeometryCollection) jtsGeom); } else { return jtsGeom.getDimension(); } }
/** * Returns the manifold dimension of the geometry at the given point. The * point must lie on the geometry. * * For geometries that consist of multiple parts, this returns the dimension * of the part intersecting the given point. When multiple parts coincide * at the given point, this returns the least dimension of those geometries. * Returns Integer.MAX_VALUE if the given point is not on this geometry. */ public final int getDimension(final DirectPosition point) { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); if (jtsGeom instanceof com.vividsolutions.jts.geom.GeometryCollection) { com.vividsolutions.jts.geom.Point p = JTSUtils.directPositionToPoint(point); return getDimension(p, (com.vividsolutions.jts.geom.GeometryCollection) jtsGeom); } else { return jtsGeom.getDimension(); } }