Closed jheer closed 7 months ago
Hi! Thanks for reporting this issue. Thankfully this is already fixed in #226
Sorry, just saw that this was in ST_READ. Yes, the problem is that even though GDAL supports it DuckDB will reject any geometries containig z-values when it reada from GDAL. We could probably relax this though so that we just drop the z axis. Will look into it!
Thanks!! I would love to see this addition and we'd make good use of it in the Mosaic project.
DuckDB Spatial now supports coordinates with Z and M values properly, so this is now possible without information loss!
Some GeoJSON files may include 3D points -- geometries whose coordinates can contain 3 dimensions. This is a valid part of the GeoJSON specification. Here's one example of this in the wild, from the USGS: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.geojson
At first glance, it looks like this is supported by GDAL (though to be fair I did not look very deep):
However, trying to read such a file with the
spatial
extension fails. If you run the following in DuckDB v0.9.2:The result is:
Even if DuckDB
spatial
does not support points other than Point2D, it would be useful to be able to parse the first two coordinates (e.g., lat/lon) rather than fail with an error. Thanks!