[Cartoweb-users] lat/lon URL request

Oliver Christen oliver.christen at camptocamp.com
Mon Jul 14 02:33:57 EDT 2008


Hi Christoph

Cartoweb was not really designed to be able to dynamically switch between 
coordinate systems.
so if a recentering request is issued in another coordinate system than the 
one defined in your mapfile, you need to reproject the corrdinates before 
appling the request.
I think you can simply extend the location coreplugin and add some filter to 
the recenter parameters, and maybe simply add a projection selector in the 
recenter interface.

you can reproject a point easily using mapscript:
define your point as a new ms_newPointObj()
define the initial projection
define the target projection
call for project(projectionObj in, projectionObj out) on your point object

there is a related example there 
http://www.kralidis.ca/blog/2007/07/14/reprojecting-in-python/
it's for python but the logic is quite similar and you should be able to get 
the idea.

regards
Oliver


----- Original Message ----- 
From: "Lauber Christoph" <ch.lauber at geo-thun.ch>
To: <cartoweb-users at lists.maptools.org>
Sent: Friday, July 11, 2008 4:54 PM
Subject: [Cartoweb-users] lat/lon URL request


> Hi list
>
> What do I have to change in CartoWeb if I would like to allow URL acces by 
> lat/lon coordinates to my CartoWeb project?
>
> My actual project is in EPSG: 21781 (swiss projection system). I can open 
> the project for example like this: 
> http://mapserver3.internetgalerie.ch/be-geo/be-geo.php?recenter_x=613603&recenter_y=177661&recenter_scale=10000.
>
> I got a hint from a univerity professor that most of the Geo Services 
> (like http://88.198.44.148/directory) only support lat/lon coordinates. 
> The means that on a request for a city the URL will be generated with 
> lat/lon coordinates. Is CarotWeb by default capable to handle that?
>
> Or do I have to write a new recenter plugin 
> (http://www.cartoweb.org/cwiki/HowToWriteaRecenterPlugin) and change the 
> parameters from recenter_x to something like recenter_lat?
>
>
>
> Mit freundlichen Grüssen
>
>
> Christoph Lauber
>
> Dütschler & Naegeli, Vermessung+Geoinformation AG
> Fliederweg 11, Postfach, 3601 Thun
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list