Opened 10 years ago
Closed 6 years ago
#2901 closed defect (wontfix)
raster gives confusing SRID message when GDAL_DATA path not set
Reported by: | robe | Owned by: | Bborie Park |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.4.5 |
Component: | raster | Version: | master |
Keywords: | Cc: |
Description
I was testing this on 2.1.2 and also 2.2.0 dev. I'm really puzzled where this SRS error is coming from:
I loaded the attached pic with
raster2pgsql -I -e -F -Y pics/*.jpg chicago_pics | psql -U postgres -d pgopen2014
and when I tried to do something like this
SELECT ST_Resize(rast,100,100) FROM chicago_pics WHERE filename='Full_chicago_skyline.jpg';
I got this error:
NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API CONTEXT: SQL function "st_resize" statement 1 ERROR: rt_util_gdal_convert_sr: Could not process the provided srs: EPSG:32731 CONTEXT: SQL function "st_resize" statement 1 ********** Error ********** ERROR: rt_util_gdal_convert_sr: Could not process the provided srs: EPSG:32731 SQL state: XX000 Context: SQL function "st_resize" statement 1
Where is it getting this SRS from. I checked the SRID of this picture
SELECT ST_SRID(rast) FROM chicago_pics WHERE filename='Full_chicago_skyline.jpg'
and it returns 0
Attachments (1)
Change History (11)
by , 10 years ago
Attachment: | Full_chicago_skyline.jpg added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Milestone: | PostGIS 2.1.4 → PostGIS 2.2.0 |
---|---|
Version: | 2.1.x → trunk |
This might be a 2.2 bug or something wrong with my raster2pgsql 2.2. I just reloaded using the raster2pgsql from my 2.1.2 install and it doesn't exhibit this behavior. does the right thing.
I'll retest later with latest 2.2 raster2pgsql to be sure.
comment:3 by , 10 years ago
Summary: | raster trying to use strange SRID → raster gives confusing SRID message when GDAL_DATA path not set |
---|
I isolated the issue to it happens when my GDAL_DATA path is not set right and postgis_full_version() gives -- GDAL_DATA not found
Couldn't figure out what was wrong with my path, so I retyped it and it worked. That solved the error.
I still think there is something wrong here though. Why does it even talk about a non-existent SRID. Almost like its confusing nodata value with an srid or something.
Tested with:
POSTGIS="2.2.0dev r12953" GEOS="3.5.0dev-CAPI-1.9.0 r3989" SFCGAL="1.0.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.7.8" LIBJSON="0.12" TOPOLOGY RASTER
and if I get rid of my path so I get:
POSTGIS="2.2.0dev r12953" GEOS="3.5.0dev-CAPI-1.9.0 r3989" SFCGAL="1.0.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.0, released 2014/04/16 GDAL_DATA not found" LIBXML="2.7.8" LIBJSON="0.12" TOPOLOGY RASTER
Then this very confusing message comes up.
comment:4 by , 10 years ago
Priority: | medium → high |
---|
comment:5 by , 9 years ago
Milestone: | PostGIS 2.2.0 → PostGIS 2.1.9 |
---|
since this is both a postgis 2.2 and 2.1 issue moved to 2.1.9. to get it out of our 2.2 list.
comment:6 by , 7 years ago
Milestone: | PostGIS 2.1.9 → PostGIS 2.2.6 |
---|
comment:7 by , 7 years ago
Milestone: | PostGIS 2.2.6 → PostGIS 2.2.7 |
---|
comment:8 by , 7 years ago
Milestone: | PostGIS 2.2.7 → PostGIS 2.5.0 |
---|
comment:9 by , 6 years ago
Milestone: | PostGIS 2.5.0 → PostGIS 2.4.5 |
---|
comment:10 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I don't have existing data to test this and haven't run into issues lately with loading pictures
Forgot to mention my versions
Output: 2.2
Output 2.1
It did occur to me that while I was testing on 2.2 and 2.1.2 I did load with raster2pgsql from 2.2 (and since my GDAL data folder seems out of place might be just an issue that affects me).