Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 207
    • Issues 207
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !222

Zonalstatistics

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rémi Cresson requested to merge zonalstatistics into develop Sep 06, 2018
  • Overview 34
  • Commits 66
  • Pipelines 0
  • Changes 4

Summary

Add a new application for zonal statistics.

Rationale

There is currently no such application in the Orfeo ToolBox. This application enables to compute statistics (min, max, mean, standard deviation) of objects in a vector image.

Implementation Details

Input objects can be described from a vector data, or from a label image:

  • mode vector: the VectorData is rasterized at the same origin/spacing/size as the input image. Polygons are numbered starting from 0. The statistics are computed using a StreamingStatisticsMapFromLabelImageFilter.
  • mode label image: the statistics are directly computed using a StreamingStatisticsMapFromLabelImageFilter, from the input image and the label image.

The application enables to produce output stats in multiple forms:

  • as XML (Using a XMLFileWriter as the ComputeImagesStatistics application do),
  • VectorData (stats are written in features of each polygons),
  • or Raster (stats are stored in bands of the output image)
Classes and files
  • A new application in AppClassification: ZonalStatistics (otbZonalStatistics.cxx)
  • 5 tests were added in AppClassification/test
Applications

New: ZonalStatistics application (otbZonalStatistics.cxx)

Tests
  • Input vector / Output vector
  • Input raster / Output XML (without nodata-value for the label image)
  • Input raster / Output XML (with nodata-value for the label image)
  • Input vector / Output raster
  • Input raster / Output raster

I've pushed a new branch in otb-data called "zonalstatistics" which contains new files in baseline and input:

  • Baseline/apTvClVectorData_QB1_ter_with_stats.sqlite
  • Input/Classification/VectorData_QB1_ter.tif
  • Baseline/apTvClVectorData_QB1_ter_stats.xml
  • Baseline/apTvClVectorData_QB1_ter_stats_nodata.xml

Additional notes

Please feel free to discuss this feature.

Copyright

The copyright owner is IRSTEA and has signed the ORFEO ToolBox Contributor License Agreement.


***Check before merging:*** - All discussions are resolved - At least 2 👍 votes from core developers, no 👎 vote. - The feature branch is (reasonably) up-to-date with the base branch - Dashboard is green - Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Edited Nov 08, 2018 by Rémi Cresson
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: zonalstatistics