geozero icon indicating copy to clipboard operation
geozero copied to clipboard

Documentation for parsing GeoJSON from a file

Open nk9 opened this issue 4 months ago • 6 comments

I am trying to read GeoJSON from a file and iterate through the features in the FeatureCollection with their geom and feature properties. I would have thought this would be a very common use case, but I don't see any documentation giving example code for how to do this. All the examples seem to assume you've got the string of a single geometry in memory already, or that you're using FlatGeobuf (*.fgb) files.

I've found two examples on GitHub, but:

  • geoq: Doesn't use either GeoJsonReader or FeatureProcessor, which seems like it should be the right way…
  • geoarrow: Uses this GeoTableBuilder thing which I think is part of Arrow, and thus not something someone who isn't using Arrow would use.

Have I missed the sample code for this? I'd expect a simple example in the overview on the GeoJsonReader page, and probably in the main README as well.

nk9 avatar Feb 26 '24 16:02 nk9