Using MapShaper to Create Smaller Shapefiles and KML through Finder!
We’ve been doing a lot of data migration and new data uploads with Finder! and often times our data team runs into data and mapping headaches. One that we commonly encounter are largish shapefiles that make for really bloated KML when we convert it (for instance a 2mb shapefile for US counties becomes a 5.4 mb KML file). The end result are big files that completely kill browser based applications like Virtual Earth and Google Maps, or load really slowly in thick client applications like Google Earth and ESRI AGX.
There are three factors that constitute file bloat for any vector based geospatial data:
1) The number of attributes (how many columns)
2) The number of features (how many rows)
3) The complexity of the geometry (how much needs to be drawn)
You can do some clever things to manage the first two at a low level – although you still are going to have bloat when you convert to a standard file format. The third factor, geometry complexity, is interesting because you can also do some low level tricks whose savings can be passed along to standard file formats. Reducing the complexity of geometry is often called “map generalization” in academic circles.
The general concept is that you remove details from the map without loosing the message and context of the map. All maps have some form of generalization otherwise it would be a perfect reflection of reality. Academics have used algorithms to heuristically derive a map generalization. This is probably best explained with a few examples. Below is a map of Europe in full detail:
Next is map generalization that removes some of the detail but still keeps the context of Europe and the country boundaries:
Last a more extreme example with even greater detail removed:
To pull off these nifty computational tricks used to require some fairly sophisticated desktop software, but Matt Bloch and Mark Harrower at the University of Wisconsin figured out a clever way to enable enable real-time WYSIWIG map generalization. The resulting application is called MapShaper. You can upload a shapefile and run different generalization routines (with high level of control if you choose) then export the result back out as a shapefile or an EPS file. The shapefile export is down at the moment, but hopefully will back in action soon.
I think these kinds of technologies and mathematics are going to be increasingly important as we need to make ever larger datasets available. Especially when the receiving devices are increasingly mobile with even smaller data handling capabilities.
One Response to Using MapShaper to Create Smaller Shapefiles and KML through Finder!
Leave a Reply Cancel reply
About Us
Welcome to the GeoIQ blog. We write about features of our GeoIQ analytics engine, what is new and exciting in the GeoCommons community, and general industry thought leadership and discussions of geospatial data visualization and analysis.
Please explore what we're working on and let us know if you have any questions or ideas!
New GeoCommons Maps- Mapping Democratic Participation: Money & Recalls geographer
- Petition Circulators in SD13 geographer
- MILITARY_INSTALLATIONS_RANGES_TRAINING_AREAS_PT sparker
- test 2 sam.felipe
- Colorado snow totals Feb 3, 2012 kevingraves
- Colorado snow totals Feb 3, 2012 kevingraves
New GeoCommons Datasets- REGMGR.VOTING_PREC_092011 REQUIRED: The person responsible for the metadata information.
- Snowfall reports for Denver's February snowstorm, Feb. 2-4, 2012
- Area C Samples
- Merge of 'Large/Medium U.S. Military Bases, 2009' into 'MILITARY_INSTALLATIONS_RANGES_TRAINING_AREAS_PT'
- Merge of 'Large/Medium U.S. Military Bases, 2009' into 'MILITARY_INSTALLATIONS_RANGES_TRAINING_AREAS_PT'
- snow_totals_0730
Recent Comments
- tefal ütü on Dataset of the Day: Early Voting—November 3, 2008
- doğalgaz tesisatı on Dataset of the Day: Early Voting—November 3, 2008
- Hosea Viard on Media brands Florida Democratic Primary as Clinton's beauty contest!
- J. Kevin Byrne on More Ways to Visualize Data: Charts
- cappadocia on Dataset of the Day: Early Voting—November 3, 2008








[...] Using MapShaper to Create Smaller Shapefiles and KML through Finder! – Official Blog of FortiusOne Combating shapefile to KML bloat with generalization routines in web-based MapShaper. (tags: gis mapping kml mapshaper map-generalization) [...]