Hi All,<div><br></div><div>I'm a bit confused as to the way mapserver deals with projections. My understanding is that if I place a 'PROJECTION' tag as a high level object in the mapfile, then that is the projection I should expect when I read coordinates from a tool such as Chameleon's cursorpos widget. </div>
<div><br></div><div>If I then have layers using data of a different base projection I need to place a 'PROJECTION' tag within the 'LAYER' object describing the projection of the base layer. This will ensure all layers even if they are different projections will reproject correctly and layers will render in the correct position relative to each other.</div>
<div><br></div><div>If the above is correct can someone explain why I my map is rendering in the projection of the base layers rather than the projection I define in the mapfile level 'PROJECTION' object. See below for me example mapfile.</div>
<div><br></div><div>Tony</div><div><br></div><div><div>#</div><div># Start of map file</div><div>#</div><div>MAP</div><div> NAME sp_geography</div><div> STATUS ON</div><div> SIZE 800 500</div><div> EXTENT 564300 9470937 599600 9493000</div>
<div> UNITS METERS</div><div> SHAPEPATH "/opt/FriedaRiver/"</div><div> IMAGECOLOR 237 255 208</div><div> SYMBOLSET "/opt/testwww/htdocs/includes/symbols.sym"</div><div> FONTSET "/usr/share/fonts/truetype/font.list"</div>
<div> DEBUG 2</div><div> CONFIG "MS_ERRORFILE" "/opt/testwww/wms_error/ms_error.txt"</div><div><br></div><div>OUTPUTFORMAT</div><div> NAME "AGGA"</div><div> MIMETYPE "image/png"</div>
<div> DRIVER "AGG/PNG"</div><div> EXTENSION "png"</div><div> IMAGEMODE RGBA</div><div> TRANSPARENT ON</div><div>END</div><div> </div><div>#</div><div># Start of web interface definition</div><div>
# </div><div>WEB</div><div> IMAGEPATH "/opt/testwww/ms_tmp/"</div><div> IMAGEURL "/ms_tmp/"</div><div> END</div><div>#</div><div># Assign Projection</div><div>#</div><div>PROJECTION</div><div>
"init=epsg:32754"</div><div>END</div><div><br></div><div>LAYER</div><div> GROUP "Geography"</div><div> CONNECTIONTYPE postgis</div><div> CONNECTION "host=localhost port=5432 dbname=FriedaRiver user=****password=********"</div>
<div> NAME "Rivers"</div><div> DATA "wkb_geometry FROM png_riversamg66z54 using unique ogc_fid" </div><div> PROJECTION</div><div> "init=epsg:20254"</div><div> END</div><div>
METADATA</div><div> SOURCE "METADATA: Supplied by Xstrata 2003"</div><div> END</div><div> TEMPLATE "/var/www/chameleon/widgets/Query/QueryResults.phtml"</div><div> STATUS ON</div><div>
TYPE LINE</div><div> LABELITEM "name"</div><div> CLASS</div><div> STYLE</div><div> SYMBOL "minor towns"</div><div> COLOR 50 100 255</div><div> SIZE 1</div><div> END</div>
<div> LABEL</div><div> ANGLE FOLLOW</div><div> MINDISTANCE 200</div><div> FONT ArialItalic</div><div> TYPE TRUETYPE</div><div> SIZE 8</div><div> COLOR 50 100 255</div><div> OUTLINECOLOR 255 255 255</div>
<div> POSITION UC</div><div> END</div><div> END </div><div>END</div><div><br></div><div>LAYER</div><div> GROUP "Tenement"</div><div> CONNECTIONTYPE postgis</div><div> CONNECTION "host=localhost port=5432 dbname=FriedaRiver user=**** password=*****"</div>
<div> NAME "Tenement EL58"</div><div> DATA "wkb_geometry FROM el58_agd66z54 using unique ogc_fid" </div><div> PROJECTION</div><div> "init=epsg:20254"</div><div> END</div>
<div> METADATA</div><div> SOURCE "METADATA: Supplied by Xstrata 2003"</div><div> END</div><div> TEMPLATE "/var/www/chameleon/widgets/Query/QueryResults.phtml"</div><div> STATUS ON</div>
<div> TYPE LINE </div><div> CLASS</div><div> STYLE</div><div> COLOR 0 0 0</div><div> WIDTH 3</div><div> END</div><div> END </div><div>END</div><div> </div><div>END</div></div>