Hi,
I downloaded the sample of isoline (wiki.thinkgeo.com/wiki/File:ServicesEditionSample_Isolines_CS_WPF_111115.zip)
I tested with the data of the sample, I have not changed anything.
I chose the option ClosedLinesAsPolygons, I clicked on Generate and there is an error :
L’exception System.BadImageFormatException n’a pas été gérée
HResult=-2147024885
Message=Tentative de chargement d’un programme de format incorrect. (Exception de HRESULT : 0x8007000B)
Source=Microsoft.SqlServer.Types
StackTrace:
à Microsoft.SqlServer.Types.GLNativeMethods.IsValid(GeoMarshalData g, Boolean& result)
à Microsoft.SqlServer.Types.GLNativeMethods.IsValid(GeoData g)
à Microsoft.SqlServer.Types.SqlGeometry.IsValidExpensive()
à Microsoft.SqlServer.Types.SqlGeometry…ctor(GeoData g, Int32 srid)
à Microsoft.SqlServer.Types.SqlGeometry.Construct(GeoData g, Int32 srid)
à Microsoft.SqlServer.Types.SqlGeometry.GeometryFromBinary(OpenGisType type, SqlBytes binary, Int32 srid)
à Microsoft.SqlServer.Types.SqlGeometry.STGeomFromWKB(SqlBytes wkbGeometry, Int32 srid)
à ThinkGeo.MapSuite.Core.IsoLineLayer.5yw=(GridCell[,] 6Cw=, GridCell[,] 6Sw=, Double 6iw=, Double 6yw=)
à ThinkGeo.MapSuite.Core.IsoLineLayer.GetIsoFeatures(GridCell[,] gridMatrix, IEnumerable`1 isoLineLevels, String dataValueColumnName, IsoLineType isoLineType, Double noDataValue)
à ThinkGeo.MapSuite.Core.InMemoryGridIsoLineLayer.GetIsoLineFeatures()
à DisplayIsoLinesWPF.Sample.GetGridIsoLineLayer() dans C:\Steph_Poub\Thinkgeo\DownloadThinkgeo\ServicesEditionSample_Isolines_CS_WPF_111115\DisplayIsoLinesWPF\Sample.xaml.cs:ligne 145
à DisplayIsoLinesWPF.Sample.btnGenerateGridFile_Click(Object sender, RoutedEventArgs e) dans C:\Steph_Poub\Thinkgeo\DownloadThinkgeo\ServicesEditionSample_Isolines_CS_WPF_111115\DisplayIsoLinesWPF\Sample.xaml.cs:ligne 308
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
à System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
à System.Windows.Controls.Primitives.ButtonBase.OnClick()
à System.Windows.Controls.Button.OnClick()
à System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
à System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
à System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
à System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
à System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
à System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
à System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
à System.Windows.Input.InputManager.ProcessStagingArea()
à System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
à System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
à System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
à System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
à System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
à System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
à System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
à System.Windows.Forms.NativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
à System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
à System.Windows.Threading.Dispatcher.Run()
à System.Windows.Application.RunDispatcher(Object ignore)
à System.Windows.Application.RunInternal(Window window)
à System.Windows.Application.Run(Window window)
à System.Windows.Application.Run()
à DisplayIsoLinesWPF.App.Main() dans C:\Steph_Poub\Thinkgeo\DownloadThinkgeo\ServicesEditionSample_Isolines_CS_WPF_111115\DisplayIsoLinesWPF\obj\x86\Debug\App.g.cs:ligne 0
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:
Thanks for your help.
Regards.
Steph.
Sample Isoline Error
Hi Steph,
We cannot recreate this issue on our end. Would you please let us know which version of Map Suite you are referrencing? And seems the CultureInfo of you machine is French, we’ve fixed a bug related CultureInfo. Would you please try the latest version of Map Suite? And please replace the 67th line of Sample.xaml.cs with code bellow in case of an exception caused by format:
//wellDataPoints.Add(new PointShape(double.Parse(parts[0]), double.Parse(parts[1])), double.Parse(parts[2]));
wellDataPoints.Add(
new
PointShape(
double
.Parse(parts[0], CultureInfo.InvariantCulture),
double
.Parse(parts[1], CultureInfo.InvariantCulture)),
double
.Parse(parts[2], CultureInfo.InvariantCulture));
Hope this would be helpful.
Thanks,
Kevin
Hi Kevin,
In fact, the problem came from the target platform.
I changed x86 to anyCpu for the project and that works.
Thanks.
Regards.
Hi Steph,
Actually, the sample works on our end even the platform is X86. So would you please provide the version of Map Suite you are referencing, or the hardware envrionment of your machine?
Thanks,
Kevin
Hi Kevin,
The version of map suite is 8.0.0.58 and the hardware environment is x64 processor.
Regards.
Steph.
Hi Steph,
Thanks for providing us these information.
Seems the 8.0.0.58 still works on our end. Not sure what is the reason. Anyway, if the issue still bother you, could you please try the latest version and see if the issue still persist.
Regards,
Kevin