/** * 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; }
@Override public OGCPoint pointN(int n) { int nn; if (n == multiPath.getPathSize(0)) { nn = multiPath.getPathStart(0); } else nn = multiPath.getPathStart(0) + n; return (OGCPoint) OGCGeometry.createFromEsriGeometry( multiPath.getPoint(nn), esriSR); } }
@Override public OGCPoint pointN(int n) { int nn; if (n == multiPath.getPathSize(0)) { nn = multiPath.getPathStart(0); } else nn = multiPath.getPathStart(0) + n; 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); }
/** * 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); }
Point2D v_2 = new Point2D(); MultiPathImpl src_mp = (MultiPathImpl) src._getImpl(); int path_size = src.getPathSize(ipath); int path_start = src.getPathStart(ipath); for (int i = 0, n = src.getPathSize(ipath); i < n; i++) { src_mp.getXY(path_start + i, pt_1); src_mp.getXY(path_start + (i + 1) % path_size, pt_2);
if (multi_path.getPathSize(ipath) < 2) return newgeom; //return empty geometry
Point2D v_2 = new Point2D(); MultiPathImpl src_mp = (MultiPathImpl) src._getImpl(); int path_size = src.getPathSize(ipath); int path_start = src.getPathStart(ipath); for (int i = 0, n = src.getPathSize(ipath); i < n; i++) { src_mp.getXY(path_start + i, pt_1); src_mp.getXY(path_start + (i + 1) % path_size, pt_2);
if (multi_path.getPathSize(ipath) < 2) return newgeom; //return empty geometry
jsonWriter.addValueArray(); int startindex = pp.getPathStart(i); int numVertices = pp.getPathSize(i); double startx = 0.0, starty = 0.0, startz = NumberUtils.NaN(), startm = NumberUtils.NaN(); double z = NumberUtils.NaN(), m = NumberUtils.NaN();
jsonWriter.addValueArray(); int startindex = pp.getPathStart(i); int numVertices = pp.getPathSize(i); double startx = 0.0, starty = 0.0, startz = NumberUtils.NaN(), startm = NumberUtils.NaN(); double z = NumberUtils.NaN(), m = NumberUtils.NaN();
if (multi_path_b.getPathSize(ipath) > 0)
if (multi_path_b.getPathSize(ipath) > 0)