24 October 2014

Simplifying geometries of polygon shape files

If your map works very slowly and you have to wait for a respond for a loooooooooong time, it's a clear sign that you need to simplify the geometries of the shape files.




Polygons are drawn by joining vertices by lines. Simplifying them means getting rid of some vertices. As you can see on the image, it slightly changes shape of the polygon.



Many shape files consists of big number of vertices presenting in details geography of administrative districts. The problem's that when you're working on data visualizations with maps, not always you need so many details. Let's say that you work on the map of the U.S. by states. The users of your data visualization won't enlarge map to see on their screens a few kilometre piece of the border between two states. Even if the border on detail level is a bit distorted there is no issue.

Your choice path looks like this:



There may be some unwanted results of simplifying such as gaps and overlaps. When you enlarge your map and see something like this:





It means that you got them. There're some methods of dealing with them:
1) (If you're a geographer, please don't read the following three sentences for health reasons.) Total acceptance: I do have gaps and overlaps and I don't mind, as they're visible only after enlarging the map multiple times.

This is map of Berlin which I used for one of my vizes, it's very small as it's just a filter for other charts.

As you can see, the map hides a dirty secret, it has gaps.

2) fixing the issue in GIS applications

3) using tools that don't produce gaps and overlaps. I've never had any issues with Map Shaper and SimpliPy (plug-in for QGIS) // Later I'll add here the link // . If you use simplifying function in ShapeToTab you'll always get gaps. Even if you're anti gap still ShapeToTab's fine in exporting to csv as you can simplify geometries in Map Shaper or QGIS before you save it in csv in ShapeToTab.


I'm not a geographer I need to simplify geometries of shape files for data visualizations with maps. In other words I'm not a demanding user of simplifying tools lol. I realize that I'm carefree with simplifying, geographers have harder task as they have to work with many layers so they can't be so relaxed as me. 

No comments:

Post a Comment