[postgis-devel] [PostGIS] #925: [raster] ST_Transform

PostGIS trac at osgeo.org
Wed Jun 8 15:21:10 PDT 2011


#925: [raster] ST_Transform
----------------------------+-----------------------------------------------
 Reporter:  dustymugs       |       Owner:  dustymugs    
     Type:  task            |      Status:  assigned     
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:  history         |  
----------------------------+-----------------------------------------------

Comment(by robe):

 I have no idea -- I didn't see a configuration option in GDAL to allow me
 to specify the proj library (I recall that when I compiled proj 4.7 it did
 name the file libproj-0.dll).

 I went ahead and tested the examples in my PostgreSQL 9.1 install.  It
 doesn't give an error but returns the wrong answer.  Maybe new gdal
 expects proj 4.7 or above though it should error out and its not.  I'm
 running proj 4.6.1.

 So via psql -
 {{{
 SELECT
         ST_SRID(rast),
         ST_Width(rast),
         ST_Height(rast),
         ST_NumBands(rast),
         ST_ScaleX(rast),
         ST_ScaleY(rast),
         ST_Count(rast),
         ST_Mean(rast)
 FROM (SELECT ST_Transform(
         ST_SetValue(
                 ST_SetValue(
                         ST_SetValue(
                                 ST_AddBand(
                                         ST_MakeEmptyRaster(10, 10,
 -500000, 600000, 1000, 1000, 0, 0, 1002163)
                                         , 1, '64BF', 0, 0
                                 )
                                 , 1, 1, 1, -10
                         )
                         , 1, 5, 4, 0
                 )
                 , 1, 5, 5, 3.14159
         )
         , 1003310) AS rast
 ) foo;
 }}}


 Give me this -- fair enough right:


 {{{
  st_srid | st_width | st_height | st_numbands | st_scalex | st_scaley |
 st_count
  |  st_mean
 ---------+----------+-----------+-------------+-----------+-----------+----------+-----
  1003310 |       10 |        10 |           1 |      1000 |     -1000 |
 2 | -3.429205
 }}}

 Note in BBorie's regress, he gets a width of 12 , scale x and scale y
 changed and I'm getting 10 back like its not doing anything but not
 erroring out either.

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