Changes between Initial Version and Version 1 of Ticket #4736


Ignore:
Timestamp:
Jul 6, 2012, 10:31:41 AM (12 years ago)
Author:
dustymugs
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4736 – Description

    initial v1  
    11gdalinfo reports "The block (0,0) is empty", and gdal_translate succeeds, but exports rasters with all zero values.
     2
     3The test raster can be downloaded at:
     4
     5[http://dev.calsurv.org/sft00.zip]
     6
     7The archive is too big to attach to this ticket.  Sorry.
     8
     9The raster was loaded into PostgreSQL using
     10
     11{{{
     12raster2pgsql -s 4326 -t 10x10 -I -C sft00.tif test_1808 | psql -d test
     13}}}
     14
     15If we focus on just one tile (rid=1108)...
     16
     17{{{
     18gdalinfo --debug on -stats "PG:host=localhost dbname=test port=5432 user=postgres table=test_1808 where='rid=1108'"
     19}}}
     20
     21The output...
     22
     23{{{
     24PostGIS_Raster: PostGISRasterDataset::GetConnectionInfo(): Mode: 1
     25Schema: public
     26Table: test_1808
     27Column: rast
     28Where: rid=1108
     29Host: localhost
     30Port: 5432
     31User: postgres
     32Password:
     33Connection String: host=localhost dbname=test port=5432 user=postgres
     34PostGIS_Raster: PostGISRasterDataset::SetRasterProperties(): Query: select cols.column_name from information_schema.constraint_column_usage as cols join information_schema.table_constraints as constr on constr.constraint_name = cols.constraint_name where cols.table_schema = 'public' and cols.table_name = 'test_1808'
     35PostGIS_Raster: PostGISRasterDataset::SetRasterProperties(): Query: select (foo.md).*, foo.rast from (select rast, st_metadata(rast) as md from public.test_1808 where rid=1108) as foo
     36PostGIS_Raster: PostGISRasterDataset::SetRasterProperties(): adfGeoTransform = {-75.784302, 0.204545, 0.000000, 77.680834, 0.000000,-0.204423}
     37PostGIS_Raster: PostGISRasterDataset::SetRasterProperties(): Raster size = (10, 10)
     38PostGIS_Raster: PostGISRasterDataset::SetRasterProperties(): Block dimensions = (10 x 10)
     39PostGIS_Raster: PostGISRasterRasterBand constructor: Band created (srid = 4326)
     40GDAL: GDALOpen(PG:host=localhost dbname=test port=5432 user=postgres table=test_1808 where='rid=1108', this=0x62f650) succeeds as PostGISRaster.
     41Driver: PostGISRaster/PostGIS Raster driver
     42Files: none associated
     43Size is 10, 10
     44Coordinate System is:
     45GEOGCS["WGS 84",
     46    DATUM["WGS_1984",
     47        SPHEROID["WGS 84",6378137,298.257223563,
     48            AUTHORITY["EPSG","7030"]],
     49        AUTHORITY["EPSG","6326"]],
     50    PRIMEM["Greenwich",0,
     51        AUTHORITY["EPSG","8901"]],
     52    UNIT["degree",0.0174532925199433,
     53        AUTHORITY["EPSG","9122"]],
     54    AUTHORITY["EPSG","4326"]]
     55Origin = (-75.784301562500005,77.680833536363593)
     56Pixel Size = (0.204545041250000,-0.204422967727273)
     57OGRCT: PROJ >= 4.8.0 features enabled
     58OGRCT: Source: +proj=longlat +datum=WGS84 +no_defs
     59OGRCT: Target: +proj=longlat +datum=WGS84 +no_defs
     60Corner Coordinates:
     61Upper Left  ( -75.7843016,  77.6808335) ( 75d47' 3.49"W, 77d40'51.00"N)
     62Lower Left  ( -75.7843016,  75.6366039) ( 75d47' 3.49"W, 75d38'11.77"N)
     63Upper Right ( -73.7388512,  77.6808335) ( 73d44'19.86"W, 77d40'51.00"N)
     64Lower Right ( -73.7388512,  75.6366039) ( 73d44'19.86"W, 75d38'11.77"N)
     65Center      ( -74.7615764,  76.6587187) ( 74d45'41.67"W, 76d39'31.39"N)
     66Band 1 Block=10x10 Type=Float32, ColorInterp=Undefined
     67PostGIS_Raster: PostGISRasterRasterBand::IReadBlock: The query = select rid, rast from public.test_1808 where rast ~ st_setsrid(st_makebox2d(st_point(-75.784302, 75.636604), st_point(-73.738851,77.680834)),4326) and rid=1108
     68PostGIS_Raster: PostGISRasterRasterBand::IReadBlock: The block (0, 0) is empty
     69  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000
     70  Overviews: arbitrary
     71  Metadata:
     72    STATISTICS_MAXIMUM=0
     73    STATISTICS_MEAN=0
     74    STATISTICS_MINIMUM=0
     75    STATISTICS_STDDEV=0
     76GDAL: GDALClose(PG:host=localhost dbname=test port=5432 user=postgres table=test_1808 where='rid=1108', this=0x62f650)
     77}}}
     78
     79The stats are incorrect as...
     80
     81{{{
     82psql -d test -c "SELECT (ST_SummaryStats(rast)).* FROM test_1808 WHERE rid = 1108;"
     83
     84 count |        sum        |        mean        |      stddev       |        min         |        max       
     85-------+-------------------+--------------------+-------------------+--------------------+-------------------
     86   100 | -16.9827570720809 | -0.169827570720809 | 0.449019653323118 | -0.888983130455017 | 0.503015160560608
     87}}}
     88
     89This is on GDAL -trunk r24660, PostgreSQL 9.1.4 and PostGIS -trunk !r10037