[postgis-devel] [PostGIS] #498: [wktraster] Gdal export of some files gives blank image

PostGIS trac at osgeo.org
Tue Apr 27 17:06:12 PDT 2010


#498: [wktraster] Gdal export of some files gives blank image
------------------------+---------------------------------------------------
  Reporter:  robe       |       Owner:  jorgearevalo   
      Type:  defect     |      Status:  closed         
  Priority:  medium     |   Milestone:  WKTRaster 0.1.6
 Component:  wktraster  |     Version:  trunk          
Resolution:  fixed      |    Keywords:                 
------------------------+---------------------------------------------------
Changes (by jorgearevalo):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Fixed in r5577. I've rewritten a lot of code of GDAL WKT Raster driver
 (update your gdal library), because sometimes the raster properties
 weren't properly read. On the other hand, it's not necessary to make
 pixelsize y (from GDALGetGeoTransform) negative. This GDAL function takes
 into account if is necessary to make it, and do make it. So, I deleted
 this part from gdal2wktraster script.

 I've tested the code with the following (attached) images:


 {{{
 $ gdal2wktraster.py -r stock_elephant.png -t gis_schema.stock_elephant -k
 40x20
 -l 1 -o stock_elephant.sql

 $ psql -d gisdb -f stock_elephant.sql

 $ gdal_translate -of PNG PG:"host=localhost dbname=gisdb user=gis
 password=gis
  schema=gis_schema table=stock_elephant" stock_elephant_fromdb.png
 }}}


 {{{
 $ gdal2wktraster.py -r wonderpostgis_banner.png -t
 gis_schema.wonderpostgis_banner -k 40x20
  -l 1 -o wonderpostigs_banner.sql

 $ psql -d gisdb -f wonderpostigs_banner.sql

 $ gdal_translate -of PNG PG:"host=localhost dbname=gisdb user=gis
 password=gis
 schema=gis_schema table=wonderpostigs_banner"
 wonderpostigs_banner_fromdb.png
 }}}

 {{{
 $ gdal2wktraster.py -r utm.tif -t gis_schema.utm -k 40x20 -s 26711 -l 1 -o
 utm.sql

 $ psql -d gisdb -f utm.sql

 $ gdal_translate -of PNG PG:"host=localhost dbname=gisdb user=gis
 password=gis
  schema=gis_schema table=utm" utm_fromdb.png
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/498#comment:7>
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