Giter VIP home page Giter VIP logo

gdal_contourf's Introduction

gdal_contourf

Generates filled contours (polygons) from raster data. It runs on the JVM and is optimized for speed. A large raster can typically be processed in a matter of seconds. It uses GDAL to read raster files and write vector files. Contours are generated using the Marching Squares algorithm.

Note that as of GDAL v2.4.0, gdal_contour can produce polygons using the -p option, but it is very slow.

Requirements

  • Java
  • GDAL
  • GDAL Java bindings (libgdal-java on Debian/Ubuntu, gdal-java on Fedora/Centos)

Building

Make sure the GDAL version in build.gradle.kts matches the system version. (ie. 3.0.0)

./gradlew shadowJar

Usage

It can be used as a library with Gradle:

repositories {
    jcenter()
    maven("https://jitpack.io")
}
dependencies {
    implementation("com.github.brewin:gdal_contourf:1.1.2")
}

Or run from the command line:

java -jar gdal_contourf-1.1.2_gdal-3.0.0.jar --in input.tif --band 1 \
    --levels -50 0 50 100 150 --simplification 30 --epsg 4326 \
    --format GeoJSON --out output.geojson

Disclaimer

This is not well-tested and probably never will be. It works for my use-case. Correctness not guaranteed.

gdal_contourf's People

Contributors

brewin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

meteomaps

gdal_contourf's Issues

negative levels

Is there any easy solution to allow for negative levels?

--levels -10 -5 0 10 20

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.