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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rio-segment's Issues

Warning: could not load plugin. See `rio segment --help` ?

The plugin is not working.
Warning: entry point could not be loaded. Contact its author for help.

Traceback (most recent call last):
File "D:\py_env\flask_env\lib\site-packages\click_plugins\core.py", line 37, in decorator
group.add_command(entry_point.load())
File "D:\py_env\flask_env\lib\site-packages\pkg_resources_init_.py", line 2346, in load
return self.resolve()
File "D:\py_env\flask_env\lib\site-packages\pkg_resources_init_.py", line 2352, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build\bdist.win-amd64\egg\rio_segment_init_.py", line 5, in
File "build\bdist.win-amd64\egg\rio_segment\split.py", line 9, in
File "D:\py_env\flask_env\lib\site-packages\skimage_init_.py", line 167, in
from .util.dtype import (img_as_float32,
File "D:\py_env\flask_env\lib\site-packages\skimage\util_init_.py", line 6, in
from .apply_parallel import apply_parallel
File "D:\py_env\flask_env\lib\site-packages\skimage\util\apply_parallel.py", line 8, in
import dask.array as da
File "D:\py_env\flask_env\lib\site-packages\dask\array_init_.py", line 9, in
from .routines import (take, choose, argwhere, where, coarsen, insert,
File "D:\py_env\flask_env\lib\site-packages\dask\array\routines.py", line 256, in
@wraps(np.matmul)
File "c:\python27\python2.7.10\Lib\functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: 'numpy.ufunc' object has no attribute 'module'

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.