GithubHelp home page GithubHelp logo

isabella232 / nextgisutilities Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nextgis/nextgisutilities

0.0 0.0 0.0 215 KB

:hammer: Various console utilities

License: GNU General Public License v2.0

CMake 21.04% C++ 77.62% C 1.09% Dockerfile 0.24%

nextgisutilities's Introduction

NextGIS utilities

Various NextGIS console utilities

Language

Usage

ng_cutter

Like ogr2ogr with multithread cutting (-clipsrc)

ng_cutter -f "ESRI Shapefile"  -overwrite -progress -skipfailures  -nlt MULTIPOLYGON -lco SPATIAL_INDEX=NO      -lco ENCODING=UTF-8 -clipsrc boundary.geojson ngcutter_clipped.shp multipolygons.shp

Install

sudo apt-get install software-properties-common python-software-properties
sudo apt-add-repository ppa:nextgis/ppa
sudo apt-get update
sudo apt-get install nextgisutilities-bin

See http://nextgis.ru/borsch/ for repository info

Performance checking

Normal run

time ogr2ogr -overwrite -progress -skipfailures -lco ENCODING=UTF-8 -clipsrc ./osm_cut/irk_bnd.shp ./osm_cut/water-polygon-ogr-final_tmp.shp ./osm_cut/water-polygon1.shp 0ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile. ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile. .ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 106.2761148 56.456976099999999 at 106.2761148 56.456976099999999 ..10...20...30...40...50...60...70...80...90...100 - done.

real 3m15.196s

user 3m11.837s

sys 0m2.982s

Check if cut geometry contains output geometry

time ./ng_cutter -overwrite -progress -skipfailures -lco ENCODING=UTF-8 -clipsrc /Volumes/Data/tmp/osm_cut/irk_bnd.shp /Volumes/Data/tmp/osm_cut/water-polygon-ogr-final_tmp.shp /Volumes/Data/tmp/osm_cut/water-polygon1.shp 0..10...20...30...40...50...60...70...80...90...100 - done.

real 0m35.785s

user 0m35.068s

sys 0m0.536s

Multithreaded cut

time ./ng_cutter -overwrite -progress -skipfailures -lco ENCODING=UTF-8 -clipsrc /Volumes/Data/tmp/osm_cut/irk_bnd.shp /Volumes/Data/tmp/osm_cut/water-polygon-ogr-final_tmp.shp /Volumes/Data/tmp/osm_cut/water-polygon1.shp --config GDAL_NUM_THREADS 8 0...10...20...30...40...50...60...70...80...90...100 - done.

real 0m10.708s

user 1m1.093s

sys 0m15.187s

License

This program is licensed under GNU GPL v2 or any later version

License

Version

0.1.0-27

Commercial support

Need to fix a bug or add a feature to NextGIS Web? We provide custom development and support for this software. Contact us to discuss options!

http://nextgis.com

nextgisutilities's People

Contributors

bishopgis avatar trolleway avatar 514ckw4r3 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.