Speed optimization for large (detailed) shapefile rendering

Topics: General Topics
Jul 18, 2007 at 11:06 AM
Hi all, first time poster here.

I have been using the SharpMap library for some time now and I have to say I am quite impressed. My last stab at GIS-related projects included using the MapPoint ActiveX and this time it's been a refreshing change. I am, however, currently facing a performance-related problem.

I am trying to render the GSHHS dataset (http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html) as a shapefile and, presumably due it s large size (155MB just for the shp file), it takes a considerable time to complete rendering. As the application that I am putting together relies on the assumption of a reasonably fast map-refresh rate (no more than 3-4 seconds), this creates a problem.

I have been considering a number of possible solutions:
- Using a lower-resolution shapefile for far-out view and enabling the GSHHS layer only for close-in zoom. I attempted that, only to find out that the rendering time was not significantly different. This leads me to suspect that, at least by default, the map renderer processes the entire shapefile set regardless of center & zoom.
- Somehow instructing the rendering engine to process only the area defined by the coordinates of the current map edges (as defined by the center & zoom settings), instead of working the complete set every time. Is this possible?
- Breaking the shapefile into numerous smaller areas and assembling them on-demand for rendering as directed by the center & zoom settings. Is this possible?
- Downsampling the shapefile into a lower-res set that should logically yield better performance. What is the most effective way to do this? (I cannot claim to have extensive experience with GIS transforms).
- Tweaking any number of settings on the map engine itself to produce faster results.

I have searched through the discussion threads without finding any relevant subject. Any help towards resolving this issue would be much appreciated.

Cheers,
Dimitris
-
Jul 19, 2007 at 8:42 PM
Sorry I can't help you, but I would like to know the answer too. I'm actually having performance problems with a 10 MB shapefile.
Jul 27, 2007 at 8:56 PM
Edited Jul 27, 2007 at 9:07 PM


Dimitris wrote:
I have searched through the discussion threads without finding any relevant subject. Any help towards resolving this issue would be much appreciated.


Dimitri,

I would suggest to check this workitem "Improved MapImage control" and this discusion thread "MapImage control improved".


George J.
Jul 29, 2007 at 9:37 PM
Edited Jul 29, 2007 at 9:38 PM
Thanks Giorgo :)

I attempted to use the MapBox control a few days ago but IIRC it depended on a more recent build of the main SharpMap assembly than the one I was working with. I will try to use the most recent build and see how it goes.
Jul 30, 2007 at 12:17 PM


Dimitris wrote:
Thanks Giorgo :)

I attempted to use the MapBox control a few days ago but IIRC it depended on a more recent build of the main SharpMap assembly than the one I was working with. I will try to use the most recent build and see how it goes.


The latest version of the source code for MapBox is just posted under the thread "MapImage control improved"...


George J.
Aug 2, 2007 at 11:16 AM
I have a shp about 5 Mb. I use the new MapBox. When zoom is all, the refresh is very slow.

there is any algorithm to make more fast?

Thanks