[postgis-devel] [PostGIS] #1808: [raster] Raster importation creates gaps and corrupted data

PostGIS trac at osgeo.org
Wed May 9 17:12:57 PDT 2012


#1808: [raster] Raster importation creates gaps and corrupted data
---------------------+------------------------------------------------------
 Reporter:  molgor   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  high     |   Milestone:  PostGIS 2.0.1
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by molgor):

 Yes, sure:

 I used the command-line tool.

 {{{
 raster2pgsql -s 4326 -N -32767 -t 256x256 -I
 pendiente_percent_regional_250m_wgs84.tif mapas.pendiente_percnt_256 >>
 pendiente_perc_256.sql
 }}}

 And the gdalinfo exit for the loaded raster is this:


 {{{
 Driver: PostGISRaster/PostGIS Raster driver
 Files: none associated
 Size is 0, 0
 Origin = (0.000000000000000,0.000000000000000)
 Pixel Size = (1.000000000000000,1.000000000000000)
 Subdatasets:
   SUBDATASET_1_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 1'
   SUBDATASET_1_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 1
   SUBDATASET_2_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 2'
   SUBDATASET_2_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 2
   SUBDATASET_3_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73 schema=mapas table=pendiente_percnt_256 column=rast where='rid
 = 3'
   SUBDATASET_3_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 3
   SUBDATASET_4_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 4'
   SUBDATASET_4_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 4
   SUBDATASET_5_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 5'
   SUBDATASET_5_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 5
   SUBDATASET_6_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 6'
   SUBDATASET_6_DESC=PostGIS Raster at mapas.pendiente_percnt_256 (rast),
 rid = 6
   SUBDATASET_7_NAME=PG:host=localhost port=5432 dbname=incendios user=cpr
 password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 7'
 .....

  SUBDATASET_8658_NAME=PG:host=localhost port=5432 dbname=incendios
 user=cpr password=73  schema=mapas table=pendiente_percnt_256 column=rast
 where='rid = 8658'
   SUBDATASET_8658_DESC=PostGIS Raster at mapas.pendiente_percnt_256
 (rast), rid = 8658
 Corner Coordinates:
 Upper Left  (   0.0000000,   0.0000000)
 Lower Left  (   0.0000000,   0.0000000)
 Upper Right (   0.0000000,   0.0000000)
 Lower Right (   0.0000000,   0.0000000)
 Center      (   0.0000000,   0.0000000)
 }}}

 This is the gdalinfo exit for the original image:
 {{{
 Driver: GTiff/GeoTIFF
 Files: pendiente_percent_regional_250m_wgs84.tif
 Size is 28368, 19839
 Coordinate System is:
 GEOGCS["WGS 84",
     DATUM["WGS_1984",
         SPHEROID["WGS 84",6378137,298.257223563,
             AUTHORITY["EPSG","7030"]],
         AUTHORITY["EPSG","6326"]],
     PRIMEM["Greenwich",0],
     UNIT["degree",0.0174532925199433],
     AUTHORITY["EPSG","4326"]]
 Origin = (-128.604911499087336,53.626968388905460)
 Pixel Size = (0.002424431085498,-0.002424431085498)
 Metadata:
   AREA_OR_POINT=Area
 Image Structure Metadata:
   INTERLEAVE=BAND
 Corner Coordinates:
 Upper Left  (-128.6049115,  53.6269684) (128d36'17.68"W, 53d37'37.09"N)
 Lower Left  (-128.6049115,   5.5286801) (128d36'17.68"W,  5d31'43.25"N)
 Upper Right ( -59.8286505,  53.6269684) ( 59d49'43.14"W, 53d37'37.09"N)
 Lower Right ( -59.8286505,   5.5286801) ( 59d49'43.14"W,  5d31'43.25"N)
 Center      ( -94.2167810,  29.5778242) ( 94d13' 0.41"W, 29d34'40.17"N)
 Band 1 Block=28368x1 Type=Float32, ColorInterp=Gray
   NoData Value=-32767
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1808#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list