I am trying to use ST_Contour() to create contour lines from a raster stored in db.

When I pass:

SELECT ST_Contour(my_raster_column, 1, 5, 0) FROM my_schema.my_table WHEN my_other_column IS NOT NULL

(I am using async python with sqlalchemy/geoalchemy2 and asyncpg) it returns an internal server error that says: "RASTER_Contour: band number must be between 1 and 0 inclusive"

There is only one band in my raster, and as I understand it, that should correspond to and input of '1' for the 'bandnumber' argument.

I have tried everything i can think of including: using explicit type casts, 'bandnumber'=0, (same error) 'bandnumber'=1.0, (same error) 'bandnumber'=0.1 (this one causes a different error: "function st_contour(raster, numeric, integer, integer) does not exist")

0

There are 0 best solutions below