private Geometry densifySegment(Segment geom) { double length = geom.calculateLength2D(); if (length <= m_maxLength) return (Geometry) geom; Polyline polyline = new Polyline(geom.getDescription()); polyline.addSegment(geom, true); return densifyMultiPath((MultiPath) polyline); }
private Geometry densifySegment(Segment geom) { double length = geom.calculateLength2D(); if (length <= m_maxLength) return (Geometry) geom; Polyline polyline = new Polyline(geom.getDescription()); polyline.addSegment(geom, true); return densifyMultiPath((MultiPath) polyline); }
private static Geom makeLine(Geom... geoms) { final Polyline g = new Polyline(); Point p = null; for (Geom geom : geoms) { if (geom.g() instanceof Point) { final Point prev = p; p = (Point) geom.g(); if (prev != null) { final Line line = new Line(); line.setStart(prev); line.setEnd(p); g.addSegment(line, false); } } } return new SimpleGeom(g); }
private static Geom makeLine(Geom... geoms) { final Polyline g = new Polyline(); Point p = null; for (Geom geom : geoms) { if (geom.g() instanceof Point) { final Point prev = p; p = (Point) geom.g(); if (prev != null) { final Line line = new Line(); line.setStart(prev); line.setEnd(p); g.addSegment(line, false); } } } return new SimpleGeom(g); }
static Geometry normalizeInputGeometry_(Geometry geom) { Geometry.Type gt = geom.getType(); if (gt == Geometry.Type.Envelope) { Polygon poly = new Polygon(geom.getDescription()); if (!geom.isEmpty()) poly.addEnvelope((Envelope) geom, false); return poly; } if (gt == Geometry.Type.Point) { MultiPoint poly = new MultiPoint(geom.getDescription()); if (!geom.isEmpty()) poly.add((Point) geom); return poly; } if (gt == Geometry.Type.Line) { Polyline poly = new Polyline(geom.getDescription()); if (!geom.isEmpty()) poly.addSegment((Segment) geom, true); return poly; } return geom; }
Geometry _ConstructOffset() { int gt = m_inputGeometry.getType().value(); if (gt == Geometry.GeometryType.Line) { return _OffsetLine(); } if (gt == Geometry.GeometryType.Envelope) { return _OffsetEnvelope(); } if (Geometry.isSegment(gt)) { Polyline poly = new Polyline(); poly.addSegment((Segment) m_inputGeometry, true); m_inputGeometry = poly; return _ConstructOffset(); } if (gt == Geometry.GeometryType.Polyline) { Polyline polyline = new Polyline(); _OffsetMultiPath(polyline); return polyline; } if (gt == Geometry.GeometryType.Polygon) { Polygon polygon = new Polygon(); _OffsetMultiPath(polygon); return polygon; } // throw new GeometryException("not implemented"); return null; } }
Geometry _ConstructOffset() { int gt = m_inputGeometry.getType().value(); if (gt == Geometry.GeometryType.Line) { return _OffsetLine(); } if (gt == Geometry.GeometryType.Envelope) { return _OffsetEnvelope(); } if (Geometry.isSegment(gt)) { Polyline poly = new Polyline(); poly.addSegment((Segment) m_inputGeometry, true); m_inputGeometry = poly; return _ConstructOffset(); } if (gt == Geometry.GeometryType.Polyline) { Polyline polyline = new Polyline(); _OffsetMultiPath(polyline); return polyline; } if (gt == Geometry.GeometryType.Polygon) { Polygon polygon = new Polygon(); _OffsetMultiPath(polygon); return polygon; } // throw new GeometryException("not implemented"); return null; } }
static Geometry normalizeInputGeometry_(Geometry geom) { Geometry.Type gt = geom.getType(); if (gt == Geometry.Type.Envelope) { Polygon poly = new Polygon(geom.getDescription()); if (!geom.isEmpty()) poly.addEnvelope((Envelope) geom, false); return poly; } if (gt == Geometry.Type.Point) { MultiPoint poly = new MultiPoint(geom.getDescription()); if (!geom.isEmpty()) poly.add((Point) geom); return poly; } if (gt == Geometry.Type.Line) { Polyline poly = new Polyline(geom.getDescription()); if (!geom.isEmpty()) poly.addSegment((Segment) geom, true); return poly; } return geom; }
polyline.addSegment(seg, true); return isSimpleAsFeature(polyline, spatialReference, bForce, result, progressTracker);
Segment seg = (Segment) geometry; Polyline polyline = new Polyline(seg.getDescription()); polyline.addSegment(seg, true); return simplifyOGC(polyline, spatialReference, bForce, progressTracker);
polyline.addSegment(seg, true); return isSimpleAsFeature(polyline, spatialReference, bForce, result, progressTracker);
Segment seg = (Segment) geometry; Polyline polyline = new Polyline(seg.getDescription()); polyline.addSegment(seg, true); return simplifyOGC(polyline, spatialReference, bForce, progressTracker);
polyline.addSegment((Segment) geometry, true); return polyline;
polyline.addSegment(seg, true); return isSimpleAsFeature(polyline, spatialReference, bForce, result, progressTracker);
polyline.addSegment((Segment) (m_geometry), true); m_geometry = polyline; return buffer_();
Polyline poly = new Polyline(geomRes.getDescription()); if (!geomRes.isEmpty()) poly.addSegment((Segment) geomRes, true); return poly;
polyline.addSegment((Segment) geometry, true); return polyline;
polyline.addSegment((Segment) (m_geometry), true); m_geometry = polyline; return buffer_();
Polyline poly = new Polyline(geomRes.getDescription()); if (!geomRes.isEmpty()) poly.addSegment((Segment) geomRes, true); return poly;
Segment seg = (Segment) geometry; Polyline polyline = new Polyline(seg.getDescription()); polyline.addSegment(seg, true); return simplifyAsFeature(polyline, spatialReference, bForce, progressTracker);