[postgis-users] RE : raster2psql - reprojection issue

Francois Hugues hugues.francois at irstea.fr
Sat Apr 14 00:33:12 PDT 2012


I don't think raster2pgsql can be use to reproject anything : it could be better to import the raster into postgis using its original projection and then use postgis to reproject to the wanted srid using st_transform
(http://www.postgis.org/documentation/manual-svn/RT_ST_Transform.html)

Hug 


-------- Message d'origine--------
De: postgis-users-bounces at postgis.refractions.net de la part de Mark Wynter
Date: sam. 14/04/2012 08:37
À: postgis-users at postgis.refractions.net
Objet : [postgis-users] raster2psql - reprojection issue
 
This may be a basic issue, but I'm on a steep learning curve with respect to raster analysis and PostGIS 2.0.

I have a large land use raster file ( w001001.adf ) projected in EPSG:3577 - GDA94 / Australian Albers.   In QGIS when opening this file, I can do an "on the fly" CRS transformation to SRID 4326 and all is good.

When importing this file into PostGIS, is it possible to transform this file into a geographic coordinate system, and if so, how?

I've loaded the data into PostGIS using:  raster2pgsql -s 4326 -I -C -M w001001.adf -F -t 5000x5000 landuse_50m | psql -U postgres -d test

However, when I then view the resultant PostGIS table in OPENJUMP, the data remains in the projected coordinate system rather than the geographic coordinate system.  i.e. upper left = -1888000.000,-1010000.000, not decimal degrees.

Details of w001001.adf are as follows:

gdalinfo w001001.adf file
Driver: AIG/Arc/Info Binary Grid
Size is 80200, 76740
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["GDA94",
        DATUM["Geocentric_Datum_of_Australia_1994",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6283"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4283"]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["standard_parallel_1",-18],
    PARAMETER["standard_parallel_2",-36],
    PARAMETER["latitude_of_center",0],
    PARAMETER["longitude_of_center",132],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["METERS",1]]
Origin = (-1888000.000000000000000,-1010000.000000000000000)
Pixel Size = (50.000000000000000,-50.000000000000000)
Corner Coordinates:
Upper Left  (-1888000.000,-1010000.000) (115d23'34.35"E,  8d29'49.17"S)
Lower Left  (-1888000.000,-4847000.000) (109d29'30.81"E, 42d49'11.28"S)
Upper Right ( 2122000.000,-1010000.000) (150d38'16.50"E,  8d11'43.92"S)
Lower Right ( 2122000.000,-4847000.000) (157d13'46.69"E, 42d25' 0.67"S)
Center      (  117000.000,-2928500.000) (133d11'36.60"E, 27d 0'36.35"S)
Band 1 Block=256x4 Type=Int16, ColorInterp=Undefined
  Min=100.000 Max=663.000 
  NoData Value=-32768

Is there something I'm not doing, or understanding?  Could someone please help me out?

Kind regards, Mark



_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4466 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120414/a1acb0a4/attachment.bin>


More information about the postgis-users mailing list