Coordinate Conversion

Burgholzer,Robert rwburgholzer at DEQ.VIRGINIA.GOV
Mon Jun 11 09:33:54 EDT 2007


Ian,
I interpreted your question a little differently than the other respondents, so, let me see if I understand your aim correctly, that is, 
1) to have the option of displaying your map re-projected to other coordinate systems, OR
2) to be able to display the numeric values for the center and extents of the maps

These are somewhat different aims, so if your aim is the 2nd option, then the code that Andy gave will do what you need.  If you simply want to have an alternate projection, then you can just set the projection of your map to the desired projection using the mapscript function setProjection(string proj_params, boolean bSetUnitsAndExtents), and mapserver should automatically re-project for you (provided that each of your layers has its projection specified).  You can find the documentation for this function in the phpMapscript/mapObj documentation on the mapserver web site.

Good luck,
r.b.

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ian Tidy
Sent: Sunday, June 10, 2007 9:13 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Coordinate Conversion

Hi, 
I need some help with a small enhancement to my MapServer site.  I have been asked to display the map extents and centre in other coordinate systems.  Currently the map window returns NZMG co-ordinates, I have been asked to supply these coordinates in NZTM, WGS84, and a few others.
I am using MapServer 4.6, MapScript and PHP on a Linux Server. 
Is there a MapScript function that will convert between coordinate systems or is there another way of doing this? 
Cheers Ian 
______________________
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand
Phone +64-6-835-7579 Ext. 8115
Fax +64-6-834-4195
mailto:iant at napier.govt.nz
http://www.napier.govt.nz | http://maps.napier.govt.nz 


This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal 

######################################################################
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information
provided is given in good faith. However unless specifically stated to
the contrary, Napier City Council accepts no liability for the
content of this e-mail or for the consequences of any action taken on
the basis of the information provided, unless that information is
subsequently confirmed in writing. If you are not the intended recipient,
you are notified that any use, dissemination, distribution or copying
of this message or data is prohibited. If you received this e-mail
message in error, please notify us immediately and erase all copies
of this message and attachments. Thank you. 



More information about the mapserver-users mailing list