ThinkGeo.com    |     Blog    |     Wiki    |     Support

ThinkGeo V12 Excessive GetShape Failures on GDB Layers

ThinkGeo Team,

Under V10.5 I implemented the GetShape/Validate methods and have ported that code for use with V12 using the same data.

Under V12 there is a significant increase in GetShape encountering an exception.

If you want to look at the data I had previously uploaded it to my MapSuite File Station under DisplayFileGeoDatabaseSample-ForWpf-master. This was for the form thread:

Below is the basic code:

TheFeaturesCollection = oDatabaseTableItem.FeatureSource.GetAllFeatures(ReturningColumnsType.NoColumns);

foreach (Feature TheFeature in TheFeaturesCollection)
{
	TheBaseShape = TheFeature.GetShape();
}

The screen capture below shows a Feature where GetShape encounters an exception.

The exception encountered is noted below.

Attached is a text file that shows the differences between V10.5 and V12
NotesOnValidatedFeaturesExcluded.txt (958 Bytes)

Regards,
Dennis

2020-03-09 11:54:49,296 ERROR OriStarFileDatabaseViewer - OriStarFileDatabaseViewer->MethodsFeatureIdsToVerify.FeatureIdsToExcludePerformValidity:
Unable to GetShape
TableName=GATE_POINTAnno, Id=107
Source=ThinkGeo.Core
TargetSite=ThinkGeo.Core.BaseShape GetShapeCore()
StackTrace= at ThinkGeo.Core.Feature.GetShapeCore()
at OriStarFileDatabaseViewer.MethodsFeatureIdsToVerify.FeatureIdsToExcludePerformValidity() in C:\OriStarMappingIncThinkGeoUI-V12.1\OriStarFileDatabaseViewer\TheMethodsFeatureIdsToVerify.cs:line 469
Message=Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at ThinkGeo.Core.Feature.GetShapeCore()
at OriStarFileDatabaseViewer.MethodsFeatureIdsToVerify.FeatureIdsToExcludePerformValidity() in C:\OriStarMappingIncThinkGeoUI-V12.1\OriStarFileDatabaseViewer\TheMethodsFeatureIdsToVerify.cs:line 469

From VisualStudio Debug Ouput Window–>>
Exception thrown: ‘System.NullReferenceException’ in ThinkGeo.Core.dll

Hi Dennis,

Thanks to let us know this issue.

In fact V12 return more complete data, it looks the library for V10 filter some invalid data for example part of inner rings, so our validation won’t met problem.

But we think it’s a bug about the parse logic, our developer will work on it, any update I will let you know.

Regards,

Ethan

Hi Dennis,

Our developer had fix this issue.

Please get latest pre-release package and test it.


I hope that’s helpful.

Regards,

Ethan