This is a migrated thread and some comments may be shown as answers.

Performance issue in loding Shape File

3 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nilesh
Top achievements
Rank 1
Nilesh asked on 26 Oct 2012, 01:34 PM
Hi Team,

My application is in Silverlight 4.0. and using Telerik RadMap control version 2012.1.326.1040 (i.e. RadControls_for_Silverlight4_2012_1_0326_DEV_hotfix) but the problem is when i am loading shape file(5 mb) it takes lot of time(approximate 3 to 4 mins) to display on map and also takes time during zoom in zoom out.
So please let me know the solution as early as possible. its urgent requirement for the project.

I am not able to load local shape files.
Application throws an exception:
 Input string was not in a correct format.
 at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Telerik.Windows.Controls.Map.DbfReader.GetNextRecord()
   at Telerik.Windows.Controls.Map.DbfReader.MoveNext()
   at Telerik.Windows.Controls.Map.ShapeFileReader.GetExtendedData(DbfReader dbfReader)
   at Telerik.Windows.Controls.Map.ShapeFileReader.GetShape(EndianBinaryReader reader, DbfReader dbfReader, List`1 list, ShapeFileReaderParameters parameters)
   at Telerik.Windows.Controls.Map.ShapeFileReader.GetShapes(EndianBinaryReader reader, ShapeFileHeader header, DbfReader dbfReader, ShapeFileReaderParameters parameters)
   at Telerik.Windows.Controls.Map.ShapeFileReader.Read(ShapeFileReaderParameters parameters)
   at Telerik.Windows.Controls.Map.MapShapeReader.ReadShapeFileByType(ShapeReaderStatus status)
   at Telerik.Windows.Controls.Map.MapShapeReader.CompleteReading(ShapeReaderStatus status, Exception error)
   at Telerik.Windows.Controls.Map.MapShapeReader.CheckComplete(Exception serviceError, Object userState, Stream stream, Boolean data)
   at Telerik.Windows.Controls.Map.MapShapeReader.ReadData(Uri dataUri, ShapeReaderStatus userState)
   at Telerik.Windows.Controls.Map.MapShapeReader.Read(Uri uri, Uri dataUri)
   at Telerik.Windows.Controls.Map.MapShapeReader.Read()
   at Telerik.Windows.Controls.Map.MapShapeReader.StartRead()

Please tell me where did i made an mistake? why i am getting this error..?

Thanks in advance.

Regards,
Nilesh

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 30 Oct 2012, 05:15 PM
Hello Nilesh,

The map control supports reading large shape files, but if this file has a lot shapes or shapes with a lot of points, then the rendering performance can be insufficient.

If your application doesn’t need the shape-file which contains very detailed map with polygons which contains a lot of points then you might try to simplify the shape-file for improve the performance with this online tool:

http://mapshaper.com/test/MapShaper.swf


All the best,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nilesh
Top achievements
Rank 1
answered on 31 Oct 2012, 07:29 AM
Dear Andrey,

Thanks for the reply.
I just want to know few points from your side:

1) I am trying to load shape file of 5mb,which has 245 polygons and i am facing an performance issue. It takes 4 to 5 min to load this shape file on map control. As you said,map control supports reading large files,but our GIS team said that the file which i am using in my application contain 0.5% data which is very small as we may have large number of data.

I am not able to upload world.shp file of 5mb on this forum (as size limit exceeds 2 mb).
I am using Telerik RadMap control version 2012.1.326.1040 (i.e. RadControls_for_Silverlight4_2012_1_0326_DEV_hotfix) and silverlight 4.0.
Is there any Hot fixes in telerik mentioned version for silverlight 4?

2) Shape file which i mentioned above it loads on mapcontrol but it takes lot of time, whereas i have another local shape files which are not loading and throws an exception as i mentioned earlier post.
can you tell me proper reason, why i am getting that exception?
and which projection supported by the radmap control version 2012.1.326.1040?

3) As you replied, if shape files has lots of points,then the rendering performance can be insufficient.
Is that issue resolved in the latest telerik release i.e. Q3 2012 (version 2012.3.1017)?
If yes then is this version for silverlight 4 or 5?

Please revert back with each mentioned points.

Thanks & Regards,
Nilesh
0
Accepted
Andrey
Telerik team
answered on 02 Nov 2012, 07:48 AM
Hi Nilesh,

1) If your shape-file of 5mb contains 245 polygons, then these polygons contain a lot of points. So, it is rendered very slow. When you have a need to show a large GIS data on the map then I would recommend considering a possibility of server side rendering of GIS data to the tile images like it provides the OpenStreet and Bing.

2) Unfortunately it is hard to say about particular causes of this problem without your shape-file, but using the stack trace you sent. Most often this problem occurs when the DBF-file contains the asterics symbols in numeric fields. It can occur because of the arithmetic overflow when inserting a data to DBF-file.

3) The current version of the map control cannot help to resolve the performance issue for large GIS data anyway.

Kind regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
Nilesh
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Nilesh
Top achievements
Rank 1
Share this question
or