getFeature problem with C# MapScript
Tamas Szekeres
szekerest at GMAIL.COM
Mon Aug 14 03:23:44 PDT 2006
Hi Zhonghai,
>
> the intQuery value is 1, means that the query is successful, but the intOpen
> is always 0, seems that the layer can not be opened for getFeature function.
> The layer queried is a memory layer created with a function on the fly, I
> don't know if this is a problem for the getFeature function.
>
Both of the functions should return MS_RETURN_VALUE.MS_SUCCESS (value
0) on the successful completion so i guess querybyrect was the
problem.
> the scenario of this function in my application is:
>
> a new layer is created on the fly with the data from the Oracle Spatial
> database when the first user request comes in, and this layer will be always
> the same through out a user session, so I am trying to get the shape objects
> from the layer and store them into a data table, so that I can create a new
> layer with these shape objects without connection with the oracle spatial
> database any more, and this may improve the mapserver performance, since I
> do not need to access the database anymore every time when a new map image
> is needed to be rendered.
>
> and the shape object in the queried layer may be a point or a polygon.
>
> BTW: the map extent unit of the map object is meter, but the queried layer
> has decimal degree (WGS84 layer) as map unit, but the values of the query
> rectangle is also in degree unit, I don't know if this will cause the
> getFeature problem. Just for info.
>
The query rect should be in the same projection as the map. The rect
will be transformed into the layer projection internally.
It would be useful to describe how the layer is created or making a
sample project for the expected operation.
Best Regards,
Tamas Szekeres
More information about the MapServer-users
mailing list