/** * Gets the length of the minimum diameter of the input Geometry * * @return the length of the minimum diameter */ public double getLength() { computeMinimumDiameter(); return minWidth; }
/** * Gets the {@link Coordinate} forming one end of the minimum diameter * * @return a coordinate forming one end of the minimum diameter */ public Coordinate getWidthCoordinate() { computeMinimumDiameter(); return minWidthPt; }
/** * Gets the segment forming the base of the minimum diameter * * @return the segment forming the base of the minimum diameter */ public LineString getSupportingSegment() { computeMinimumDiameter(); return inputGeom.getFactory().createLineString(new Coordinate[] { minBaseSeg.p0, minBaseSeg.p1 } ); }
/** * Gets a {@link LineString} which is a minimum diameter * * @return a {@link LineString} which is a minimum diameter */ public LineString getDiameter() { computeMinimumDiameter(); // return empty linestring if no minimum width calculated if (minWidthPt == null) return inputGeom.getFactory().createLineString((Coordinate[])null); Coordinate basePt = minBaseSeg.project(minWidthPt); return inputGeom.getFactory().createLineString(new Coordinate[] { basePt, minWidthPt } ); }
/** * Gets the {@link Coordinate} forming one end of the minimum diameter * * @return a coordinate forming one end of the minimum diameter */ public Coordinate getWidthCoordinate() { computeMinimumDiameter(); return minWidthPt; }
/** * Gets the length of the minimum diameter of the input Geometry * * @return the length of the minimum diameter */ public double getLength() { computeMinimumDiameter(); return minWidth; }
/** * Gets the segment forming the base of the minimum diameter * * @return the segment forming the base of the minimum diameter */ public LineString getSupportingSegment() { computeMinimumDiameter(); return inputGeom.getFactory().createLineString(new Coordinate[] { minBaseSeg.p0, minBaseSeg.p1 } ); }
/** * Gets a {@link LineString} which is a minimum diameter * * @return a {@link LineString} which is a minimum diameter */ public LineString getDiameter() { computeMinimumDiameter(); // return empty linestring if no minimum width calculated if (minWidthPt == null) return inputGeom.getFactory().createLineString((Coordinate[])null); Coordinate basePt = minBaseSeg.project(minWidthPt); return inputGeom.getFactory().createLineString(new Coordinate[] { basePt, minWidthPt } ); }