[Mapserver-dev] Re: layer queryByShape and SDE

Howard Butler hobu at iastate.edu
Fri Jan 16 14:58:58 EST 2004


Peter,

Sorry that I didn't post my specs before.  MapServer 4.0.1, Python 2.3, SDE 
8.3.

I looped through both layers using the SDE API and didn't find any shapes 
that were NULL (using SE_shape_get_type for each shape in the 
layers).  Also, adding the AND SHAPE is not NULL to my query string had no 
effect on the segfault either.

Speculating here...It appears to me (a rather novice C programmer) that 
mapsde.c sets a spatial constraint on the stream that it uses to query from 
SDE.  The shape that it sets as the constraint is an envelope, and not a 
passed-in shape.  That must mean that layer.queryByShape actually does its 
business somewhere else in MapServer (and not directly to SDE), or SDE only 
supports queryByRect at this time.

I'll keep digging.

Howard


At 12:53 PM 1/16/2004, you wrote:
>Not sure if it is related but,
>
>does your SDE layer have any records with a NULL in the SPATIAL (usually 
>named SHAPE) column.
>
>we have run into an issue using the SDE api directly(and via MO) where 
>searchbyshape fails because of a NULL value in the spatial_column(SHAPE). 
>One possible way around this is to exclude the NULL shapes from your query 
>e.g. add "AND SHAPE is not NULL"
>
>not sure how this translates into Mapserver/Python wrappers.
>
>Peter.
>
>_______________________________________________
>Mapserver-dev mailing list
>Mapserver-dev at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev




More information about the mapserver-dev mailing list