[postgis-devel] [PostGIS] #1618: [raster] ST_Transform to SRID 3978 produce wrong results

PostGIS trac at osgeo.org
Thu Mar 1 14:11:16 PST 2012


#1618: [raster] ST_Transform to SRID 3978 produce wrong results
---------------------+------------------------------------------------------
 Reporter:  pracine  |       Owner:  dustymugs    
     Type:  defect   |      Status:  assigned     
 Priority:  blocker  |   Milestone:  PostGIS 2.0.0
Component:  raster   |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by dustymugs):

 So, I can't seem to get QGIS to behave right with SRID 3978 (It doesn't
 have it built in and gives me crazy results when I do).  I'm testing with
 the SRID 3347 instead and everything looks about right.

 The test I use is...

 {{{
 ROP TABLE IF EXISTS test_1618;
 WITH foo AS (
         SELECT ST_AddBand(ST_MakeEmptyRaster(10, 10, -168.0, 85.0, 0.083,
 -0.083, 0, 0, 4269), 1, '8BUI', 1, 0) AS rast
 )
 SELECT
         gid,
         geom
 INTO test_1618
 FROM ((
         SELECT
                 0 AS gid,
                 rast::geometry AS geom
         FROM foo
         ) UNION ALL (
         SELECT
                 1 AS gid,
                 ST_Transform(rast::geometry, 3347) AS geom
         FROM foo
         ) UNION ALL (
         SELECT
                 2 AS gid,
                 ST_Transform(rast, 3347)::geometry AS geom
         FROM foo
         )
 ) bar
 }}}

 I've checked the debug output for ST_Transform(raster) and it matches with
 what you'd get from GDAL's gdalwarp utility.  This is especially true
 considering that the ST_Transform(raster, 3347) is absolutely basic and
 uses everything that GDAL suggests.

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