[postgis-devel] pgraster: st_resample error

Tom van Tilburg tom.van.tilburg at gmail.com
Fri Dec 23 00:54:07 PST 2011


Bborie,

I'll try to test the raster warping in ArcGIS later today.
For now I tested with gdalwarp myself and curiously enough it moved my 
raster 20 km *north* instead of *south* which was happening from within 
postgis.

     gdalwarp -s_srs EPSG:28992 -t_srs EPSG:900913 -of GTiff infile.tif 
outfile.tif

Other things I tested:
EPSG:28992 -> EPSG:4326    good projection
EPGS:4326 -> EPSG:900913    offset roughly 20 km Northwards

Could it be true that epsg:900913 just hasn't been used for rasters yet? 
It's a popular projection for background maps for vectors from google, 
OSM etc. but I've never seen it used for rasters (being native raster, 
not WMS tiles) so far..

Cheers,
  Tom

On 22-12-2011 21:44, dustymugs wrote:
>
> Tom,
>
> I've done some digging around and the answers provided by ST_Resample 
> match that provided by GDAL's gdalwarp utility.  I added some notes 
> and testing results to the ticket #1402 regarding this.  I did test a 
> PNG raster matching the spatial attributes of the raster created in 
> PostGIS Raster and the answers are identical.
>
> I suppose one test to check the outputs of GDAL and PostGIS Raster is 
> to see how the warped output differs from a completely different 
> program (ArcGIS, ERDAS, ENVI Imagine).
>
> You could say that GDAL is incorrect but I'm not going to say that as 
> that project has had years of inspections by users to make sure the 
> outputs are correct.
>
> -bborie
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list