[gdal-dev] Problem exporting from postgis: no valid pixels found
Tom van Tilburg
tom.van.tilburg at gmail.com
Fri Jun 22 01:23:10 PDT 2012
Hi,
It seems since my last update of postgis (2.0.0) and gdal(1.9.1) I can't
get exports from postgis rasters anymore.
This is what happens:
1) Uploaded my raster file with raster2pgsql
2) Check existence of raster data in postgis with:
SELECT (ST_SummaryStats(rast,1)).* FROM tmp.ahn1_sample;
188011;850804.048978517;4.52528867448456;3.79287402253362;-1.10899996757507;21.1429996490479
SELECT (ST_BandMetaData(rast,1)).* FROM tmp.ahn1_sample;
"32BF";-3.40282346638529e+38;f;""
SELECT ST_Value(rast, 1000,1000) FROM tmp.ahn1_sample;
2.8840000629425
3) Get gdalinfo:
gdalinfo -stats "PG:host=localhost dbname='mydbase' user='me'
password='mypass' schema='tmp' table=ahn1_sample"
==========================================================
Driver: PostGISRaster/PostGIS Raster driver
Files: none associated
Size is 1000, 1250
Coordinate System is:
PROJCS["Amersfoort / RD New",
GEOGCS["Amersfoort",
DATUM["Amersfoort",
SPHEROID["Bessel 1841",6377397.155,299.1528128,
AUTHORITY["EPSG","7004"]],
AUTHORITY["EPSG","6289"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4289"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
PROJECTION["Oblique_Stereographic"],
PARAMETER["latitude_of_origin",52.15616055555555],
PARAMETER["central_meridian",5.38763888888889],
PARAMETER["scale_factor",0.9999079],
PARAMETER["false_easting",155000],
PARAMETER["false_northing",463000],
AUTHORITY["EPSG","28992"],
AXIS["X",EAST],
AXIS["Y",NORTH]]
Origin = (140000.000000000000000,606250.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Corner Coordinates:
Upper Left ( 140000.000, 606250.000) ( 5d 9'42.75"E, 53d26'36.33"N)
Lower Left ( 140000.000, 600000.000) ( 5d 9'43.81"E, 53d23'14.15"N)
Upper Right ( 145000.000, 606250.000) ( 5d14'13.67"E, 53d26'36.76"N)
Lower Right ( 145000.000, 600000.000) ( 5d14'14.38"E, 53d23'14.57"N)
Center ( 142500.000, 603125.000) ( 5d11'58.65"E, 53d24'55.48"N)
Band 1 Block=1000x1250 Type=Float32, ColorInterp=Undefined
ERROR 1: PG:host=localhost dbname='mydbase' user='me' password='mypass'
schema='tmp' table=ahn1_sample, band 1: Failed to compute statistics, no
valid pixels found in sampling.
NoData Value=0
Overviews: arbitrary
=================================
As you can see there seem to be no valid pixels in the raster.
Some version outputs:
gdalinfo --version
GDAL 1.9.1, released 2012/05/15
SELECT postgis_raster_lib_version();
"2.0.0 r9605"
I'm curious wether anyone experiences the same. Searches on the web
didn't really turn up with this specific error message.
I can sent the raster sample if needed.
Best regards,
Tom
More information about the gdal-dev
mailing list