[mapguide-users] how to set "OR SpatialFilter"??
Kenneth, GEOGRAF A/S
ks at geograf.dk
Thu Sep 27 06:09:10 EDT 2007
You cannot do the first suggestion, as the SetSpatialFilter will clear
any previous filter.
You can combine the objects, but you can also use Sql like:
"Geometry Inside GEOMFROMTEXT('...') Or Geometry Inside GEOMFROMTEXT('...')"
The ... should be replaced with the WKT for the objects.
Im not familliar with construction of the query using the API, but
internally there exists objects that represents an Or operation.
If those are avalible to the API, you can construct such objects.
Regards, Kenneth, GEOGRAF A/S
Champin skrev:
> There are three geomertys ,they are geom1 ,geom2 and geom3
>
> Now, I want to select the features in them, in other word, select the
> features inside of geom1 or inside of geom2 or inside of geom3.
>
>
> Then,how do I write the SetSpatialFilter ?? Just like the following ?
>
> queryOp.SetSpatialFilter("Geometry", geom1,
> MgFeatureSpatialOperations.Inside);
> queryOp.SetSpatialFilter("Geometry", geom2,
> MgFeatureSpatialOperations.Inside);
> queryOp.SetSpatialFilter("Geometry", geom3,
> MgFeatureSpatialOperations.Inside);
>
> Or I have to combine all the three geoms into a big one and then
>
> queryOp.SetSpatialFilter("Geometry", TotalGeom,
> MgFeatureSpatialOperations.Inside);
>
> If I have to combine them, and how? how to combine?
>
>
> Thanks in advance~
>
>
More information about the mapguide-users
mailing list