Mapserver, PostGIS and case

Richard Duivenvoorde rdmailings at DUIF.NET
Fri Mar 9 10:39:42 PST 2007


Hi List,

I've found some other postings about it. But think I've encountered a 
bug or otherwise some non-logical behaviour.

I changed a PostGIS table with a geomety column name the_geom to LOCATIE.

CREATE TABLE "POINTLAYER"
(
	...
   "LOCATIE" geometry NOT NULL,
	...

After some fiddling (reading the postgresql help on 'Identifiers and Key 
Words' and the mapserver list etc) around I was able to show a MAP using 
the following DATA string in the mapfile:

     DATA '"LOCATIE" FROM (select *, oid from "public"."POINTLAYER") as 
foo using unique oid using SRID=28992'

But the featureinfo requests keep failing then with an mapserver error:

Fri Mar 09 19:23:53 2007 - msPOSTGISLayerGetItems(): Query error. 
msPOSTGISLayerGetItems: tried to find the geometry column in the results 
from the database, but couldnt find it.  Is it miss-capitialized? 
'"LOCATIE"'

After changing the column name LOCATIE to locatie:

CREATE TABLE "POINTLAYER"
(
	...
   locatie geometry NOT NULL,
	...
and datastring:

DATA '"locatie" FROM (select *, oid from "public"."POINTLAYER") as foo 
using unique oid using SRID=28992'

produces a map, but NO featureresponse, but errors:

msPOSTGISLayerGetItems: tried to find the geometry column in the results 
from the database, but couldnt find it.  Is it miss-capitialized? 
'"locatie"'

changing the DATA-string to:

DATA 'locatie FROM (select *, oid from "public"."POINTLAYER") as foo 
using unique oid using SRID=28992'

is producing both a map and a featureinfo response :-)

It looks like there is some fiddling around with double quotes in the 
mapserver code, but it looks like the mapping part and featureinfo part 
are working in different ways with quotes?

So, it's working for me now, but I thought that it may be helpfull to 
others to read this. Should I post a bug for this?

Richard



More information about the MapServer-users mailing list