[mapserver-users] Re: mapserver-users Digest, Vol 36, Issue 20

anumod p anumod514 at rediffmail.com
Fri Jan 14 22:50:26 EST 2011


Attention please 

How to write code calculate distance between two points using php mapserver.
How to write code to find shortest path using php 
mapserver.


On Fri, 14 Jan 2011 02:41:21 +0530 mapserver-users-request at lists.osgeo.org wrote

>Send mapserver-users mailing list submissions to

>mapserver-users at lists.osgeo.org

>

>To subscribe or unsubscribe via the World Wide Web, visit

>http://lists.osgeo.org/mailman/listinfo/mapserver-users

>or, via email, send a message with subject or body 'help' to

>mapserver-users-request at lists.osgeo.org

>

>You can reach the person managing the list at

>mapserver-users-owner at lists.osgeo.org

>

>When replying, please edit your Subject line so it is more specific

>than "Re: Contents of mapserver-users digest..."

>

>

>Today's Topics:

>

>  1. Re: Reporting lat/long from projected map units

>   (Milo van der Linden)

>

>

>----------------------------------------------------------------------

>

>Message: 1

>Date: Thu, 13 Jan 2011 17:08:59 +0100

>From: Milo van der Linden <milo at dogodigi.net>

>Subject: Re: [mapserver-users] Reporting lat/long from projected map

>units

>To: "Bistrais, Bob" <Bob.Bistrais at maine.gov>

>Cc: mapserver-users <mapserver-users at lists.osgeo.org>

>Message-ID:

><AANLkTimnt1n+sfvnXjJQ0Rk65Hf8LmFewb1_MQ5hV37j at mail.gmail.com>

>Content-Type: text/plain; charset="utf-8"

>

>Mmm, that shouldn't be to hard. Let me try;

>

>var source = new Proj4js.Proj(‘EPSG:YOUR_UTM_EPSGCODE’);

>var dest = new Proj4js.Proj(‘EPSG:4326’); . . .

>

>// transforming point coordinates

>var p = new Proj4js.Point(YOUR_UTM_X,YOUR_UTM_Y);

>Proj4js.transform(source, dest, p);

>

>alert(p.x); //WILL ALERT YOUR NEW LON

>alert(p.y); //WILL ALERT YOUR NEW LAT

>

>

>2011/1/13 Bistrais, Bob <Bob.Bistrais at maine.gov>

>

>> I downloaded the code and am looking at the Wiki. I don’t see anything

>> to input screen or UTM coords. Is it in the code somewhere?

>>

>>

>> ------------------------------

>>

>> *From:* Milo van der Linden [mailto:milo at dogodigi.net]

>> *Sent:* Wednesday, January 12, 2011 12:44 PM

>> *To:* mapserver-users

>>

>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map

>> units

>>

>>

>>

>> (Sorry, my last posts went straight to you by accident, I prefer to stay on

>> the list, but gmail for applications not always agrees with me)

>>

>> proj4js has project pages including documentation on the OSGeo wiki. The

>> userguide is here:

>>

>> http://trac.osgeo.org/proj4js/wiki/UserGuide

>>

>> and it immediately explains what you want

>>

>> 2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>

>>

>> Yes, I can get UTM coordinates back. Can you elaborate a bit on proj4js?

>> I’m not familiar with that.

>>

>>

>> ------------------------------

>>

>> *From:* Milo van der Linden [mailto:milo at dogodigi.net]

>> *Sent:* Wednesday, January 12, 2011 11:10 AM

>>

>>

>> *To:* Bistrais, Bob

>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map

>> units

>>

>>

>>

>> Well then one question remains:

>>

>> Are you able to convert screen coords to UTM capturing an onclick event?

>> Because then all you need to do is enhance it with proj4js

>>

>> 2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>

>>

>> Yes, a web mapping application. Not using Open Layers. We are using

>> PHP-Mapscript/HTML/JavaScript. All queryable data is in shapefiles, again,

>> all of these are in UTM.

>>

>>

>> ------------------------------

>>

>> *From:* Milo van der Linden [mailto:milo at dogodigi.net]

>> *Sent:* Wednesday, January 12, 2011 11:03 AM

>> *To:* Bistrais, Bob

>>

>>

>> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map

>> units

>>

>>

>>

>> Are you talking bout a web-app? Do you use a client like OpenLayers? What

>> programming language(s) do you use? Is your datasource a database? Like

>> postgis?

>>

>>

>>

>> If you can get UTM coordinates from the mouseclick, the next best option

>> (in my opinion) would be to use proj4js:

>>

>> http://proj4js.org/

>>

>> Simply embed the js-library ad an event for mouse handling and convert:

>> screen->utm->4326.

>>

>>  2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>

>>

>> This should be fairly straightforward, but I was wondering what is the

>> easiest and quickest way to convert coordinates on the fly. All my data is

>> in UTM coordinates. I want to report coordinates to the screen in

>> Lat/Long. Changing the projections on the map files to lat/long (EPSG:4326)

>> is not an option, as this will cause problems elsewhere. So what I want to

>> do is take point coordinates, either from a mouse click or from UTM

>> coordinates, project to lat/long, which will be reported in a result

>> window. What is the quickest way to do this?

>>

>>

>> _______________________________________________

>> mapserver-users mailing list

>> mapserver-users at lists.osgeo.org

>> http://lists.osgeo.org/mailman/listinfo/mapserver-users

>>

>>

>>

>>

>>

>>

>>

>-------------- next part --------------

>An HTML attachment was scrubbed...

>URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110113/bc3cccd9/attachment-0001.html

>

>------------------------------

>

>_______________________________________________

>mapserver-users mailing list

>mapserver-users at lists.osgeo.org

>http://lists.osgeo.org/mailman/listinfo/mapserver-users

>

>

>End of mapserver-users Digest, Vol 36, Issue 20

>***********************************************

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110115/2583ff7f/attachment-0001.html


More information about the mapserver-users mailing list