Skip to content
Matthew Bloch edited this page Nov 18, 2019 · 5 revisions

This documentation is current as of version 0.4.141.

Introduction

Mapshaper's web interface is useful for simplifying polygon and polyline datasets interactively. It also supports command line editing via a built-in console.

All processing is done on the client side. Your data stays private, even when using the public website.

The latest version of the web interface is online at www.mapshaper.org.

Loading files via query string

You can add a comma-separated list of file urls as a query string, as in this example.

Running the web UI locally

The mapshaper distribution includes the script mapshaper-gui, which starts a Node web server on localhost and loads mapshaper in a browser at the address http://localhost:5555. Use the --port option to run mapshaper on a different port.

You can list one or more files on the command line to bypass mapshaper's import dialog, like this: mapshaper-gui states.shp rivers.shp

Exporting a browser session as a command line string for the mapshaper shell program to run.

If you run history in the web UI console, the console will translate the current browser session into a command line string. You will probably have to edit this output before it can be successfully run. In particular, you will have to update the paths to the input files. This is because the web browser only knows the names of input files, not their full paths in your computer's filesystem.

Tips for importing Shapefiles

In addition to the .shp file, make sure to also drag-drop or select the .dbf and .prj files from your Shapefile.

If an error message appears warning about an unkown text encoding, you will have to re-import your file, after specifying the correct text encoding in mapshaper's import options dialog. For example, for a file in the Big-5 encoding, you would enter encoding=big5.

Browser support

Mapshaper works in recent versions of Chrome, Firefox, Internet Explorer and Safari. If you encounter out-of-memory errors while editing a large file, try Firefox, which has been used successfully with Shapefiles larger than 1GB.