Top
Best
New

Posted by tosh 1 day ago

GeoJSON(geojson.org)
159 points | 74 commentspage 3
trgn 1 day ago|
nice and simple, great. but because it's json, most parsers are horribly inefficient, which is tough, because a lot of geodata is massive.
jeffbee 1 day ago|
JSON parsing is probably one of the most thoroughly optimized subsystems in the whole industry at this point. Obviously there are ways to encode the same data that are easier to parse (e.g. instead of absolute floating point coordinates, use integer deltas along a path in some reasonable CRS) but because this inefficient representation is so common and so long-standing the parsing is faster than people think.
trgn 1 day ago||
the default parsers all load the entire thing in mem, which is not good.

so you need a stream-based parser, which nobody does an effort to write/use for json. especially since geojson is a web format, and people just default to json.parse, which is blocking. and even then, even if you did use the custom one, it likely won't be a geojson-tailored one, so because key-order isn't guaranteed, any parser for geo-json will need to do some acrobatics to finding the reference-system, dealing with arbitrarily nested geometries etc..

it's a good format for what it is, but it's not a great geo-format. a geo format needs to be easily scannable and, even better, have a geometry index to be able to seek quickly.

kbolino 18 hours ago||
For whatever it's worth, you don't have to write anything special to handle the reference system, because the final, published version of RFC 7946 only allows WGS84 anyway.
vortegne 1 day ago||
Recently I got into cartography software for a bit and the horrors of the data formats in this industry are real. Feels like everyone under the sun has their own.

All that said, GeoJSON was a great change of pace, I enjoyed using it. While I'm no professional and have no idea what the professional needs are, it was very good for my hobbyist needs.

Demiurge 1 day ago||
Also, JSON! Wow.
cyberax 20 hours ago||
To add a bit of negative here: the format is incredibly inefficient in JS, because each point gets expanded into a full-blown JavaScript object.

You can save a lot of RAM by using an array of interleaved coordinates. For an additional bonus, you can also compress rings by storing the ring offsets inside a larger array.

volume_tech 1 day ago|
[dead]