JuliaGeo / GeoJSON.jl

Utilities for working with GeoJSON data in Julia
https://juliageo.org/GeoJSON.jl/stable/
MIT License
68 stars 10 forks source link

Geometries not being read properly #53

Open marcboschmatas opened 1 year ago

marcboschmatas commented 1 year ago

I've posted a question at Stackoverflow, but I guess I should post it here as well. In a nutshell, I'm reading a layer with census tracts, neighbourhoods, and districts in Barcelona and the census tracts aren't being read properly. It's not a problem with the data, since it reads fine in R. It looks like it's reading the polygon coordinates in the wrong order. Here's the SO question with all the code and plots. https://stackoverflow.com/questions/74126814/geojson-jl-reading-some-geometries-incorrectly

rafaqz commented 1 year ago

This is because the crs in the file is in EPSG:25831 which has an easting/northing order rather than the northing/easting of EPSG:4326/WGS 84.

The new GeoJSON spec no longer supports indluding crs in a GeoJSON file. As this version of the package is very new that is all we support. We could in theory support crs but it would required looking for crs data, adding a Proj.jl dep, and looking up easting/northing order of the points with Proj.jl.

(and usually just post issues like this here, we want to see them and are less likely to on stack overflow)