geogson
geogson copied to clipboard
Scientific notation when serializing geometries ?
Hi,
First a caveat: I am new to Java so I am entirely open to the possibility that I am just "doing it wrong". Apologies if I am missing something obvious.
I am trying to write the simplest-dumbest tool to read and write Who's On First GeoJSON files, using geogjson
. For example, files like this:
https://data.whosonfirst.org/1/1.geojson
Reading the files seems fine but when I call gjson.toJson
the output encodes all the coordinates in scientific notation, like this:
https://github.com/aaronland/java-whosonfirst-geojson#usage
The relevant code-y bits are here:
https://github.com/aaronland/java-whosonfirst-geojson/blob/master/src/main/java/org/whosonfirst/geojson/HelloWorld.java#L52-L72
Is this a known-known or have I managed to gloss a simple flag or toggle somewhere ?
Thanks,