Pâl,

On 28/05/2009, at 9:38 PM, paalkr wrote:

Does anyone have a clue regarding what I have to do, to sort out this issue?

there is a clue in the log file :


[Mon May 25 14:03:08 2009].187807 msPostGISLayerWhichShapes(): Query
error. Error (ERROR:  argument of WHERE must be type boolean, not type
geometry


but if you look at your query in the log file (trying to make it look a bit nice for legibility) :

FROM (
        SELECT  geometri, *
        FROM    general.country
WHERE ST_Intersection(geometri,GeomFromText('POLYGON((12 0,18 0,18 84,12 84,120))',4326))
        ) AS country

You have a WHERE clause that returns a geometry (here is the manual entry)

ST_Intersection(geometry, geometry) Returns a geometry that represents the point set intersection of the Geometries. In other words - that portion of geometry A and geometry B that is shared between the two geometries.

So you need to actually compare something with the geometry to make the where clause work.

I hope this helps to steer you in the right direction... I have no idea what you are trying to compare!

Ben


paalkr wrote:

Hi, thanks for the help!

I tried your suggestion, but I didn't manage to get it to work correctly,
this is what I did:

Entered the following DATA statement:

DATA "geometri from ( select geometri, * from general.country where
ST_Intersection(geometri,GeomFromText('POLYGON((12 0,18 0,18 84,12 84,12
0))',4326)) ) AS country USING UNIQUE ogc_fid USING SRID=4326"

but I then got the following error in the MapServer logfile:

[Mon May 25 14:03:08 2009].185400 msPostGISLayerWhichShapes query: select encode (AsBinary(force_collection(force_2d("geometri")),'NDR'),'base64') as
geom,"ogc_fid" from ( select geometri, * from general.country where
ST_Intersection(geometri,GeomFromText('POLYGON((12 0,18 0,18 84,12 84,12
0))',4326)) ) AS country where geometri &&
GeomFromText('POLYGON((-5.89995617157446
59.7658748898858,-5.89995617157446 75.1604740311875,44.7675433183202
75.1604740311875,44.7675433183202 59.7658748898858,-5.89995617157446
59.7658748898858))',4326)

[Mon May 25 14:03:08 2009].187786 msPostGISLayerWhichShapes query status:
7

[Mon May 25 14:03:08 2009].187807 msPostGISLayerWhichShapes(): Query
error. Error (ERROR: argument of WHERE must be type boolean, not type
geometry

Anyone that can help with this?

Regards,
Pål Kristensen


--

Ben Madin
REMOTE INFORMATION

t : +61 8 9192 5455
f : +61 8 9192 5535
m : 0448 887 220
Broome   WA   6725

b...@remoteinformation.com.au



                                                        Out here, it pays to 
know...


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to