Thursday, 12 March 2015

shapefile - Prevent Mapshaper stripping out data


I'd like to use mapshaper to simplify shapefiles http://www.mapshaper.org/ The main reason is to reduce my file sizes in QGIS as the native tools are too rough / split countries apart.


I can import SHP or topojson OK to QGIS, however all the data tables from my shapefile are gone. How can I get mapshaper to retain country names and codes? I'm new to code.


Im using vectors from Natural Earth http://www.naturalearthdata.com/downloads/10m-cultural-vectors/



Answer



A "ESRI Shapefile" is actually multiple files. The geometries are in the .shp file, the attributes in the .dbf file and there are other files for other things.


You uploaded only the geometry file .shp so Mapshaper has no idea about the attributes.


It might work if you replaced your original .shp with the one exported from Mapshaper but the safest approach would be putting all the Shapefile files (anything with the same prefix basically) in a ZIP archive and upload that.


No comments:

Post a Comment