Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not implemented Error: Unsupported type for OGR: DECIMAL(#,#) #479

Open
rory-orennia opened this issue Jan 14, 2025 · 2 comments
Open

Not implemented Error: Unsupported type for OGR: DECIMAL(#,#) #479

rory-orennia opened this issue Jan 14, 2025 · 2 comments

Comments

@rory-orennia
Copy link

Similar to #468 it seems like Decimals aren't being converted to be sent to the GDAL driver. Here's a minimal reproduction:

install spatial;
load spatial;
COPY (
  SELECT
      ST_Point(50, 50) AS "geometry",
      CAST(50 AS DECIMAL(9,6)) AS "longitude",
      CAST(50 AS DECIMAL(9,6)) AS "latitude",
) TO 'test.geojson' WITH (FORMAT GDAL, DRIVER 'GeoJSON', LAYER_NAME 'Testing Decimals')

Workaround: Casting it to a FLOAT works

@jakoblo
Copy link

jakoblo commented Feb 21, 2025

I have the same problem when trying to write a shapefile with precision Decimal(8,2). "Not implemented Error: Unsupported type for OGR: DECIMAL(8,2)". Not sure how hard this is to fix but would be nice to have this working correctly. The alias for decimal (numeric) is supported in ogr2ogr as much as i know, but duckdb is converting it back to decimal. Casting it to float is not enough for me. I need shapefile precision.

@frafra
Copy link

frafra commented Feb 24, 2025

Same issue with decimal(#), which is an alias for decimal(#, 0). Casting to integer fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants