[mapserver-users] Problem with raster file and layer's getExtent method

Carlos Ruiz boolean10001 at yahoo.com
Mon May 9 10:16:44 PDT 2011


Hi list,

I'm using the getExtent method of layer object with PHP Mapscript, works fine with PostGIS layers but with a 

raster files I get some troubles.

I have a DEM.IMG file, using gdalinfo -nomd dem.img throws this:

Driver: HFA/Erdas Imagine Images (.img)
...
Coordinate System is:
PROJCS["UTM Zone 13, Northern Hemisphere",
...

Corner Coordinates:
Upper Left  (  687178.570, 2247514.668) (103d12'26.04"W, 20d18'59.14"N)
Lower Left  (  687178.570, 2243914.668) (103d12'27.39"W, 20d17'2.08"N)
Upper Right (  690918.570, 2247514.668) (103d10'17.13"W, 20d18'57.80"N)
Lower Right (  690918.570, 2243914.668) (103d10'18.51"W, 20d17'0.75"N)
Center      (  689048.570, 2245714.668) (103d11'22.27"W, 20d17'59.94"N)
...


But $layer->getExtent() has the following extent:

-25000000, -25000000, 25000000, 25000000

Is there another way to get the raster file extent ?

Thanks in advance
 

IC Carlos Ruiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110509/8d4eab1e/attachment.htm>


More information about the MapServer-users mailing list