Opened 14 years ago
Last modified 7 years ago
#828 reopened defect
[raster] Loader generates wrong SQL when NODATA for a band is NaN
Reported by: | jorgearevalo | Owned by: | jorgearevalo |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | raster | Version: | master |
Keywords: | loader, nan, gdal | Cc: | sbl |
Description
PostGIS Raster loader must manage the situation when GDAL returns NaN for a band NODATA. Mathieu Basille detected the problem http://postgis.refractions.net/pipermail/postgis-users/2011-February/028850.html
Change History (7)
comment:1 by , 14 years ago
Status: | new → assigned |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I resolve the ticket as fixed. Seems to work fine.
comment:3 by , 11 years ago
Cc: | added |
---|---|
Milestone: | PostGIS 2.0.0 → PostGIS 2.1.4 |
Resolution: | fixed |
Status: | closed → reopened |
Reopening,since the problem seems to reoccure (http://osgeo-org.1560.x6.nabble.com/GRASS-created-geotiff-do-not-properly-load-into-PostGIS-raster2pgsql-tt5140697.html).
Looks like the NaN check in the Python version did not make it to the C-version… Maybe raster2pgsql needs to call CPLIsNan from GDAL explicitly: See: http://osgeo-org.1560.x6.nabble.com/gdal-dev-GDALSetRasterNoDataValue-and-NaN-td4996633.html
follow-up: 5 comment:4 by , 10 years ago
Milestone: | PostGIS 2.1.4 → PostGIS 2.2.0 |
---|
I think strk and dustymugs were planning to do some major rework in 2.2 on raster2pgsql so might be safer to just deal with it then rather than having two drastically different versions.
comment:5 by , 10 years ago
For those affected by this bug: a work around is to create a temporary vrt-file where you define a suitable NoData value, like this:
gdal_translate -of VRT -a_nodata 99999 your_raster.tif your_raster.vrt
The vrt can then be imported to PostGIS using the raster loader…
comment:6 by , 10 years ago
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|
I think is solved in r6815. Waiting for confirmation (works for me)