@Override public void visit(LineString geom) { writeByteOrder(output); DimensionalFlag dimension = DimensionalFlag.valueOf(geom.is3D(), geom.isMeasured()); writeTypeCodeAndSrid(geom, dimension, output); output.putUInt(geom.getNumPoints()); writePoints(geom.getPoints(), geom.getCoordinateDimension(), output); }
@Override public void visit(LineString<P> geom) { writeByteOrder(output); writeTypeCodeAndSrid(geom, output); if (geom.isEmpty()) { output.putUInt(0); } else { output.putUInt(geom.getNumPositions()); writePoints(geom.getPositions(), geom.getCoordinateDimension(), output); } }
/** * This constructor has been added to speed up object creation of LinearRings * * @param base */ protected LineString(LineString base) { super(base.getCrsId(), base.getGeometryOperations()); this.points = base.points; }