Discussion:
Trouble with last dev in the GetFeatureInfo.
Andrea Peri
2014-10-19 08:39:19 UTC
Permalink
Hi,
I upgrade to the last dev of mapserver.

After this, I'm having some troubles when go to do Identify on a layer
with a GetFeatureInfo.

Now I'm havig this error:

[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.

I'm using a postgis to host the layer and this is the setting:

CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test port=5432"
DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END

This setting work for me before, so I guess there is some change to do
in mapfile settings, but I don't understand what.

Any hints ?

Thx,
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
Even Rouault
2014-10-19 15:37:52 UTC
Permalink
Post by Andrea Peri
Hi,
I upgrade to the last dev of mapserver.
After this, I'm having some troubles when go to do Identify on a layer
with a GetFeatureInfo.
[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test
port=5432" DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END
This setting work for me before, so I guess there is some change to do
in mapfile settings, but I don't understand what.
Any hints ?
Andrea,

I believe this is a consequence of http://mapserver.org/development/rfc/ms-
rfc-91.html where FILTER without FILTERITEM is now interpreted as a MapServer
expression in all cases, and not a SQL filter for PostGIS connections.

Although there are following disucssions on that email. See the following
thread :
http://lists.osgeo.org/pipermail/mapserver-dev/2014-September/014228.html

Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
Andrea Peri
2014-10-19 16:11:14 UTC
Permalink
Hi Even,

thx for precious info.

So is sufficient add the
FILTERITEM.
:)

Thx,

A.
Post by Even Rouault
Post by Andrea Peri
Hi,
I upgrade to the last dev of mapserver.
After this, I'm having some troubles when go to do Identify on a layer
with a GetFeatureInfo.
[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test
port=5432" DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END
This setting work for me before, so I guess there is some change to do
in mapfile settings, but I don't understand what.
Any hints ?
Andrea,
I believe this is a consequence of http://mapserver.org/development/rfc/ms-
rfc-91.html where FILTER without FILTERITEM is now interpreted as a MapServer
expression in all cases, and not a SQL filter for PostGIS connections.
Although there are following disucssions on that email. See the following
http://lists.osgeo.org/pipermail/mapserver-dev/2014-September/014228.html
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
Lime, Steve D (MNIT)
2014-10-20 19:20:08 UTC
Permalink
Hmmm... This should have still been interpreted as native SQL without adding the FILTERITEM (did that work by the way?). This is an example of a configuration that will change once 7.0 is completely ready.

Regardless, instead of using a FILTER, it would be simpler to just put the where clause in the DATA statement itself, e.g.:

DATA "geometry from (select geometry mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"

Steve

-----Original Message-----
From: mapserver-users-***@lists.osgeo.org [mailto:mapserver-users-***@lists.osgeo.org] On Behalf Of Andrea Peri
Sent: Sunday, October 19, 2014 11:11 AM
To: Even Rouault
Cc: mapserver-***@lists.osgeo.org
Subject: Re: [mapserver-users] Trouble with last dev in the GetFeatureInfo.

Hi Even,

thx for precious info.

So is sufficient add the
FILTERITEM.
:)

Thx,

A.
Post by Even Rouault
Post by Andrea Peri
Hi,
I upgrade to the last dev of mapserver.
After this, I'm having some troubles when go to do Identify on a
layer with a GetFeatureInfo.
[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test
port=5432" DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END
This setting work for me before, so I guess there is some change to
do in mapfile settings, but I don't understand what.
Any hints ?
Andrea,
I believe this is a consequence of
http://mapserver.org/development/rfc/ms-
rfc-91.html where FILTER without FILTERITEM is now interpreted as a
MapServer expression in all cases, and not a SQL filter for PostGIS connections.
Although there are following disucssions on that email. See the
http://lists.osgeo.org/pipermail/mapserver-dev/2014-September/014228.h
tml
Even
--
Spatialys - Geospatial professional services http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-***@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Andrea Peri
2014-10-20 19:53:20 UTC
Permalink
Hi Steve,

thx for hint ,
Post by Lime, Steve D (MNIT)
DATA "geometry from (select geometry mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"
I dont know this sintax.
It will support the access to all the attributes of the table without
need to list them ?
I like the old sintax because access all the fields without need to
list them one by one in the query.

Also I like to know if this alternative sintax is supported from
Spatialite (by ogr)

We use it with mapserver more often then postgis.

Thx,

Andrea.
Post by Lime, Steve D (MNIT)
Hmmm... This should have still been interpreted as native SQL without adding the FILTERITEM (did that work by the way?). This is an example of a configuration that will change once 7.0 is completely ready.
DATA "geometry from (select geometry mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"
Steve
-----Original Message-----
Sent: Sunday, October 19, 2014 11:11 AM
To: Even Rouault
Subject: Re: [mapserver-users] Trouble with last dev in the GetFeatureInfo.
Hi Even,
thx for precious info.
So is sufficient add the
FILTERITEM.
:)
Thx,
A.
Post by Even Rouault
Post by Andrea Peri
Hi,
I upgrade to the last dev of mapserver.
After this, I'm having some troubles when go to do Identify on a
layer with a GetFeatureInfo.
[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test
port=5432" DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END
This setting work for me before, so I guess there is some change to
do in mapfile settings, but I don't understand what.
Any hints ?
Andrea,
I believe this is a consequence of
http://mapserver.org/development/rfc/ms-
rfc-91.html where FILTER without FILTERITEM is now interpreted as a
MapServer expression in all cases, and not a SQL filter for PostGIS connections.
Although there are following disucssions on that email. See the
http://lists.osgeo.org/pipermail/mapserver-dev/2014-September/014228.h
tml
Even
--
Spatialys - Geospatial professional services http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
Lime, Steve D (MNIT)
2014-10-21 15:07:05 UTC
Permalink
You can certainly do:

DATA "geometry from (select * mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"

and access all attributes. All of the database back-ends, including OGR, support a similar syntax where a "where" clause is embedded in the DATA statement.

Steve

-----Original Message-----
From: Andrea Peri [mailto:***@gmail.com]
Sent: Monday, October 20, 2014 2:53 PM
To: Lime, Steve D (MNIT)
Cc: Even Rouault; mapserver-***@lists.osgeo.org; Andrea Peri
Subject: Re: [mapserver-users] Trouble with last dev in the GetFeatureInfo.

Hi Steve,

thx for hint ,
Post by Lime, Steve D (MNIT)
DATA "geometry from (select geometry mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"
I dont know this sintax.
It will support the access to all the attributes of the table without need to list them ?
I like the old sintax because access all the fields without need to list them one by one in the query.

Also I like to know if this alternative sintax is supported from Spatialite (by ogr)

We use it with mapserver more often then postgis.

Thx,

Andrea.
Post by Lime, Steve D (MNIT)
Hmmm... This should have still been interpreted as native SQL without adding the FILTERITEM (did that work by the way?). This is an example of a configuration that will change once 7.0 is completely ready.
DATA "geometry from (select geometry mytest.layer1 where FOGLIO like '%idtpn%') using unique gid srid=25832"
Steve
-----Original Message-----
Peri
Sent: Sunday, October 19, 2014 11:11 AM
To: Even Rouault
Subject: Re: [mapserver-users] Trouble with last dev in the GetFeatureInfo.
Hi Even,
thx for precious info.
So is sufficient add the
FILTERITEM.
:)
Thx,
A.
Post by Even Rouault
Post by Andrea Peri
Hi,
I upgrade to the last dev of mapserver.
After this, I'm having some troubles when go to do Identify on a
layer with a GetFeatureInfo.
[Sun Oct 19 10:32:25 2014].523176 msEvalExpression(): General error
message. Cannot evaluate expression, no item index defined.
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=test user=test password=test
port=5432" DATA "geometry from mytest.layer1 using unique gid srid=25832"
FILTER "(FOGLIO like '%idtpn%')"
VALIDATION
'idtpn' '^[a-zA-Z0-9\-_]+$'
'default_idtpn' '%'
END
This setting work for me before, so I guess there is some change to
do in mapfile settings, but I don't understand what.
Any hints ?
Andrea,
I believe this is a consequence of
http://mapserver.org/development/rfc/ms-
rfc-91.html where FILTER without FILTERITEM is now interpreted as a
MapServer expression in all cases, and not a SQL filter for PostGIS connections.
Although there are following disucssions on that email. See the
http://lists.osgeo.org/pipermail/mapserver-dev/2014-September/014228.
h
tml
Even
--
Spatialys - Geospatial professional services http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
Loading...