Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

filter with OR and SpatialFilter

1 REPLY 1
Reply
Message 1 of 2
nick_xu
532 Views, 1 Reply

filter with OR and SpatialFilter

my code does a query based on filter and within the goemetry selected.

 

If the filter is simple like "TYPE=1", then it works fine, but when Filter contains OR, then it will return all features and ignore the spatial filter.


queryOptions.SetFilter("TYPE=1 OR TYPE = 2")

queryOptions.SetSpatialFilter(geometryField, selectionPoly,

MgFeatureSpatialOperations.Intersects);

 

MgFeatureReader fr = this._featureService.SelectFeatures((newMgResourceIdentifier(themeLayer.FeatureSourceId)), themeLayer.GetFeatureClassName(), queryOptions);

 

 

the feature provider is autodesk.oracle.

 

I did another test using sdf based layer and it returned features inside selected geometry on both filter with or without "OR" situations.


 

1 REPLY 1
Message 2 of 2
jackie.ng
in reply to: nick_xu

I think it may be the same problem as this one:

 

http://trac.osgeo.org/fdo/ticket/864

 

Basically, the FDO provider is not properly wrapping () around the translated non-spatial filter resulting in incorrect operator precedence when combined with a spatial filter.

 

- Jackie

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report