Attention please <br><br>How to write code calculate distance between two points using php mapserver.<br>How to write code to find shortest path using php
mapserver.<br><br>
On Fri, 14 Jan 2011 02:41:21 +0530 mapserver-users-request@lists.osgeo.org wrote<br>
>Send mapserver-users mailing list submissions to<br>
>mapserver-users@lists.osgeo.org<br>
><br>
>To subscribe or unsubscribe via the World Wide Web, visit<br>
>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
>or, via email, send a message with subject or body 'help' to<br>
>mapserver-users-request@lists.osgeo.org<br>
><br>
>You can reach the person managing the list at<br>
>mapserver-users-owner@lists.osgeo.org<br>
><br>
>When replying, please edit your Subject line so it is more specific<br>
>than "Re: Contents of mapserver-users digest..."<br>
><br>
><br>
>Today's Topics:<br>
><br>
> 1. Re: Reporting lat/long from projected map units<br>
> (Milo van der Linden)<br>
><br>
><br>
>----------------------------------------------------------------------<br>
><br>
>Message: 1<br>
>Date: Thu, 13 Jan 2011 17:08:59 +0100<br>
>From: Milo van der Linden <milo@dogodigi.net><br>
>Subject: Re: [mapserver-users] Reporting lat/long from projected map<br>
>units<br>
>To: "Bistrais, Bob" <Bob.Bistrais@maine.gov><br>
>Cc: mapserver-users <mapserver-users@lists.osgeo.org><br>
>Message-ID:<br>
><AANLkTimnt1n+sfvnXjJQ0Rk65Hf8LmFewb1_MQ5hV37j@mail.gmail.com><br>
>Content-Type: text/plain; charset="utf-8"<br>
><br>
>Mmm, that shouldn't be to hard. Let me try;<br>
><br>
>var source = new Proj4js.Proj(‘EPSG:YOUR_UTM_EPSGCODE’);<br>
>var dest = new Proj4js.Proj(‘EPSG:4326’); . . .<br>
><br>
>// transforming point coordinates<br>
>var p = new Proj4js.Point(YOUR_UTM_X,YOUR_UTM_Y);<br>
>Proj4js.transform(source, dest, p);<br>
><br>
>alert(p.x); //WILL ALERT YOUR NEW LON<br>
>alert(p.y); //WILL ALERT YOUR NEW LAT<br>
><br>
><br>
>2011/1/13 Bistrais, Bob <Bob.Bistrais@maine.gov><br>
><br>
>> I downloaded the code and am looking at the Wiki. I don’t see anything<br>
>> to input screen or UTM coords. Is it in the code somewhere?<br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> *From:* Milo van der Linden [mailto:milo@dogodigi.net]<br>
>> *Sent:* Wednesday, January 12, 2011 12:44 PM<br>
>> *To:* mapserver-users<br>
>><br>
>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map<br>
>> units<br>
>><br>
>><br>
>><br>
>> (Sorry, my last posts went straight to you by accident, I prefer to stay on<br>
>> the list, but gmail for applications not always agrees with me)<br>
>><br>
>> proj4js has project pages including documentation on the OSGeo wiki. The<br>
>> userguide is here:<br>
>><br>
>> http://trac.osgeo.org/proj4js/wiki/UserGuide<br>
>><br>
>> and it immediately explains what you want<br>
>><br>
>> 2011/1/12 Bistrais, Bob <Bob.Bistrais@maine.gov><br>
>><br>
>> Yes, I can get UTM coordinates back. Can you elaborate a bit on proj4js?<br>
>> I’m not familiar with that.<br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> *From:* Milo van der Linden [mailto:milo@dogodigi.net]<br>
>> *Sent:* Wednesday, January 12, 2011 11:10 AM<br>
>><br>
>><br>
>> *To:* Bistrais, Bob<br>
>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map<br>
>> units<br>
>><br>
>><br>
>><br>
>> Well then one question remains:<br>
>><br>
>> Are you able to convert screen coords to UTM capturing an onclick event?<br>
>> Because then all you need to do is enhance it with proj4js<br>
>><br>
>> 2011/1/12 Bistrais, Bob <Bob.Bistrais@maine.gov><br>
>><br>
>> Yes, a web mapping application. Not using Open Layers. We are using<br>
>> PHP-Mapscript/HTML/JavaScript. All queryable data is in shapefiles, again,<br>
>> all of these are in UTM.<br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> *From:* Milo van der Linden [mailto:milo@dogodigi.net]<br>
>> *Sent:* Wednesday, January 12, 2011 11:03 AM<br>
>> *To:* Bistrais, Bob<br>
>><br>
>><br>
>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map<br>
>> units<br>
>><br>
>><br>
>><br>
>> Are you talking bout a web-app? Do you use a client like OpenLayers? What<br>
>> programming language(s) do you use? Is your datasource a database? Like<br>
>> postgis?<br>
>><br>
>><br>
>><br>
>> If you can get UTM coordinates from the mouseclick, the next best option<br>
>> (in my opinion) would be to use proj4js:<br>
>><br>
>> http://proj4js.org/<br>
>><br>
>> Simply embed the js-library ad an event for mouse handling and convert:<br>
>> screen->utm->4326.<br>
>><br>
>> 2011/1/12 Bistrais, Bob <Bob.Bistrais@maine.gov><br>
>><br>
>> This should be fairly straightforward, but I was wondering what is the<br>
>> easiest and quickest way to convert coordinates on the fly. All my data is<br>
>> in UTM coordinates. I want to report coordinates to the screen in<br>
>> Lat/Long. Changing the projections on the map files to lat/long (EPSG:4326)<br>
>> is not an option, as this will cause problems elsewhere. So what I want to<br>
>> do is take point coordinates, either from a mouse click or from UTM<br>
>> coordinates, project to lat/long, which will be reported in a result<br>
>> window. What is the quickest way to do this?<br>
>><br>
>><br>
>> _______________________________________________<br>
>> mapserver-users mailing list<br>
>> mapserver-users@lists.osgeo.org<br>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>-------------- next part --------------<br>
>An HTML attachment was scrubbed...<br>
>URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110113/bc3cccd9/attachment-0001.html<br>
><br>
>------------------------------<br>
><br>
>_______________________________________________<br>
>mapserver-users mailing list<br>
>mapserver-users@lists.osgeo.org<br>
>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
><br>
><br>
>End of mapserver-users Digest, Vol 36, Issue 20<br>
>***********************************************<br>
><br><A HREF="http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?" target="_blank"><IMG SRC="http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle"></A>