geotrellis / maml

Map Algebra Modeling Language: It's what we and whales are.
https://geotrellis.github.io/maml/
Apache License 2.0
16 stars 10 forks source link

Add RGB Node #120

Closed pomadchin closed 4 years ago

pomadchin commented 4 years ago

Overview

This PR adds RGB node into MAML.

Checklist

Demo

The tree itself looks the following way:

{
    "args" : [
        {
            "name" : "test1",
            "symbol" : "rasterV"
        },
        {
            "name" : "test2",
            "symbol" : "rasterV"
        },
        {
            "name" : "test3",
            "symbol" : "rasterV"
        }
    ],
    "symbol" : "rgb"
}

This PR also adds rescale and normalize nodes:

{
    "args" : [
        {
            "args" : [
                {
                    "name" : "test1",
                    "symbol" : "rasterV"
                }
            ],
            "newMin" : 10.0,
            "newMax" : 20.0,
            "symbol" : "rescale"
        },
        {
            "args" : [
                {
                    "name" : "test2",
                    "symbol" : "rasterV"
                }
            ],
            "newMin" : 30.0,
            "newMax" : 40.0,
            "symbol" : "rescale"
        },
        {
            "args" : [
                {
                    "name" : "test3",
                    "symbol" : "rasterV"
                }
            ],
            "newMin" : 50.0,
            "newMax" : 60.0,
            "symbol" : "rescale"
        }
    ],
    "symbol" : "rgb"
}

Testing Instructions

./sbt "project mamlJVM" test

Closes #114

pomadchin commented 4 years ago

My suggestion would be to add nodes that would work similar to RF functions: https://github.com/raster-foundry/raster-foundry/blob/develop/app-backend/common/src/main/scala/com/rasterfoundry/common/color/ColorCorrect.scala

pomadchin commented 4 years ago

Rescale node can be implemented as a part of this PR.

pomadchin commented 4 years ago

Merging, since I need the release for the further work. This PR just adds a couple of new MAML nodes.