Where to find correct shapefiles : Unable to read beyond the end of the stream

Hello,

I'm trying to use shapefile downloaded from the web but I get this error for most of them : "Unable to read beyond the end of the stream"

First I thought it was a question of file size as my .shp is like 7mo, so I tried with one of 18ko and get this error too. However shape files shipped with sample in the syncfusion samples are working great.

So, where do shape files from the sample are coming from ? 

Plus, I got a question : How is working the lattitude and longitude attributes for marker on a shapefile from a specific country, like in the sample on the USA shape file ? 

Finally, is it possible to have OSM theming using ImageryLayer ? 

EDIT : I downloaded shape files which give me error from here  => https://www.data.gouv.fr/fr/datasets/carte-des-regions-francaises-nouvelles-regions-de-2016/#_

Thanks. 

4 Replies

MP Michael Prabhu M Syncfusion Team October 5, 2018 03:24 PM UTC

Hi Rjuken, 
 
Greetings from Syncfusion, we have downloaded the shape file from the link provided by you and we were able to reproduce this issue at our end, we are validating this we will update you the status of this in one business day 8th October 2018. We appreciate your patience until then. 
 
Thanks, 
Michael 




YS Yogapriya Shanmugam Syncfusion Team October 8, 2018 12:35 PM UTC

Hi Rjuken, 
 
Query 1: Getting exception on using shape file. 
 
This reported problem occurs only on accessing the large set of records (dbf file records). This problem will not arise on using small set of records. The link you have shared holds large set records in the shape files. 
We confirm this as a bug and logged defect report for this. This issue fix will be available in our upcoming Volume 3 SP1 release which is expected to be roll out on end of October 2018. 
 
Query 2: How do the latitudes and longitudes work. 
 
Every shape files have the specific coordinates range to represent the shapes, since the latitude and longitude is unique for every country, marker will be placed exactly on that specified coordinates. 
 
Query 3: OSM theming using Imagery layer 
 
We do support OSM in our maps. Please refer our UG document for using it. 
 
 
Regards, 
Yogapriya.S 



RD Rjuken Developments October 20, 2018 12:42 PM UTC

Hello syncfusion Team,

Thank you for your support and answers. 

Query 1 :
I found out that you are right, this error appears with huge shape files. I fixed the prob by importing this shape files on this website  and re-exporting them.

Query 2 : 

That's awesome. Thanks

Query 3 : 

Yes I knew we can use OSM with SfMap. My question was about theming/tiles the OSM map within the SfMap : https://openmaptiles.org/styles/

Thank you ! 


MP Michael Prabhu M Syncfusion Team October 23, 2018 08:54 AM UTC

Hi Rjuken, 
 
Query: Theming support for OSM maps. 
 
We have analyzed your requirement based on the provided link, we do not have in built theming support in our OSM, but this can be achieved by getting the custom uri (tiles url for the required style such as Positron, Dark Matter etc.). 
 
Using custom renderer, we can pass this url by overriding the GetUri method. You can refer the below KB link for accessing the uri of desired maps tile provider. 
 
 
Also, we have prepared a sample for this and we have used the Positron style (light). 
 
You can download the sample from the below link 
 
 
 
Output screenshot 
 
 
 
Thanks, 
Michael 


Loader.
Up arrow icon