Problem with WMS Connection
Ed McNierney
ed at TOPOZONE.COM
Fri Feb 24 10:11:53 PST 2006
Dennis -
By default MapServer presumes that the output map and all layers are in
the same projection/coordinate system. As a result, for simple cases
you don't need need to tell MapServer what projection you're using. If
you ask for a map at coordinate 23456, 2837455 then MapServer will look
for that coordinate in your data and draw whatever is there.
If you want to use data sources with different input projections, or if
you want MapServer to produce an output map in a projection different
than the input data, then you need to specify PROJECTION blocks. The
map-level (top-level) PROJECTION block specifies the desired output
projection, and the EXTENT of your map is in the units of that
projection. If that's all you do, then all input layers are presumed to
be in that projection. If your input data is in a different projection,
you have to tell MapServer by adding a PROJECTION block to each layer
with a projection different from the output projection.
It is often best to use an all-or-nothing approach. If your top-level
output map has a PROJECTION block, then put PROJECTION blocks in all
your layer definitions.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
________________________________
From: Dennis Megarry [mailto:dennis at megarry.com]
Sent: Friday, February 24, 2006 12:54 PM
To: Ed McNierney; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: RE: [UMN_MAPSERVER-USERS] Problem with WMS Connection
Ahh.. yup.. that was it! Stupid me.. I fought with this for 5 days
now.. lol Thanks!
So.. I take it if you have data with different projections you need to
set this at the layer level? I had setup the main projection which all
my data is in and thought by setting the layer projection for the WMS
server is would work, but it certainly did not... I removed the
Projection all together and things started to display.
Dennis
________________________________
From: UMN MapServer Users List on behalf of Ed McNierney
Sent: Fri 2/24/2006 11:37 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Problem with WMS Connection
Dennis -
Thanks - the server seems fine. But you're not defining a PROJECTION
block for the WMS layer - you need to tell MapServer that the input
image is in EPSG:4269 projection rather than in the default LCC
projection of your output image. Without that, MapServer will treat it
as LCC input coordinates, and the resulting image will be way off-screen
somewhere.
I might be wrong on that - I got in the habit of specifying PROJECTION
blocks for WMS layers a long time ago, when they were required. That
might have changed, but it's worth a try.
- Ed
P.S.
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
________________________________
From: Dennis Megarry [mailto:dennis at megarry.com]
Sent: Friday, February 24, 2006 11:01 AM
To: Ed McNierney
Subject: RE: [UMN_MAPSERVER-USERS] Problem with WMS Connection
I do get a response from it... The actual MAP file is below (since this
is sent off-list). I tried your suggestion and put "&" on the end (see
below) and still nothing.. ARGH!
[MAP file contents removed by Ed before replying on-list]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060224/42530f07/attachment.htm>
More information about the MapServer-users
mailing list