/** * A shortcut for getDescription().hasAttribute() * @param semantics The VertexDescription.Semantics to check. * @return Return true if the attribute is present. */ public boolean hasAttribute(int semantics) { return getDescription().hasAttribute(semantics); }
/** * A shortcut for getDescription().hasAttribute() * @param semantics The VertexDescription.Semantics to check. * @return Return true if the attribute is present. */ public boolean hasAttribute(int semantics) { return getDescription().hasAttribute(semantics); }
public int coordinateDimension() { int d = 2; if (getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.M)) d++; if (getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.Z)) d++; return d; }
static Geometry calculate_boundary(Geometry geom, ProgressTracker progress_tracker) { Geometry res = Boundary.calculate(geom, progress_tracker); if (res == null) return new Point(geom.getDescription());// cannot return null else return res; }
static Geometry calculate_boundary(Geometry geom, ProgressTracker progress_tracker) { Geometry res = Boundary.calculate(geom, progress_tracker); if (res == null) return new Point(geom.getDescription());// cannot return null else return res; }
public int coordinateDimension() { int d = 2; if (getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.M)) d++; if (getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.Z)) d++; return d; }
public boolean isMeasured() { return getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.M); }
public boolean is3D() { return getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.Z); }
public boolean isMeasured() { return getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.M); }
public boolean is3D() { return getEsriGeometry().getDescription().hasAttribute( VertexDescription.Semantics.Z); }
@Override public OGCGeometry boundary() { return new OGCMultiPoint(new MultiPoint(getEsriGeometry() .getDescription()), esriSR);// return empty point }
@Override public OGCGeometry boundary() { return new OGCMultiPoint(new MultiPoint(getEsriGeometry() .getDescription()), esriSR);// return empty point }
/** Returns the z-value of the first coordinate of {@code geom}. */ public static Double ST_Z(Geom geom) { return geom.g().getDescription().hasZ() && geom.g() instanceof Point ? ((Point) geom.g()).getZ() : null; }
/** Returns the z-value of the first coordinate of {@code geom}. */ public static Double ST_Z(Geom geom) { return geom.g().getDescription().hasZ() && geom.g() instanceof Point ? ((Point) geom.g()).getZ() : null; }
Geometry normalizeIntersectionOutput(Geometry geom, int GT_1, int GT_2) { if (GT_1 == Geometry.GeometryType.Point || GT_2 == Geometry.GeometryType.Point) { assert (geom.getType().value() == Geometry.GeometryType.Point); } if (GT_1 == Geometry.GeometryType.MultiPoint) { if (geom.getType().value() == Geometry.GeometryType.Point) { MultiPoint mp = new MultiPoint(geom.getDescription()); if (!geom.isEmpty()) mp.add((Point) geom); return mp; } } return geom; }
Geometry normalizeIntersectionOutput(Geometry geom, int GT_1, int GT_2) { if (GT_1 == Geometry.GeometryType.Point || GT_2 == Geometry.GeometryType.Point) { assert (geom.getType().value() == Geometry.GeometryType.Point); } if (GT_1 == Geometry.GeometryType.MultiPoint) { if (geom.getType().value() == Geometry.GeometryType.Point) { MultiPoint mp = new MultiPoint(geom.getDescription()); if (!geom.isEmpty()) mp.add((Point) geom); return mp; } } return geom; }
static Geometry _denormalizeGeometry(Geometry geom, Geometry geomA, Geometry geomB) { Geometry.Type gtA = geomA.getType(); Geometry.Type gtB = geomB.getType(); Geometry.Type gt = geom.getType(); if (gt == Geometry.Type.MultiPoint) { if (gtA == Geometry.Type.Point || gtB == Geometry.Type.Point) { MultiPoint mp = (MultiPoint) geom; if (mp.getPointCount() <= 1) { Point pt = new Point(geom.getDescription()); if (!mp.isEmpty()) mp.getPointByVal(0, pt); return (Geometry) pt; } } } return geom; }
private Geometry bufferEnvelope_() { Polygon polygon = new Polygon(m_geometry.getDescription()); if (m_distance <= 0) { if (m_distance == 0) polygon.addEnvelope((Envelope) (m_geometry), false); else { Envelope env = new Envelope(); m_geometry.queryEnvelope(env); env.inflate(m_distance, m_distance); polygon.addEnvelope(env, false); } return polygon;// nothing is easier than negative buffer on the // envelope. } polygon.addEnvelope((Envelope) (m_geometry), false); m_geometry = polygon; return bufferConvexPath_(polygon, 0); }
@Override public OGCGeometry boundary() { if (isEmpty()) return new OGCMultiPoint(this.getEsriSpatialReference()); if (isClosed()) return new OGCMultiPoint(new MultiPoint(getEsriGeometry() .getDescription()), esriSR);// return empty multipoint; else return new OGCMultiPoint(startPoint(), endPoint()); } }
@Override public OGCGeometry boundary() { if (isEmpty()) return new OGCMultiPoint(this.getEsriSpatialReference()); if (isClosed()) return new OGCMultiPoint(new MultiPoint(getEsriGeometry() .getDescription()), esriSR);// return empty multipoint; else return new OGCMultiPoint(startPoint(), endPoint()); } }