case 15: case 25: handler = new PolygonHandler(this, gf); break; case 8:
public Object read(ByteBuffer buffer, ShapeType type, boolean flatFeature) { if (type == ShapeType.NULL) { return createNull(); CoordinateSequence coords = readCoordinates(buffer, numPoints, dimensions); return createMulti((LinearRing) shells.get(0), holes); return createMulti((LinearRing) holes.get(0)); } else { final ArrayList holesForShells = assignHolesToShells(shells, holes); Geometry g = buildGeometries(shells, holes, holesForShells);
|| (pointInList(testPt, coordList)))) { isContained = true;
private MultiPolygon createMulti(LinearRing single) { return createMulti(single, java.util.Collections.EMPTY_LIST); }
private MultiPolygon createMulti(LinearRing single) { return createMulti(single, java.util.Collections.EMPTY_LIST); }
public Object read(ByteBuffer buffer, ShapeType type) { if (type == ShapeType.NULL) { return createNull(); Coordinate[] coords = readCoordinates(buffer, numPoints); return createMulti( (LinearRing) shells.get(0) , holes ); org.geotools.util.logging.Logging.getLogger("org.geotools.data.shapefile").warning( "only one hole in this polygon record"); return createMulti( JTSUtilities.reverseRing( (LinearRing) holes.get(0) ) ); final ArrayList holesForShells = assignHolesToShells(shells, holes); Geometry g = buildGeometries(shells, holes, holesForShells);
private MultiPolygon createMulti(LinearRing single) { return createMulti(single, java.util.Collections.EMPTY_LIST); }
/** Each ShapeType corresponds to a handler. In the future this should probably go * else where to allow different handlers, or something... * @throws ShapefileException If the ShapeType is bogus. * @return The correct handler for this ShapeType. Returns a new one. */ public ShapeHandler getShapeHandler() throws ShapefileException { ShapeHandler handler; switch (id) { case 1: case 11: case 21: handler = new PointHandler(this); break; case 3: case 13: case 23: handler = new MultiLineHandler(this); break; case 5: case 15: case 25: handler = new PolygonHandler(this); break; case 8: case 18: case 28: handler = new MultiPointHandler(this); break; default: handler = null; } return handler; }
&& (CGAlgorithms.isPointInRing(testPt, coordList) || (pointInList( testPt, coordList)))) { isContained = true;
public Object read(ByteBuffer buffer, ShapeType type, boolean flatFeature) { if (type == ShapeType.NULL) { return createNull(); CoordinateSequence coords = readCoordinates(buffer, numPoints, dimensions); return createMulti((LinearRing) shells.get(0), holes); return createMulti((LinearRing) holes.get(0)); } else { final ArrayList holesForShells = assignHolesToShells(shells, holes); Geometry g = buildGeometries(shells, holes, holesForShells);
private MultiPolygon createMulti(LinearRing single) { return createMulti(single,java.util.Collections.EMPTY_LIST); }
case 15: case 25: handler = new PolygonHandler(this, gf); break; case 8:
&& (CGAlgorithms.isPointInRing(testPt, coordList) || (pointInList( testPt, coordList)))) { isContained = true;
public Object read(ByteBuffer buffer, ShapeType type, boolean flatFeature) { if (type == ShapeType.NULL) { return createNull(); CoordinateSequence coords = readCoordinates(buffer, numPoints, dimensions); return createMulti((LinearRing) shells.get(0), holes); return createMulti((LinearRing) holes.get(0)); } else { final ArrayList holesForShells = assignHolesToShells(shells, holes); Geometry g = buildGeometries(shells, holes, holesForShells);
case 15: case 25: handler = new PolygonHandler(this, gf); break; case 8:
(CGAlgorithms.isPointInRing(testPt, coordList) || (pointInList(testPt, coordList)))) { isContained = true;