Coordinate Conversion

Ian Tidy IANT at NAPIER.GOVT.NZ
Mon Jun 11 13:22:24 PDT 2007


Thanks to all who replied, this does what I want.

Cheers Ian
______________________ 
Ian Tidy 
GIS Analyst / Developer
Works Asset Department 
Napier City Council 
mailto:iant at napier.govt.nz 
http://www.napier.govt.nz | http://maps.napier.govt.nz 


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of andy
Sent: Monday, 11 June 2007 9:13 p.m.
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Coordinate Conversion

Hi Ian,
look if this code (phpmapscript) give you some ispiration.

<?php
        $projInObj = ms_newprojectionobj("init=epsg:4326"); original 
epsg code
        $projOutObj = ms_newprojectionobj("init=epsg:23033"); 
destination epsg code
        $poPoint = ms_newpointobj();
        $poPoint->setXY(13, 38); //original coordinates
        $poPoint->project($projInObj, $projOutObj);       
        echo $poPoint->x.",".$poPoint->y; //echo new coordinates
?>

cheers,

a


Ian Tidy ha scritto:
>
> 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.
>
------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date:
10/06/2007 13.39
>   

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

by MailMarshal
########################################################################
#############
#####################################################################################
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