[postgis-devel] pgraster: st_resample error

Bborie Park dustymugs at gmail.com
Fri Dec 23 07:38:34 PST 2011


Tom,

When you have the chance, can you look at ticket #1402?

http://trac.osgeo.org/postgis/ticket/1402

Even from the GDAL project responded with a thorough explanation of
what's causing the drift.  I'm still digesting his explanation and
will see what can be done to improve the projection handling in
PostGIS Raster.  Currently, we use the value in the "srtext" column of
spatial_ref_sys, but it looks like we may have better luck using the
"proj4text" column and have GDAL process it through their mechanisms.

-bborie

On Fri, Dec 23, 2011 at 12:54 AM, Tom van Tilburg
<tom.van.tilburg at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> 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