/** */ public int getLength(Object geometry) { MultiLineString multi = (MultiLineString) geometry; int numlines; int numpoints; int length; numlines = multi.getNumGeometries(); numpoints = multi.getNumPoints(); if (shapeType == ShapeType.ARC) { length = 44 + (4 * numlines) + (numpoints * 16); } else if (shapeType == ShapeType.ARCM) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints); } else if (shapeType == ShapeType.ARCZ) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints) + 8 + 8 + (8 * numpoints); } else { throw new IllegalStateException("Expected ShapeType of Arc, got " + shapeType); } return length; }
/** */ public int getLength(final Object _geometry) { final MultiLineString multi = (MultiLineString) _geometry; int numlines; int numpoints; int length; numlines = multi.getNumGeometries(); numpoints = multi.getNumPoints(); if (shapeType_ == ShapeType.ARC) { length = 44 + (4 * numlines) + (numpoints * 16); } else if (shapeType_ == ShapeType.ARCM) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints); } else if (shapeType_ == ShapeType.ARCZ) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints) + 8 + 8 + (8 * numpoints); } else { throw new IllegalStateException("Expected ShapeType of Arc, got " + shapeType_); } return length; }
/** */ public int getLength(Object geometry) { MultiLineString multi = (MultiLineString) geometry; int numlines; int numpoints; int length; numlines = multi.getNumGeometries(); numpoints = multi.getNumPoints(); if (shapeType == ShapeType.ARC) { length = 44 + (4 * numlines) + (numpoints * 16); } else if (shapeType == ShapeType.ARCM) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints); } else if (shapeType == ShapeType.ARCZ) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints) + 8 + 8 + (8 * numpoints); } else { throw new IllegalStateException("Expected ShapeType of Arc, got " + shapeType); } return length; }
/** */ public int getLength(Object geometry) { MultiLineString multi = (MultiLineString) geometry; int numlines; int numpoints; int length; numlines = multi.getNumGeometries(); numpoints = multi.getNumPoints(); if (shapeType == ShapeType.ARC) { length = 44 + (4 * numlines) + (numpoints * 16); } else if (shapeType == ShapeType.ARCM) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints); } else if (shapeType == ShapeType.ARCZ) { length = 44 + (4 * numlines) + (numpoints * 16) + 8 + 8 + (8 * numpoints) + 8 + 8 + (8 * numpoints); } else { throw new IllegalStateException("Expected ShapeType of Arc, got " + shapeType); } return length; }
final int npoints = multi.getNumPoints(); _buffer.putInt(npoints);
int npoints = multi.getNumPoints(); buffer.putInt(npoints);
final CoordinateSequence[] lines = new CoordinateSequence[numParts]; final double[] zExtreame = {Double.NaN, Double.NaN}; final int npoints = multi.getNumPoints();
private static byte[] serialize(MultiLineString multiLineString) { int numPoints = multiLineString.getNumPoints(); int numParts = multiLineString.getNumGeometries(); ByteBuffer buffer = newBuffer(calculateBufferSize(numPoints, numParts)); putHeader(buffer, ShapeType.POLYLINE, numPoints, numParts); int offset = 0; for (int i = 0; i < numParts; i++) { buffer.putInt(offset); offset += multiLineString.getGeometryN(i).getNumPoints(); } for (int i = 0; i < numParts; i++) { putPoints(buffer, (LineString) multiLineString.getGeometryN(i)); } return buffer.array(); }
final CoordinateSequence[] lines = new CoordinateSequence[numParts]; final double[] zExtreame = {Double.NaN, Double.NaN}; final int npoints = multi.getNumPoints();
private static byte[] serialize(MultiLineString multiLineString) { int numPoints = multiLineString.getNumPoints(); int numParts = multiLineString.getNumGeometries(); ByteBuffer buffer = newBuffer(calculateBufferSize(numPoints, numParts)); putHeader(buffer, ShapeType.POLYLINE, numPoints, numParts); int offset = 0; for (int i = 0; i < numParts; i++) { buffer.putInt(offset); offset += multiLineString.getGeometryN(i).getNumPoints(); } for (int i = 0; i < numParts; i++) { putPoints(buffer, (LineString) multiLineString.getGeometryN(i)); } return buffer.array(); }
int npoints = multi.getNumPoints(); buffer.putInt(npoints);
int npoints = multi.getNumPoints(); buffer.putInt(npoints);
int npoints = multi.getNumPoints(); buffer.putInt(npoints);