[mapserver-users] Projection Issues

Gabe gabe at agtrix.com
Wed Mar 26 22:40:00 EDT 2008


Hi

I am having trouble with the projection on a raster image.  The map is being
displayed but the raster layer is shifted by about 210m.

The mapfiles main projection is EPSG:4326

I have a .ecw file with this gdalinfo:

Driver: ECW/ERMapper Compressed Wavelets
Files: aerial_photo_2003.ecw
Size is 53334, 53334
Coordinate System is:
PROJCS["TMAMG55",
    GEOGCS["AUSTRALIAN GEODETIC",
        DATUM["AGD84",
            SPHEROID["ANS",6378160,298.25]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",147],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["Meter",1]]
Origin = (655179.380000000000000,7701896.290000000000000)
Pixel Size = (1.500000000000000,-1.500000000000000)
Corner Coordinates:
Upper Left  (  655179.380, 7701896.290) (148d29'26.84"E, 20d46'34.32"S)
Lower Left  (  655179.380, 7621895.290) (148d29'52.92"E, 21d29'55.68"S)
Upper Right (  735180.380, 7701896.290) (149d15'32.31"E, 20d46'4.13"S)
Lower Right (  735180.380, 7621895.290) (149d16'11.81"E, 21d29'24.34"S)
Center      (  695179.880, 7661895.790) (148d52'45.97"E, 21d 8'1.22"S)
Band 1 Block=53334x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=53334x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=53334x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary


I have a vector layer which was a tab file with the projection AMG Zone
55(AGD 84).  This was loaded into postgis with ogr2ogr using these options
ogr2ogr -overwrite -f "PostgreSQL" PG:"<database details>" thefile.tab -nln
t_table -lco "GEOMETRY_NAME=the_geom" -t_srs EPSG:4326 -skipfailures.  I
have done this before on different installations and it usually gives me a
table where srid =4326 however in this case it is giving me a newly created
srid = 32772 (this installation is different in that we are using postgres
8.3 and ms4w 2.2.7).  I have checked and as far as I can tell this layer is
being displayed correctly.

here are the relevant layers from my mapfile

LAYER
  NAME "Photography_2003"
  GROUP "Photography_2003"
  DATA "mackay/Images/aerial_photo_2003.ecw"
  TYPE RASTER
  STATUS ON
  PROJECTION
    "init=epsg:20355"
  END
  METADATA
    "DESCRIPTION"    "Photography 2003"
  END
END

And

  LAYER
    NAME "Paddocks"
    GROUP "Paddocks"
    STATUS ON
    DATA "the_geom from t_the_table using unique oid using SRID=32772"
    TYPE POLYGON
    CONNECTIONTYPE postgis
    CONNECTION "<connection string>"
    MAXSCALE 2000000
    CLASS
      NAME "Paddock"
      STYLE
        ANGLE 120
        WIDTH 1
        SIZE 13
        COLOR 0 128 0
        OUTLINECOLOR 0 128 0
        SYMBOL "hatched"
      END
    END
  END

Any help would be appreciated.

Gabriel




More information about the mapserver-users mailing list