Hi All

I am trying to create a query that uses a mouse click to get coordinates
(from mapserver) and then features within a specified distance are selected
and displayed in different colours. The query I have at the moment works
well, however, the problem I am trying to solve is how to indicate these
distances with concentric circles around the coordinates from the mouse
click. Is this do-able? My query is as follows;

DATA "the_geom FROM (SELECT intname,the_geom, gid, distance(the_geom,
geometryfromtext('POINT(' || (%mapx%) || ' ' || (%mapy%) || ')',4326)) AS
dist from kbapoly) as myquery using SRID=4326 using unique gid"

At the moment I define the distance from the CLASS EXPRESSION so I have 3
classes

1)  EXPRESSION ([dist] <= 1)
2)  EXPRESSION ([dist] >= 1 AND [dist] <= 2)
3)  EXPRESSION ([dist] >= 2 AND [dist] <= 3)

(distance is decimal degrees)

I can create a buffer around a mouse click on the map using the following
query

DATA "the_geom from (SELECT buffer(geometryfromtext('POINT(' || (%mapx%) ||
' ' || (%mapy%) || ')',4326), 1) AS the_geom, gid as gid FROM kbapoly) as
myquery using srid=4326 using unique gid"

What I am struggling with is how to combine these two queries if this is
possible. So I can display three concentric buffers at 1, 2 and 3 decimal
degrees around the selected features.

Any help or advice would be really appreciated.

Thanks in advance

Mark
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to