gijs / bloch Goto Github PK
View Code? Open in Web Editor NEWThis project forked from migurski/bloch
Rock out with your Bloch out.
Home Page: http://github.com/migurski/bloch
This project forked from migurski/bloch
Rock out with your Bloch out.
Home Page: http://github.com/migurski/bloch
Bloch - Simplify linework in polygonal geographic datasources. DESCRIPTION Inspired by Matthew Bloch's MapShaper thesis (http://mapshaper.org), Bloch can load OGR-compatible data sources and simplify the linework while preserving topology. The simplify() method accepts tolerances in map units, so simplification can be performed by known amounts with predictable outcomes. Dependencies include Warmerdam (http://trac.osgeo.org/gdal/wiki/GdalOgrInPython) and Gillies (http://trac.gispython.org/lab/wiki/Rtree, http://trac.gispython.org/lab/wiki/Shapely). Example usage: # Load a data file into a Datasource instance. datasrc = load('input.json') # Simplify the geometry. datasrc.simplify(500) # Save it out to a new shapefile. save(datasrc, 'output1.shp') # This will throw an error, because 250 < 500. datasrc.simplify(250) # Simplify the geometry more. datasrc.simplify(1000) # Save it out to a new GeoJSON file. save(datasrc, 'output2.json') CLASSES Datasource class Datasource | Store an exploded representation of a data source, so it can be simplified. | | Methods defined here: | | __init__(self, srs, geom_type, fields, values, shapes) | Use load() to call this constructor. | | simplify(self, tolerance, verbose=False) | Simplify the polygonal linework. | | This method can be called multiple times, but the process is | destructive so it must be called with progressively increasing | tolerance values. FUNCTIONS load(filename, verbose=False) Load an OGR data source, return a new Datasource instance. save(datasource, filename) Save a Datasource instance to a named OGR datasource.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.