[Chameleon] WMS queryByPoint

Senaratne,Udesh [Ontario] Udesh.Senaratne at ec.gc.ca
Tue Dec 21 10:39:25 EST 2004


Paul,

Can this really be done without accessing Shapes, and without extending
the MapQuery class?   

Without the capability to access individual shape objects with WMS, I
thought that the only other way that this could be done is if the point
feature has in it's attributes, the value of the polygon feature to
which it belongs. Unfortunately our data doesn't permit us to rely upon
that.

I have done some studying on php-mapscript classes, properties and
methods as well as the MapQuery class, Query.widget and QueryResults.  I
still want to execute a pointQuery (using method
executePointQuery($nX,$nY) in class MapQuery).  But for WMS connections,
this will only return a getFeatureInfo URL corresponding to the feature
at $nX, and $nY for all specified layers.  I am not sure how this
information could be used to get all Points within the Polygon.  Any
hints?

Thanks

Udesh

-----Original Message-----
From: Paul Spencer [mailto:pspencer at dmsolutions.ca] 
Sent: Tuesday, December 21, 2004 9:53 AM
To: Senaratne,Udesh [Ontario]
Cc: chameleon at maptools.org
Subject: Re: [Chameleon] WMS queryByPoint


That would require a new query widget or query results page to implement

your specific type of query.  The current query widget queries every 
visible layer at the point that you clicked within a certain tolerance.

It is reasonably easy to do what you need, but you will need to know 
some php_mapscript commands ...

Paul

Senaratne,Udesh [Ontario] wrote:
> Hi list,
> 
> Thanks for you reply Paul.
> 
> The idea was, if we have "layer A" consisting of Polygons, and "layer 
> B" consisting of Points, and the user clicks on Geo-coordinate (x,y) 
> then the Query returns: 1. The polygon feature in layer A that 
> contains the geo-coordinate (x,y) 2. Return all the Points in Layer B 
> be whose Geo-coordinate is contained in the Polygon obtained from 1.
> 
> An example would be, if I clicked somewhere on a Province (suppose 
> polygon layer), I obtain all the cities (a point layer) belonging to 
> that province.
> 
> Udesh
> 
> 
> -----Original Message-----
> From: Paul Spencer [mailto:pspencer at dmsolutions.ca]
> Sent: Monday, December 20, 2004 3:01 PM
> To: Senaratne,Udesh [Ontario]
> Subject: Re: [Chameleon] WMS queryByPoint
> 
> 
> Udesh,
> 
> unfortunately WMS doesn't work like that, you don't have any access to
> the actual underlying data.
> 
> Cheers,
> 
> Paul
> 
> Senaratne,Udesh [Ontario] wrote:
> 
>>Hello,
>>
>>In class,/ MapQuery::executePointQuery($nX, $n)/ [file ... 
>>chameleon/htdocs/common/wrapper/map_query.php]/,/ the mapscript member
> 
> 
>>fucntion/ getWMSFeatureInfoURL(...)/ is used to obtain results when
> 
> the
> 
>>layer connection type is MS_WMS.
>>
>>Does anyone know if it is possible to use the php-mapscript function/ 
>>layerObj::queryByPoint(pointObj, multiple ,buffer)/ to do the same
> 
> thing
> 
>>for WMS connections.  Chameleon uses this method for none WMS
>>connections.  When I tried doing this for WMS connections, I got 0 
>>results for all layers when there should have been more.
>>
>>What I want to do eventually, is to access the shapeObj of the results

>>so that I can use the php-script function : 
>>s/hapeObj::contains(pointObj)/ .
>>
>>Thanks
>>Udesh
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
> 
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+



More information about the Chameleon mailing list