Code Monkey home page Code Monkey logo

rio-segment's Introduction

Rasterio Segmentation plugin

rasterio plugin using scikit-image to segment a raster or set of overlapping rasters. Also allows segmentation to be informed by existing shapefiles (e.g. ordnance survey data).

Pre-segmentation

Devon

Segmented:

Devon segments

Dependencies:

  • rasterio
  • fiona
  • scikit-image >= pre-0.13

Installation with conda on Windows:

Get miniconda for windows here

# get development scikit-image binaries (built from github master branch on 07-02-2017) 
conda create -n living_maps --channel mparker2 --channel conda-forge scikit-image=pre0.13 rasterio fiona

# activate the conda environment - nb activate script does not work in powershell for some reason?!
activate living_maps

git clone https://github.com/mparker2/rio-segment.git # in git-shell, or download zip
cd rio-segment
python setup.py install

Usage

Usage: rio segment [OPTIONS] INPUTS... OUTPUT

  Segment an raster or set of rasters using watershed and RAG boundary
  merging. Input is a set of one or more rasters. Shapefiles can also be
  specified in the inputs and are used to inform the segmentation. Output is
  in the form of a single shapefile of segments.

Options:
  --no-data INTEGER               Overrides nodata value for raster files
  --shapefile-weight INTEGER      Weighting to give edges from shapefile
                                  compared to edgesdetected from rasters. A
                                  value between 0 and 255
  --size-pen INTEGER              Factor to penalise segments by size on
                                  merging. Set to ero to turn off this
                                  behaviour. Default: 10
  --rescale-perc <INTEGER INTEGER>...
                                  Percentiles to rescale each gtiff band to.
                                  default: 0 98
  --footprint INTEGER             Size of footprint for determining seeds for
                                  watershed segmentation. Default: 3
  --threshold INTEGER             Percentile threshold to merge segments at.
                                  Default: 50
  -h, --help, --usage             Show this message and exit.

rio-segment's People

Watchers

 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.