Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
Corrupt Shp file - failed to read None
posted

I am trying to display a pair of .shp/.dbf files in xamGeographicMap that gives the exception shown below when I try to load it.  I am able to open this file set in ArcGIS and Google Earth Pro without any issues.  My XAML is also shown below and I am using v14.2.20142.2024.  Due to NDA and copyright agreements, I cannot upload the files, but what might cause this error in xamGeographicMap or what could I do to determine more information?

        <ig:ShapefileConverter x:Key="fileSource"
              ImportCompleted="file_ImportCompleted"
              ShapefileSource="Q:\GIS\file.shp"
              DatabaseSource="Q:\GIS\file.dbf">
        </ig:ShapefileConverter>

                <ig:GeographicSymbolSeries x:Name="fileSeries" MarkerTemplate="{StaticResource fileMarker}" ItemsSource="{StaticResource fileSource}" LatitudeMemberPath="Lat" LongitudeMemberPath="Lon" VisibleFromScale=".01">
                    <ig:GeographicSymbolSeries.ToolTip>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                            <TextBlock Text="{Binding Path=Item.Info, Converter={StaticResource Converter}}" Background="Aqua" />
                        </StackPanel>
                    </ig:GeographicSymbolSeries.ToolTip>
                </ig:GeographicSymbolSeries>

System.Exception was unhandled
  HResult=-2146233088
  Message=Corrupt Shp file - failed to read None
  Source=InfragisticsWPF4.Controls.Maps.XamGeographicMap.v14.2
  StackTrace:
       at Infragistics.Controls.Maps.ShapeFileUtil.ReadShape(Header shapeHeader, BinaryReader shpReader, BinaryReader dbfReader)
       at Infragistics.Controls.Maps.ShapefileConverter.ParseShapes(BinaryReader shpReader, BinaryReader dbfReader)
       at Infragistics.Controls.Maps.ShapefileConverter.<ImportAsync>b__2(Object sender, GetBinaryReadersCompletedEventArgs e)
       at Infragistics.Controls.Maps.MultiUriProcessor.OnGetBinaryReadersCompleted(GetBinaryReadersCompletedEventArgs e)
       at Infragistics.Controls.Maps.MultiUriProcessor.<>c__DisplayClass2.<GetBinaryReadersAsync>b__0(Object sender, EventArgs e)
       at Infragistics.Controls.Maps.MultiUriProcessor.ProgressMonitor.OnCompleted()
       at Infragistics.Controls.Maps.MultiUriProcessor.ProgressMonitor.CheckComplete()
       at Infragistics.Controls.Maps.MultiUriProcessor.ProgressMonitor.RegisterComplete(Object part, Boolean complete)
       at Infragistics.Controls.Maps.MultiUriProcessor.<>c__DisplayClass4.<GetBinaryReadersAsync>b__1(Object sender, GetBinaryReaderCompletedEventArgs e)
       at Infragistics.Controls.Maps.UriProcessor.OnGetBinaryReaderCompleted(GetBinaryReaderCompletedEventArgs e)
       at Infragistics.Controls.Maps.UriProcessor.<GetBinaryReaderAsync>b__0(Object sender, OpenReadCompletedEventArgs e)
       at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e)
       at System.Net.WebClient.OpenReadOperationCompleted(Object arg)
       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.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at GeoMapTest.App.Main() in c:\Projects\Sandbox\GeoMapTest\GeoMapTest\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       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.Threading.ThreadHelper.ThreadStart()
  InnerException:

Parents
  • 34810
    Offline posted

    Hello Gary,

    Thank you for your post.

    This error is generally thrown when the XamGeographicMap cannot correctly read the shape file. I have been looking at the exception you have pasted here, and at the top it reads "Corrupt Shp file - failed to read None." This tells me that unless the name of your shape file is "None", then the XamGeographicMap is not finding the file at all.

    For me to truly find the cause of this though, I believe that I will need to reproduce this issue using a shape file from you that reproduces this issue. I understand that you cannot upload this file to these forums, and so in hopes that you can upload it privately, I have created a private case for you for this matter. This case has a case ID of CAS-150654-K4D5X8. You can access this case through this link:  https://es.infragistics.com/my-account/support-activity.

    Would it be possible for you to reply to that case with a shape file attachment or sample application that reproduces this issue?

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Developer Support Engineer I
    Infragistics Inc.
    www.infragistics.com/support

Reply Children