Hello,
When executing the following code :
var featureLayer = new ShapeFileFeatureLayer("myShapeFile.shp"));
featureLayer.Open();
try
{
var features = featureLayer.QueryTools.GetFeaturesIntersecting(boundingBox, ReturningColumnsType.AllColumns);
foreach (var feature in features)
feature.ColumnValues["TypeName"] = ((int)_typeName).ToString();
return features;
}
finally
{
featureLayer.Close();
}
I sometimes get this exception :
System.InvalidOperationException: The shape you provided does not pass our simple validation.The shape you provided does not pass our simple validation.
bei ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.xff365c684fff1baa(BaseShape x873d2ddd87022b07)
bei ThinkGeo.MapSuite.Core.BaseShape.Intersects(BaseShape targetShape)
bei ThinkGeo.MapSuite.Core.FeatureSource.x54b9ebf1a24b4f52(BaseShape xb513c0b05488b8ed, IEnumerable`1 x8ad42fcdfcf2a001)
bei ThinkGeo.MapSuite.Core.FeatureSource.SpatialQueryCore(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames)
bei ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames)
bei ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, ReturningColumnsType returningColumnNamesType)
bei ThinkGeo.MapSuite.Core.QueryTools.GetFeaturesIntersecting(BaseShape targetShape, ReturningColumnsType returningColumnNamesType)
bei KubaWmsServices.Wfs.FeatureReader.GetFeatures(Double scale, RectangleShape boundingBox) in C:\projects\Kuba50\Implementation\Src\KubaServices\KubaWmsServices\Wfs\FeatureReader.cs:Zeile 55.
bei KubaWmsServices.Wfs.FeatureManager.GetFeatures(WfsRequest parameter) in C:\projects\Kuba50\Implementation\Src\KubaServices\KubaWmsServices\Wfs\FeatureManager.cs:Zeile 64.
bei KubaWmsServices.Wfs.FeatureManager.GetFeaturesAsBinary(WfsRequest parameter) in C:\projects\Kuba50\Implementation\Src\KubaServices\KubaWmsServices\Wfs\FeatureManager.cs:Zeile 28.
bei Wfs.DoAction() in C:\projects\Kuba50\Implementation\Src\KubaServices\KubaWmsServices\Wfs.aspx.cs:Zeile 54.
bei Wfs.Page_Load(Object sender, EventArgs e) in C:\projects\Kuba50\Implementation\Src\KubaServices\KubaWmsServices\Wfs.aspx.cs:Zeile 18.
Here is a watch of the boundingBox variable during the execution :
- boundingBox {626798.572199476,241304.500680686,629287.593547029,239166.932294747} ThinkGeo.MapSuite.Core.RectangleShape
+ base {626798.572199476,241304.500680686,629287.593547029,239166.932294747} ThinkGeo.MapSuite.Core.AreaBaseShape {ThinkGeo.MapSuite.Core.RectangleShape}
Height 2137.5683859389974 double
+ LowerLeftPoint {626798.572199476,239166.932294747,0} ThinkGeo.MapSuite.Core.PointShape
+ LowerRightPoint {629287.593547029,239166.932294747,0} ThinkGeo.MapSuite.Core.PointShape
+ UpperLeftPoint {626798.572199476,241304.500680686,0} ThinkGeo.MapSuite.Core.PointShape
+ UpperRightPoint {629287.593547029,241304.500680686,0} ThinkGeo.MapSuite.Core.PointShape
Width 2489.0213475530036 double
+ Static members
+ Non-Public members
I don't really understand this validation, the bounding box seems to be a correct rectangle.
Is the problem in the shape file ?
Thanks,
Guillaume.