[udig-devel] Single UDig Layer with Multipe WMS Layers
Joe Dente
jdente at 21technologies.com
Wed Apr 23 09:03:02 PDT 2008
Thanks for the response.
I'm just getting started with udig, so pardon my ignorance of
terminology and the way things are done. Anyways, you were correct. I
added two IGeoResources pointing to different layers on the same WMS
server to the same map using the addLayerCommand(). I then looked at
the WMS request being sent to Geoserver and sure enough both layers were
requested inside a single GetMap command. This behavior is exactly what
I was looking for. I was worried that all the layers were sent across
in individual GetMap requests to the same Geoserver.
As far as combining multiple WMS layers into a single GeoResource, this
is unnecessary. I was trying to do this thinking that it would allow
udig to fetch both layers with a single GetMap command. But, since udig
was smart enough to combine both layers into a single request anyways, I
do not need to worry about creating a new type of GeoResource.
Thanks again.
Joe
-----Original Message-----
From: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net] On Behalf Of Jody
Garnett
Sent: Tuesday, April 22, 2008 6:00 PM
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] Single UDig Layer with Multipe WMS Layers
Joe Dente wrote:
>
> Hi,
>
>
>
> Is it possible to fetch multiple WMS layers merged into a single
> IGeoResource?
>
Point of interest: uDig will send out a single GetMap request if several
WMS Layers from the same server are on your Map. So I find your
question a bit surprising.
Sort of; WMS Layers have a parent / child relationship. Many WMS servers
let you request a folder and will draw you a picture of all of the
contents. This is especially important when the folder contains the same
information at different scales; it allows you to automatically display
data at the correct resolution.
The second answer is yes; you can define a GeoResource on your own that
acts as a "view" combining several existing WMS layers. This is a
construct that would only be available on the client; it does not
reflect anything to do with the server, and it would be a fair bit of
work.
Can I ask for clarification; you actually mean IGeoResource and not
Layer?
>
> I have UDig connected to a WMS server on Geotools. I construct my
> layers by first adding the WMS server to the catalog and then using
> ICatalog.getById() to retrieve layers from the WMS server. This works
> well for adding IGeoResources to my map one at a time. I would like
> to fetch multiple layers in a single request so that Geoserver can do
> all of the work involved in merging multiple WMS images into a single
> image. For example, with openMap I can use
>
http://localhost:8080/geoserver/wms?&request=GetMap&layers=tiger:poly_la
ndmarks,tiger:tiger_roads
>
<http://localhost:8080/geoserver/wms?&request=GetMap&layers=tiger:poly_l
andmarks,tiger:tiger_roads>
> to retrieve multiple layers with a single request, so that openMap
> only receives a single image representing both layers; all of the
> calculations involving features and combining the two layers into a
> single image are performed by the non-client computer hosting
> Geoserver. I would like to do something similar with UDig while
> interacting with the catalog containing my WMS.
>
Right so if you have dragged poly_landmarks and tiger_roads onto a Map
in uDig you will find a single request is sent off to GeoServer as you
pan around.
Now it could be that as you drag them on one at a time; each request is
sent off on its own. We could ask the Renderer to not do anything when
performing a drag with a couple of things selected ....
After you start panning around a bit and you can check your geoserver to
confirm that a single GetMap request is sent with both layers listed.
>
Cheers,
Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list