On Fri, Nov 11, 2011 at 10:20 AM, Ian Turton <ijtur...@gmail.com> wrote:
> On 11 November 2011 09:07, Rahkonen Jukka <jukka.rahko...@mmmtike.fi>
> wrote:
> > Hi,
> >
> > That all comes from WMS standard and it is rather well written there
> http://portal.opengeospatial.org/files/?artifact_id=1081&version=1&format=pdf
> >
> > Logic goes somehow in opposite direction than what you planning to do.
> It assumes that user has made a GetMap request and sees a map on a screen.
> It is just an image and does not include any information about
> georeferencing. If use is clicking on a map the client software can only
> record which pixel was clicked. However, the georeferencing can be computed
> on the WMS server side if the WMS GetMap request with BBOX and image size
> is known.
> >
> > LAYERS just need to be in the request because standard says so but
> QUERY_LAYERS is the one used for selecting layers to be queried. They do
> not need to be the same.
>
> LAYERS is there because in theory you can just change the request from
> getmap to getfeatureinfo and concatenate the click location and query
> layer and send it back. This meant that back in the early days before
> JavaScript became popular you could create a WMS client with some cgi
> shell scripts and a submit button in ah HTML form.
>
I believe this is a valid reason, but there is also a better one.
GetFeatureInfo theretically should tell info about you what you clicked.
Say I have a point layer and a polygon layer, the polygons contain all the
points,
and you want to query them.
If the points are above the polygons the correct answer would contain some
points
data (provided you clicked close enough to one).
But if the polygons are above the points instead, in theory you should not
get
any info because you are actually not seeing them.
The layer ordering can only be detemined by having LAYERS
Now, that said, most servers just query all the layers without checking
what is
hidden and what is visible graphically, so they would return points in both
cases.
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users