[mapserver-users] Re: Querying type=circle layer

Steve Lime Steve.Lime at dnr.state.mn.us
Wed Apr 8 12:30:58 EDT 2009


Querying isn't supported for circles. It's pretty much a display-only layer type, just like
annotation. The reason being that queries work on the core geometry type of the data
source and not the LAYER TYPE. There is no circle geometry. Doesn't mean it couldn't 
be done but it would take work (search routines would have to be written for circles) to 
do so.

Steve

>>> On 4/8/2009 at 10:07 AM, in message
<aa5471510904080807u620b50e4h30f07a9748d50140 at mail.gmail.com>, Christian Jauvin
<cjauvin at gmail.com> wrote:
> Sorry not "shapeindex".. "index"
> 
> 
> 
> On Wed, Apr 8, 2009 at 11:06 AM, Christian Jauvin <cjauvin at gmail.com> wrote:
>> I found the answer to my question:
>>
>> You have to manually add a "shapeindex" value for each feature that
>> you add, and it has to start from zero.
>>
>> Christian
>>
>>
>> On Tue, Apr 7, 2009 at 5:23 PM, Christian Jauvin <cjauvin at gmail.com> wrote:
>>> Hi,
>>>
>>> I use Python-Mapscript 5.2 on Windows. I have a layer of type=circle
>>> on which I dynamically add features:
>>>
>>> layer = ..
>>> circle_shape = shapeObj(MS_SHAPE_LINE)
>>> p1 = pointObj(..)
>>> p2 = pointObj(..)
>>> line = lineObj()
>>> line.add(p1)
>>> line.add(p2)
>>> circle_shape.add(line)
>>> layer.addFeature(circle_shape)
>>>
>>> Then later I'd like to query that same layer using either
>>> queryByPoint() or queryByRect(), and there my problems begin:
>>>
>>> (1) queryByPoint does not work at all (but the same code I use works
>>> for other layers with static content, loaded from a shapefile or
>>> PostGIS)
>>>
>>> (2) queryByRect seems to work, as it returns MS_SUCCESS when there is
>>> an overlap, but then it seems that I cannot retrieve the shape I want
>>> using the result's shapeindex (I get an error message telling me that
>>> it doesn't exist).
>>>
>>> Am I missing something? Maybe queryByXX work differently with
>>> dynamical content layers? Or maybe with type=circle layers?
>>>
>>> Thanks a lot in advance for any help!
>>>
>>> Christian
>>>
>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list