Group: Forum Members
Last Active: 12 Years Ago
Posts: 52,
Visits: 1
|
The help file gives the following simplification example: NPolygonShape polygonShape = (NPolygonShape)shape; NPointFList simplifiedPointList = NPointFList.Simplify(polygonShape.Points, 3); polygonShape.Points = simplifiedPointList.ToArray(); Can I use this to simplify an existing shape file as I read it in? I tried putting this code in the OnPolygonCreated and OnMultiPolygonCreated callbacks, but I suspect it is too late by then. Additionally how do I decide what to use as the tolerance parameter? 3 is no good for my map because it is far too large. Is there a simple algorithm I can apply to determine the best tolerance parameter? Thanks Kevin
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hi, you can apply the simplification whenever you want. It is a generic algorithm that is not closely related to maps, it just simplifies polygon shapes, so you can apply it at any time. There's no an algorithm for selecting a tolerance parameter, because it depends on you map's data and the goals of your project, so our advice is to experiment until you are pleased with the results. Note that for now the simplification acts on polygons only, so it is recommended to use it only on single shapes that are not connected to others such as islands or continents shoreline.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 12 Years Ago
Posts: 52,
Visits: 1
|
Hi What I am trying to do is load a very complex map (of Canada), but simplify it as I load it. Currently, the speed for zooming and panning is completely unusable. Can I simplify the map as I load it? If not, please can you suggest a way to achieve this. Thanks Kevin
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hi, currently there's no way to simplify the map while loading it. If you need a simpler map, we recommend you use a simpler shape file. There is a huge amount of them over the Internet, so you can easily find a smaller one.
Best Regards, Nevron Support Team
|