public int getNumPoints() { int numPoints = shell.getNumPoints(); for (int i = 0; i < holes.length; i++) { numPoints += holes[i].getNumPoints(); } return numPoints; }
private void checkClosedRing(LinearRing ring) { if (! ring.isClosed() ) { Coordinate pt = null; if (ring.getNumPoints() >= 1) pt = ring.getCoordinateN(0); validErr = new TopologyValidationError( TopologyValidationError.RING_NOT_CLOSED, pt); } }
public boolean visitPolygone(final LinearRing _p) { nbPolygone_++; nbPtTotal_ += _p.getNumPoints(); return true; }
public int getNumPoints() { int numPoints = shell.getNumPoints(); for (int i = 0; i < holes.length; i++) { numPoints += holes[i].getNumPoints(); } return numPoints; }
if (shell.getNumPoints() != 5) return false;
/** Does what it says, reverses the order of the Coordinates in the ring. * @param lr The ring to reverse. * @return A new ring with the reversed Coordinates. */ public static final LinearRing reverseRing(final LinearRing lr) { final int numPoints = lr.getNumPoints() - 1; final Coordinate[] newCoords = new Coordinate[numPoints + 1]; for(int t = numPoints; t >= 0; t--) { newCoords[t] = lr.getCoordinateN(numPoints - t); } return factory.createLinearRing(newCoords); }
/** Does what it says, reverses the order of the Coordinates in the ring. * @param lr The ring to reverse. * @return A new ring with the reversed Coordinates. */ public static final LinearRing reverseRing(LinearRing lr) { int numPoints = lr.getNumPoints() - 1; Coordinate[] newCoords = new Coordinate[numPoints + 1]; for(int t = numPoints; t >= 0; t--) { newCoords[t] = lr.getCoordinateN(numPoints - t); } return factory.createLinearRing(newCoords); }
private void checkClosedRing(LinearRing ring) { if (! ring.isClosed() ) { Coordinate pt = null; if (ring.getNumPoints() >= 1) pt = ring.getCoordinateN(0); validErr = new TopologyValidationError( TopologyValidationError.RING_NOT_CLOSED, pt); } }
final int nbPt = frRing_.getNumPoints();
if (shell.getNumPoints() != 5) return false;