[postgis-devel] [PostGIS] #901: [raster] ST_AsGDALRaster and the helper functions ST_getGDALDrivers and ST_srtext

PostGIS trac at osgeo.org
Mon May 16 22:04:13 PDT 2011

#901: [raster] ST_AsGDALRaster and the helper functions ST_getGDALDrivers and
  Reporter:  dustymugs       |       Owner:  dustymugs    
      Type:  task            |      Status:  reopened     
  Priority:  medium          |   Milestone:  PostGIS 2.0.0
 Component:  postgis raster  |     Version:  trunk        
Resolution:                  |    Keywords:  history      

Comment(by dustymugs):

 My GDAL version is the latest stable version of 1.8.0.


 I'm pretty sure that the problem has to do with how I use snprintf.  Based
 upon all other uses of snprintf in postgis, my use of the function is non-
 standard.  I use it to determine the size of any variable I'm converting
 to a char string to allocate exactly the amount of memory needed to store
 the char string.  Evidently, Windows completely differently in its return
 value from snprintf.

 I did add a very basic client in raster/scripts/python/rtgdalraster.py to
 test ST_AsGDALRaster.  You'll want to check the source as I think I added
 an example in there.  This is how I tested to make sure that the output
 GDAL rasters are valid.  My final batch of tests were done using the pele
 image from your book and pele came out cleanly in TIFF, JPEG and PNG.

 Yes, I posted a lot of functions.  I think I may have waited too long to
 start providing patchsets.  I plan on adding new features at regular
 intervals in the future... starting with ST_Count and then ST_Transform.

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