Projection problem with Virtual Earth / Google maps

James Mapserver james.mapserver at GMAIL.COM
Tue Jan 15 03:26:28 PST 2008


Projection problems with Google maps / Virtual Earth
I don't really understand whats happening here - so would be grateful for
any suggestions.
I have 2 .map files serving out WMS data:
 - BNG.map
 - WGS84.map

Both these map files are displaying the same data - but one has the raw data
as British National Grid (epsg 27700) and the other as WGS84 (epsf 4326)
When tested in a client such as MapInfo - alignment is exact for both
However when displayed on virtual earth / google maps (using the projection
<54004> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0+y_0=35 +k=
1.0 +units=m +no_defs <>)
if using the WMS service from the WGS84.map file - alignment is fine
if using the WMS service from the BNG.map file - the overlay is about 100m
off to NW
What I don't understand is why these both work fine in a client such as
MapInfo, but only one fails in Virtual Earth / Google maps - as one works
presumably I've got this working OK ?
The difference is both that when being called from MapInfo the request uses
SRS=27700 so no conversion is required
It seems as if the conversion from 27700 to 54004 is messing up - but 4326
to 54004 works OK ?

OK - looked a bit deeper in MapInfo - and if I change the WMS request from
the BNG.map file to return data as SRS=4326 (as in the query below) - I get
similar miss alignment

GET
/scripts/mapserv.exe?map=C:/Inetpub/wwwroot/MapserverService/Map/WMSTest.map&LAYERS=OSBUILD&VERSION=
1.1.1&REQUEST=GetMap&LAYERS=OSBUILD&STYLES=&SRS=EPSG:4326&BBOX=-3.296092,
51.945322,- 3.290018,
51.949813&WIDTH=971&HEIGHT=718&FORMAT=image/png&TRANSPARENT=TRUE&BGCOLOR=0xFFFFFF&EXCEPTIONS=application/vnd.ogc.se_xmlHTTP/1.1

I don't remeber having these issues when using mapserver via CGI - it only
seems to relate to WMS

Obviously I can convert all my data to WGS84 and avoid the problem - but
thats not an ideal long term solution

Any ideas

Thanks
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080115/c6f21461/attachment.htm>


More information about the MapServer-users mailing list