"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/shp/PointHandler.java" between
geotools-24.0-project.zip and geotools-24.1-project.zip

About: GeoTools (The Open Source Java GIS Toolkit) is a Java code library which provides standards compliant methods for the manipulation of geospatial data.

PointHandler.java  (geotools-24.0-project):PointHandler.java  (geotools-24.1-project)
skipping to change at line 83 skipping to change at line 83
} }
return length; return length;
} }
public Object read(ByteBuffer buffer, ShapeType type, boolean flatGeometry) { public Object read(ByteBuffer buffer, ShapeType type, boolean flatGeometry) {
if (type == ShapeType.NULL) { if (type == ShapeType.NULL) {
return createNull(); return createNull();
} }
Coordinate c; Coordinate c;
if (shapeType == ShapeType.POINTZ) { if (shapeType == ShapeType.POINTZ && !flatGeometry) {
c = new CoordinateXYZM(); c = new CoordinateXYZM();
} else if (shapeType == ShapeType.POINTM) { } else if (shapeType == ShapeType.POINTM && !flatGeometry) {
c = new CoordinateXYM(); c = new CoordinateXYM();
} else { } else {
c = new CoordinateXY(); c = new CoordinateXY();
} }
c.setX(buffer.getDouble()); c.setX(buffer.getDouble());
c.setY(buffer.getDouble()); c.setY(buffer.getDouble());
if (shapeType == ShapeType.POINTM) { if (shapeType == ShapeType.POINTM && !flatGeometry) {
c.setM(buffer.getDouble()); c.setM(buffer.getDouble());
} }
if (shapeType == ShapeType.POINTZ) { if (shapeType == ShapeType.POINTZ && !flatGeometry) {
c.setZ(buffer.getDouble()); c.setZ(buffer.getDouble());
c.setM(buffer.getDouble()); if (buffer.hasRemaining()) c.setM(buffer.getDouble());
} }
return geometryFactory.createPoint(c); return geometryFactory.createPoint(c);
} }
private Object createNull() { private Object createNull() {
return geometryFactory.createPoint(new Coordinate(Double.NaN, Double.NaN , Double.NaN)); return geometryFactory.createPoint(new Coordinate(Double.NaN, Double.NaN , Double.NaN));
} }
public void write(ByteBuffer buffer, Object geometry) { public void write(ByteBuffer buffer, Object geometry) {
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)