Skip to content
Prev 29100 / 29559 Next

Convert geojson file to R

This seems to be a weird bug in `st_read`. If you read it with an SQL
query that matches every row it works:
Reading query `select * from countrymasks where 1 = 1' from data
source `/home/rowlings/Downloads/countrymasks.geojson' using driver
`GeoJSON'
Simple feature collection with 214 features and 15 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -180 ymin: -55.79439 xmax: 180 ymax: 83.62742
Geodetic CRS:  WGS 84

But leave out the query and you get that C code level error. Another
equivalent query would be "select * from countrymasks" (without the
"where" clause) but this
triggers the error too. Very odd. Worth reporting as a bug?

Barry
On Mon, Nov 28, 2022 at 8:08 PM Miluji Sb <milujisb at gmail.com> wrote: