ThinkGeo.com    |     Documentation    |     Premium Support

TopologyException on GetFeaturesContaining

Hi Team, we have a polygon geometry. Sometimes when calling featureLayer.QueryTools.GetFeaturesContaining we get following exception:

NetTopologySuite.Geometries.TopologyException: ‘side location conflict [ (640100.1610000003, 5359061.3981) ]’

- $exception {“side location conflict [ (640100.1610000003, 5359061.3981) ]”} NetTopologySuite.Geometries.TopologyException
+ Coordinate {(640100.1610000003, 5359061.3981)} NetTopologySuite.Geometries.Coordinate
NetTopologySuite.dll!NetTopologySuite.GeometriesGraph.EdgeEndStar.PropagateSideLabels(int geomIndex)	Unknown
NetTopologySuite.dll!NetTopologySuite.GeometriesGraph.EdgeEndStar.ComputeLabelling(NetTopologySuite.GeometriesGraph.GeometryGraph[] geomGraph)	Unknown
NetTopologySuite.dll!NetTopologySuite.Operation.Relate.RelateComputer.LabelNodeEdges()	Unknown
NetTopologySuite.dll!NetTopologySuite.Operation.Relate.RelateComputer.ComputeIM()	Unknown
NetTopologySuite.dll!NetTopologySuite.Geometries.Geometry.Contains(NetTopologySuite.Geometries.Geometry g)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.BaseShape.ContainsCore(ThinkGeo.Core.BaseShape targetShape)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.FeatureSource.eR8=(ThinkGeo.Core.BaseShape targetShape, System.Collections.Generic.IEnumerable<string> returningColumnNames)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.FeatureSource.SpatialQueryCore(ThinkGeo.Core.BaseShape targetShape, ThinkGeo.Core.QueryType queryType, System.Collections.Generic.IEnumerable<string> returningColumnNames)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.FeatureSource.SpatialQuery(ThinkGeo.Core.BaseShape targetShape, ThinkGeo.Core.QueryType queryType, System.Collections.Generic.IEnumerable<string> returningColumnNames)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.FeatureSource.SpatialQuery(ThinkGeo.Core.BaseShape targetShape, ThinkGeo.Core.QueryType queryType, ThinkGeo.Core.ReturningColumnsType returningColumnNamesType)	Unknown
ThinkGeo.Core.dll!ThinkGeo.Core.QueryTools.GetFeaturesContaining(ThinkGeo.Core.BaseShape targetShape, ThinkGeo.Core.ReturningColumnsType returningColumnNamesType)	Unknown

Agk.Viewer.Presentation.dll!Agk.Viewer.Presentation.ViewerFeatureQueryHelper.QueryNearestFeatureAtLocation(ThinkGeo.Core.FeatureLayer featureLayer, ThinkGeo.Core.PointShape queryLocation, int featureHitTestToleranceInMeters) Line 21 C#

Any help would be appreciated. If you need anything else, let me know.

Thanks
J

Just letting you know that I exported the same geometry to a shapefile, and it works.
The same geometry also works as a SQL Feature Layer.
The issue for me happens in a FileGeoDatabaseFeatureLayer .

Hi, Julian

Since it works with ShapeFileFeatureLayer and SqlServerFeatureLayer but only fails with FileGeoDatabaseFeatureLayer , this looks like a bug where polygon rings weren’t correctly handled (inner vs outer).

We’ve fixed it in ThinkGeo.FileGeoDatabase 14.5.0-beta133 — please grab the latest and give it another try.

If it’s still happening, could you send us your test data at support@thinkgeo.com? We’ll dig into it.

Thanks,
Ben

Hi Ben, I still get the same issue. Here is an image of the shape:

I suspect that the issue is that the feature has an x connection. The small square on top and the larger one below it belong together. Selecting the small top rectangle will select the feature. Clicking on the bottom one will throw that exception.

Does that already help narrowing down the issue? You should be able to just reproduce it with this in a FileGeoDatabase. Again, for some reason this only is thrown in this file format, not any other one.

Thanks
J