[postgis-users] Re: [Mapserver-users] Query postgis layer
Christian Blumer
christian.blumer at epfl.ch
Fri Jun 27 07:33:21 PDT 2003
Oups I forgot that,
I perform
$map->queryByPoint($clickGeo, MS_SINGLE, -1);
Christian Blumer
Ecole Polytechnique Fédérale de Lausanne
ENAC/INTER/PHOT
Batiment GR
1015 Lausanne, Switzerland
----- Original Message -----
From: Oscar Testa
To: postgis-users at postgis.refractions.net
Sent: Friday, June 27, 2003 4:19 PM
Subject: [postgis-users] Re: [Mapserver-users] Query postgis layer
Christian,
where do you perform de query in the mapscript script???
>I am using
>$my_layer = $map->getlayerbyname(ptmesure);
Here you must include something like
$my_layer->queryByPoint($my_point,MS_MULTIPLE,0)
OR
$my_layer->queryByRect($my_rect)
>$numResults = $my_layer->getNumResults();
>but the query result is always 0.
Regards
Oscar
----- Original Message -----
From: Christian Blumer
Cc: mapserver-users at lists.gis.umn.edu
Sent: Friday, June 27, 2003 10:10 AM
Subject: [Mapserver-users] Query postgis layer
Hi all
I would like to make a query on a layer connected to postgis with PHP mapscript.
The layer definition is:
LAYER
NAME ptmesure
STATUS off
TYPE POINT
CONNECTIONTYPE postgis
CONNECTION "user=xxx password=xxx dbname=test host=xxx"
DATA "the_geom from (select * from mesure) as foo using unique gid using SRID=-1"
CLASS
NAME "gps"
COLOR 220 0 0
SYMBOL 'circle'
SIZE 7
TEMPLATE "mesure.html"
END
HEADER "mesure_header.html"
FOOTER "mesure_footer.html"
TOLERANCE 10
END
I am using
$my_layer = $map->getlayerbyname(ptmesure);
$numResults = $my_layer->getNumResults();
but the query result is always 0.
I tested is on the same layer but in shape format and it worked.
What should I do to make it work properly on a postgis layer?
Cheers,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20030627/f9eb9c53/attachment.html>
More information about the postgis-users
mailing list