[Geomoose-users] using WMS from Mapserver
TC Haddad
tchaddad at gmail.com
Mon Nov 22 19:43:31 EST 2010
Hi Mark
If I understand what you want to do correctly, I think you need to point to
your WMS source differently. Basically you are needing to use Mapserver as
both a WMS server (your WMS source) and as a WMS client (via GeoMoose).
First, I assume you have a working WMS at that URL? You should test and
confirm that first before killing yourself over subsequent steps. A simple
test would be to use a browser (with going through GeoMoose) to look at your
GetCapabilities document using something like this:
http://mymapserver.org/cgi-bin/mapserv.exe?map=/location_to_mapfile/mapfile
.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&
if you are successful with that request you can confirm that you are
rendering a map via a GetMap request (obviously use the correct Layer name,
EPSG code and BBOX values) something like this:
http://mymapserver.org/cgi-bin/mapserv.exe?map=/location_to_mapfile/mapfile
.map&&SERVICE=WMS&VERSION=1.1.1&REQUEST=Get
Map&&LAYERS=prov_bound&STYLES=&SRS=EPSG:4326&BBOX=-173.537,35.8775,-11.9603,83.8009&WIDTH=400&HEIGHT=300&FORMAT=image/png
if you are successful in returning an image using a GetMap request, then you
have successfully configured Mapserver as a WMS Server. Now you can move on
to creating a map file for your WMS, which will allow you to use Mapserver
as a WMS client via GeoMoose. A WMS client map file could be something like
this:
LAYER
NAME "prov_bound"
TYPE RASTER
CONNECTIONTYPE WMS
STATUS OFF
CONNECTION "http://mymapserver.org/cgi-bin/mapserv.exe?map=/
location_to_mapfile/mapfile.map&"
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_srs" "EPSG:4326"
"WMS_name" "Provincial_Boundary"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
END
END
Then you can reference that map file as you would any other non-WMS map file
in GeoMoose (normal paths to location of .map on your server, and no need to
add & or ? and extra parameters to file name).
The custom projections for the WMS should be declared in the WMS map file as
above using EPSG codes if possible, and the projection** of you final map
can be set in GeoMoose directly, as you would for any other layer.
I haven't tested this directly, but it seems like this approach should work
given my previous tests.
docs on Mapserver as a WMS Server are here:
http://mapserver.org/ogc/wms_server.html
docs on Mapserver as a WMS client are here:
http://mapserver.org/ogc/wms_client.html
Tanya
** Note that if your WMS service includes rendered labels, and you are
allowing re-projection after rendering, you could see some weird/undesirable
effects.
On Mon, Nov 22, 2010 at 10:13 AM, Mark Volz <MarkVolz at co.lyon.mn.us> wrote:
> Hello,
>
> I would like to add a WMS from another mapserver using the map-source tag.
>
> <map-source name="myName" type="wms" projection="myCountyProjection">
>
> <url>http://MapserverHost.org/cgi-bin/mapserv.exe?map=/
> location_to_mapfile/mapfile.map&</url>
>
> <layer name="myLayer"/>
>
> </map-source>
>
> 1. GeoMoose doesn’t load at all when there is a “&” in the url of the
> wms service. How can I add <url>http://mymapserver.org
> /cgi-bin/mapserv.exe?map=/location_to_mapfile/mapfile.map&</url>?
>
> 2. How can we add a custom projection? Can we add the parameters in
> the projection tag? For example: projection= “+proj=longlat
> +a=6377276.345 +b=6356075.41314024 +no_defs”
>
>
>
> Thanks
>
> Mark Volz
>
> GIS Specialist
>
> Lyon County, MN
>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20101122/c68c348e/attachment.html
More information about the Geomoose-users
mailing list