Coder Social home page Coder Social logo

emcee22 / mapshaper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mbloch/mapshaper

0.0 2.0 0.0 118.67 MB

Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files

Home Page: http://mapshaper.org

License: Other

JavaScript 98.75% TeX 0.01% CSS 0.80% HTML 0.45%

mapshaper's Introduction

mapshaper

Introduction

Mapshaper is software for editing Shapefile, GeoJSON, TopoJSON, CSV and several other data formats, written in JavaScript.

The mapshaper command line program supports essential map making tasks like simplifying shapes, editing attribute data, clipping, erasing, dissolving, filtering and more.

The web UI supports interactive simplification, attribute data editing, and running cli commands in a built-in console. Visit the public website at www.mapshaper.org or use the web UI locally via the mapshaper-gui script.

See the project wiki for more documentation on how to use mapshaper.

To suggest improvements, add an issue.

To learn about recent updates, read the changelog.

Command line tool

The mapshaper command line program has been used successfully under Mac OS X, Linux and Windows.

The project wiki has an introduction to using the command line tool that includes many simple examples.

For a detailed reference, see the Command Reference.

Interactive web interface

The web UI works in recent versions of Chrome and Firefox as well as IE 10+. Exporting is not supported in Safari.

The mapshaper distribution includes the script mapshaper-gui, which runs mapshaper's web interface locally. You can also visit mapshaper.org to use mapshaper online.

All processing is done in the browser, so your data stays private, even when using the public website.

Large file support

Web interface

Firefox is able to load Shapefiles and GeoJSON files larger than 1GB. Chrome has improved in recent versions, but is still prone to out-of-memory errors when importing files larger than several hundred megabytes.

Command line interface

When working with very large files, Node may crash with the message "JavaScript heap out of memory." You can work around this problem by granting Node more memory. The following example (Mac or Linux) allocates 8GB of memory:

$ node  --max-old-space-size=8192 `which mapshaper` <mapshaper commands>

Installation

Mapshaper requires Node.js.

With Node installed, you can install the latest release version of mapshaper using npm. Install with the "-g" flag to make the executable scripts available systemwide.

npm install -g mapshaper

To install and run the latest development code from github:

git clone [email protected]:mbloch/mapshaper.git
cd mapshaper
npm install
bin/mapshaper     # run the command line program
bin/mapshaper-gui # use the web UI locally

Building and testing

Run the build script to build both the cli and web UI modules.

Run npm test in the project directory to run mapshaper's tests.

License

This software is licensed under MPL 2.0.

According to Mozilla's FAQ, "The MPL's ‘file-level’ copyleft is designed to encourage contributors to share modifications they make to your code, while still allowing them to combine your code with code under other licenses (open or proprietary) with minimal restrictions."

Acknowledgements

My colleagues at The New York Times, for countless suggestions, bug reports and general helpfulness.

Mark Harrower, for collaborating on the original MapShaper program at the University of Wisconsin–Madison.

mapshaper's People

Contributors

mbloch avatar cedricsam avatar clkao avatar danvk avatar geary avatar

Watchers

James Cloos avatar Paul Harbuz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.