public OGCLinearRing(MultiPath mp, int pathIndex, SpatialReference sr, boolean reversed) { super(mp, pathIndex, sr, reversed); if (!mp.isClosedPath(0)) throw new IllegalArgumentException("LinearRing path must be closed"); }
public OGCLinearRing(MultiPath mp, int pathIndex, SpatialReference sr, boolean reversed) { super(mp, pathIndex, sr, reversed); if (!mp.isClosedPath(0)) throw new IllegalArgumentException("LinearRing path must be closed"); }
/** * Returns the segment count in the given multipath path. * * @param pathIndex * The path to determine the segment. * @return The segment of the multipath. */ public int getSegmentCount(int pathIndex) { int segCount = getPathSize(pathIndex); if (!isClosedPath(pathIndex)) segCount--; return segCount; }
/** * Returns the segment count in the given multipath path. * * @param pathIndex * The path to determine the segment. * @return The segment of the multipath. */ public int getSegmentCount(int pathIndex) { int segCount = getPathSize(pathIndex); if (!isClosedPath(pathIndex)) segCount--; return segCount; }
/** * The number of Points in this LineString. */ public int numPoints() { if (multiPath.isEmpty()) return 0; int d = multiPath.isClosedPath(0) ? 1 : 0; return multiPath.getPointCount() + d; }
/** * The number of Points in this LineString. */ public int numPoints() { if (multiPath.isEmpty()) return 0; int d = multiPath.isClosedPath(0) ? 1 : 0; return multiPath.getPointCount() + d; }
/** * Returns the specified Point N in this LineString. * @param n The 0 based index of the Point. */ public OGCPoint pointN(int n) { int nn; if (multiPath.isClosedPath(0) && n == multiPath.getPathSize(0)) { nn = multiPath.getPathStart(0); } else nn = n + multiPath.getPathStart(0); return (OGCPoint) OGCGeometry.createFromEsriGeometry( multiPath.getPoint(nn), esriSR); }
/** * Returns the specified Point N in this LineString. * @param n The 0 based index of the Point. */ public OGCPoint pointN(int n) { int nn; if (multiPath.isClosedPath(0) && n == multiPath.getPathSize(0)) { nn = multiPath.getPathStart(0); } else nn = n + multiPath.getPathStart(0); return (OGCPoint) OGCGeometry.createFromEsriGeometry( multiPath.getPoint(nn), esriSR); }
if (multiPath.isClosedPath(pathIndex)) {
if (multiPath.isClosedPath(pathIndex)) {
if (multipath.isClosedPath(ipart)) pointCount++; } else
if (multipath.isClosedPath(ipart)) pointCount++; } else
double startx = 0.0, starty = 0.0, startz = NumberUtils.NaN(), startm = NumberUtils.NaN(); double z = NumberUtils.NaN(), m = NumberUtils.NaN(); boolean bClosed = pp.isClosedPath(i); for (int j = startindex; j < startindex + numVertices; j++) { pp.getXY(j, pt);
double startx = 0.0, starty = 0.0, startz = NumberUtils.NaN(), startm = NumberUtils.NaN(); double z = NumberUtils.NaN(), m = NumberUtils.NaN(); boolean bClosed = pp.isClosedPath(i); for (int j = startindex; j < startindex + numVertices; j++) { pp.getXY(j, pt);