Discussion:
multiple query layers GetFeatureInfo order response
Alberto Asuero Arroyo
2010-01-07 15:18:43 UTC
Permalink
Hi!!

I've being testing and the response order of the GetFeatureInfo template is
the same that the order of the layer in the file .map

I've defined a mapfile with layer1 the first, layer 2 the second ...


On Thu, Jan 7, 2010 at 3:51 PM, Alberto Asuero Arroyo <
Hello
I'm trying to do a multiple query layer GetFeatureInfo against mapserver
5.0.3. Unfortunately Mapserver doesn't respond in the order I expected .
My templates are xhtml that they are parsed from java applet. The issue
come in when several features information are found, mapserver return many
htmls with an order unknown to me.
I'd wish the templates were received in the same order of the layer list of
QUERY_LAYERS
http://10.30.102.100/cgi-bin/sil?VERSION=1.1.1&SERVICE=WMS&FORMAT=image%2Fpng&EXCEPTIONS=application/vnd.ogc.se_xml&TRANSPARENT=FALSE&LAYERS=
*layer1,layer2,layer3*
&WIDTH=1250&HEIGHT=595&SRS=EPSG:23030&BBOX=265683.6,4149453.7,266431.2,4149809.6&REQUEST=GetFeatureInfo&QUERY_LAYERS=
*layer1,layer2,layer3*
&INFO_FORMAT=text/html&FEATURE_COUNT=100&I=973&J=235&X=973&Y=235%27
<html>... template layer2 ...</html>
<html>... template layer1 ...</html>
<html>... template layer3 ...</html>
<html>... template layer3 ...</html>
<html>... template layer2 ...</html>
<html>... template layer1 ...</html>
...
<html>... template layer1 ...</html>
<html>... template layer2 ...</html>
<html>... template layer3 ...</html>
How can I do this?
Thanks in advance
Regards, Alberto
Lime, Steve D (DNR)
2010-01-07 18:14:04 UTC
Permalink
You might try a more recent version of MapServer too. Looking at the code the WMS server does set an internal layer order based on the LAYERS= parameter in the WMS request and the default templating respects that order. I don't know if 5.0.3 works that way or if those are more recent changes.

Steve

From: mapserver-users-***@lists.osgeo.org [mailto:mapserver-users-***@lists.osgeo.org] On Behalf Of Alberto Asuero Arroyo
Sent: Thursday, January 07, 2010 9:19 AM
To: mapserver-***@lists.osgeo.org
Subject: [mapserver-users] Re: multiple query layers GetFeatureInfo order response

Hi!!

I've being testing and the response order of the GetFeatureInfo template is the same that the order of the layer in the file .map

I've defined a mapfile with layer1 the first, layer 2 the second ...

On Thu, Jan 7, 2010 at 3:51 PM, Alberto Asuero Arroyo <***@gmail.com<mailto:***@gmail.com>> wrote:
Hello

I'm trying to do a multiple query layer GetFeatureInfo against mapserver 5.0.3. Unfortunately Mapserver doesn't respond in the order I expected .

My templates are xhtml that they are parsed from java applet. The issue come in when several features information are found, mapserver return many htmls with an order unknown to me.

I'd wish the templates were received in the same order of the layer list of QUERY_LAYERS

For example:

Query 1:

http://10.30.102.100/cgi-bin/sil?VERSION=1.1.1&SERVICE=WMS&FORMAT=image%2Fpng&EXCEPTIONS=application/vnd.ogc.se_xml&TRANSPARENT=FALSE&LAYERS=layer1,layer2,layer3&WIDTH=1250&HEIGHT=595&SRS=EPSG:23030&BBOX=265683.6,4149453.7,266431.2,4149809.6&REQUEST=GetFeatureInfo&QUERY_LAYERS=layer1,layer2,layer3&INFO_FORMAT=text/html&FEATURE_COUNT=100&I=973&J=235&X=973&Y=235%27

Its returns either:

<html>... template layer2 ...</html>
<html>... template layer1 ...</html>
<html>... template layer3 ...</html>

or:

<html>... template layer3 ...</html>
<html>... template layer2 ...</html>
<html>... template layer1 ...</html>

...

I'd wish its always return (like the query list order):

<html>... template layer1 ...</html>
<html>... template layer2 ...</html>
<html>... template layer3 ...</html>

How can I do this?

Thanks in advance

Regards, Alberto
Daniel Morissette
2010-01-07 18:25:39 UTC
Permalink
Post by Lime, Steve D (DNR)
You might try a more recent version of MapServer too. Looking at the
code the WMS server does set an internal layer order based on the
LAYERS= parameter in the WMS request and the default templating respects
that order. I don’t know if 5.0.3 works that way or if those are more
recent changes.
That problem was fixed in 5.6:

http://trac.osgeo.org/mapserver/ticket/2619

Daniel
--
Daniel Morissette
http://www.mapgears.com/
Alberto Asuero Arroyo
2010-01-08 07:29:08 UTC
Permalink
Ok...

Thank you very much

Alberto

On Thu, Jan 7, 2010 at 7:25 PM, Daniel Morissette
Post by Daniel Morissette
Post by Lime, Steve D (DNR)
You might try a more recent version of MapServer too. Looking at the code
the WMS server does set an internal layer order based on the LAYERS=
parameter in the WMS request and the default templating respects that order.
I don’t know if 5.0.3 works that way or if those are more recent changes.
http://trac.osgeo.org/mapserver/ticket/2619
Daniel
--
Daniel Morissette
http://www.mapgears.com/
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
francesco
2010-02-10 08:04:17 UTC
Permalink
Hello list,
I posted a question 3 month ago and lost track of it and found that
Daniel Morissette answered practically the same day. So first of all
thank you Daniel, your help is greatly approciated, sorry for the
silence: second of all I pick up were I left off:

PROBLEM:
I have a mapfile with layers which use two projections:
*main project projection*
PROJECTION
"proj=utm"
"zone=32"
"ellps=WGS84"
"datum=WGS84"
"units=m"
"no_defs"
END
*layer projection*
PROJECTION
"proj=tmerc"
"lat_0=0"
"lon_0=9"
"k=0.9996"
"x_0=1500000"
"y_0=0"
"ellps=intl"
"units=m"
"no_defs"
"nadgrids=lombardia_tot.gsb,null"
END

Both do *not *use the epsg file. the layer is reprojected "perfectly"
(sorry for the non-carthographic emotional term) in the correct project
coordinates. Next step was to zoom to an object in the layer so I
calculated the minum bounding box of the object in the layer and
reprojected it to project coordinates so that I could zoom to the map
correctly. This works but does not consider the "nadgrids" parameter and
thus has quite an error (30 m). Daniel suggested that the PROJ_LIB
configure parameter might be different in the map and in the script. I
checked with a mapobj->configureoptions and got back an empty array in
the script and in the mapfile. In my environment variables PROJ_LIB is
set to the correct folder contiaining the proj epsg & co. files.
I will keep trying and testing and let you know. It is quite strange,
almost like mapscript does not consider the "nadgrids" parameter in the
projection object. Will keep testing.
Cheers,
--
*Francesco Pirotti*
Dep. TESAF
CIRGEO – Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: ***@unipd.it <mailto:***@unipd.it>
Phone: +39 049 827 2710
Phone: +39 349 55 39 261
Loading...