Reading ShapeFile from SQL

2 posts, 0 answers
  1. Josh
    Josh avatar
    8 posts
    Member since:
    Nov 2012

    Posted 17 Jan 2013 Link to this post


    So I've been doing a lot of research, and I cannot find a single thing on this.  Here's my dilemma...I have a utility that allows a user to upload an image to SQL server, to be used as a great.  I now need to be able to support shapefiles, in the same manner.  What I've accomplished thus far is converting shapefile (.shp) into a byte array, and storing in the database as a VarBinary(max).  Data is there, seems ok.  The way I am getting the images (image/shapefile) from the database and into the RadMap, is by using a HttpHandler.  This works great with getting the images, i just set the Uri to the HttpHandler with the ImageId.  This is not working with the shapefile through.  Here is my code snipped below...

    Dim shapeResourceInfo As StreamResourceInfo = Application.GetResourceStream(New Uri(map.ImageUri, UriKind.RelativeOrAbsolute))
                            Dim dbfResourceInfo As StreamResourceInfo = Application.GetResourceStream(New Uri(map.DbfUri, UriKind.RelativeOrAbsolute))
                            Dim shapes As List(Of FrameworkElement) = ShapeFileReader.Read(shapeResourceInfo.Stream, dbfResourceInfo.Stream)
                            For Each shape In shapes
                                Dim infoLayer = New InformationLayer

    The error I am getting is "Specified argument was out of the range of valid values."  

    Any help or tips would be greatly appreciated.  
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 18 Jan 2013 Link to this post

    Hello Josh,

    Your scenario is very complicated and it is hard to reproduce the problem without your solution. Could you, please, provide us with your solution or with a small sample solution which demonstrates the exception?

    All the best,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top