Was giving a demo of our new software which uses ThinkGeo for its mapping and had an embarassing crash! (best time to find bugs hey!)... I did a union on two polygons (Shape File) and they weren't entirely overlapping, and I was left with a hole (of sorts) in the middle of the two. "That's ok!" I thought - I just edit and delete those middle points... but had it crash on me when (1) I moved one of the points across onto body of the polygon, (2) when I tried deleting these points.
Is this something that should be addressed in the core (i.e. a bug) - or is there a way that I should test the results of any union attempt, before further editing?
Message=24144: This operation cannot be completed because the instance is not valid. Use MakeValid to convert the instance to a valid instance. Note that MakeValid may cause the points of a geometry instance to shift slightly.
Source=Microsoft.SqlServer.Types
StackTrace:
at Microsoft.SqlServer.Types.SqlGeometry.ThrowIfInvalid()
at Microsoft.SqlServer.Types.SqlGeometry.STCentroid()
at ThinkGeo.MapSuite.Core.BaseShape.GetCenterPointCore()
at ThinkGeo.MapSuite.Core.BaseShape.GetCenterPoint()
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.CalculateDragControlPointsCore(Feature feature)
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.CalculateDragControlPoints()
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.CalculateAllControlPoints()
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.EndEditingCore(PointShape targetPointShape)
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.EndEditing(PointShape targetPointShape)
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.RemoveVertex(PointShape targetPointShape, Double searchingTolerance)
at ThinkGeo.MapSuite.WpfDesktopEdition.EditInteractiveOverlay.MouseDoubleClickCore(InteractionArguments interactionArguments)
at ThinkGeo.MapSuite.WpfDesktopEdition.InteractiveOverlay.MouseDoubleClick(InteractionArguments interactionArguments)
at ThinkGeo.MapSuite.WpfDesktopEdition.WpfMap.thY=(InteractionArguments txY=)
at ThinkGeo.MapSuite.WpfDesktopEdition.WpfMap.sxY=(Object tBY=, MouseButtonEventArgs tRY=)
at ohM=.lRg=.OnDoubleClick(Object sender, MouseButtonEventArgs e)
at ohM=.lRg=.CRk=(Object Chk=, MouseButtonEventArgs Cxk=)
at ohM=.lRg=.DBk=(Object DRk=, EventArgs Dhk=)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at EcoVis.App.Main() in c:\Development\source.NET\ecovis.net\EcoVis\obj\x64\Debug\App.g.cs:line 50
InnerException: