Error loading big shapefiles

Aug 1, 2014 at 12:52 PM
Edited Aug 1, 2014 at 12:52 PM
Hi!

I'm trying to load 2-nd shapefile from here http://openstreetmapdata.com/data/land-polygons/ But size of used memory is too large. How can I fix it?
Coordinator
Aug 1, 2014 at 1:04 PM
This is probably a limitation of the current implementation that has no easy workaround. Does SharpMap perform better on this file?
Aug 1, 2014 at 1:36 PM
Thanks for answer. I'll try to do it after weekend.
Aug 5, 2014 at 7:05 AM
SharpMap performance is much better. It takes only 1.5 Gb memory instead of 12 which consumes mapsui.
Coordinator
Aug 5, 2014 at 11:24 AM
This is a significant difference which needs to be investigated. I suspect it is related to Mapsui's caching of pre-rendered features.

Were all features shown in SharpMap?

In practice we never show such a large number of features all at once. On the one hand for performance and on the other because the map is hard to 'read'. For higher levels a simplified set of features is used and at lower levels a subset of features is shown based on the current map extent. Also the RasterizingLayer can be used to render features to a background bitmap which can be drawn to the map canvas.
Aug 5, 2014 at 12:30 PM
SharpMap shows all features.

I agree that for higher levels I have to use simplified features. But how can I create them? Is there way to simplify existing features?

I want to try to disable pre-rendering caching, how can I do it?

And profiler shows that much time and memory is used by GetBoundingBox functions. Maybe bounding boxes for features should be cached?

Finally I had seen that program renders all features after that it freezes for some time. Why this stop appears?

Thanks for your answers.
Aug 19, 2014 at 11:27 AM
I have the same problem. I can`t load standard land-polygons shapefile from openstreetmapdata.

P.S. I also tried caching boundingboxes it improves loading speed by ~20%
Coordinator
Oct 15, 2014 at 5:49 PM
I created an issue for this:
https://github.com/pauldendulk/Mapsui/issues/17

Also see this comment for a workaround that uses the RasterizingLayer and the gdi rasterizer.
https://github.com/pauldendulk/Mapsui/issues/3#issuecomment-59074648
The gdi rasterizer uses no caching so I expect it to use less memory.