Closed treinar closed 7 years ago
The current versions of GeoJSONReader and GEOJSONWriter don't handle 3D coordinates. I propose the following changes:
GeoJSONWriter:
double[] convert(Coordinate coordinate) { if(Double.isNaN( coordinate.z )) { return new double[] { coordinate.x, coordinate.y }; } else { return new double[] { coordinate.x, coordinate.y, coordinate.z }; } }
GeoJSONReader:
Coordinate convert(double[] c) { if(c.length == 2){ return new Coordinate(c[0], c[1]); } else{ return new Coordinate(c[0], c[1], c[2]); } }
Thanks for a useful library, btw!
Thanks, seems like a good idea. Can you make it a pull request?
Fixed by #16.
The current versions of GeoJSONReader and GEOJSONWriter don't handle 3D coordinates. I propose the following changes:
GeoJSONWriter:
GeoJSONReader:
Thanks for a useful library, btw!