TerraME / terrame

TerraME is a programming environment for spatial dynamical modelling
www.terrame.org
GNU Lesser General Public License v3.0
36 stars 13 forks source link

WMS as a Layer #1549

Closed pedro-andrade-inpe closed 7 years ago

pedro-andrade-inpe commented 7 years ago

Allow opening a WMS as a Layer.

avancinirodrigo commented 7 years ago

In TerraLib the WMS is used like:

import("terralib")

local proj = {
    file = "myproject.tview",
    title = "TerraLib Tests",
    author = "Avancini Rodrigo"
}

File(proj.file):deleteIfExists()

TerraLib().createProject(proj, {})

local conn = {
    url = "http://terrabrasilis.info/terraamazon/ows",
    directory = "D:/terrame/tests",
    format = "jpeg"
}

TerraLib().addWmsLayer(proj, "WMS_Layer", conn, "IMG_02082016_321077D")

The basic parameters are:

    url = "http://terrabrasilis.info/terraamazon/ows",
    directory = "D:/terrame/tests",  --< local directory necessary to WMS informations
    format = "jpeg" --< format extension of the raster image

and The dataset name: "IMG_02082016_321077D"

@pedro-andrade-inpe, how that will be in Layer?

pedro-andrade-inpe commented 7 years ago

Allow selecting "geotiff" (as default) and one or more from the formats below:

Images may be returned in several common web graphics formats: GIF, JPEG and PNG. The format parameter takes one of the following values:

png8 or png (default) specifies the 8-bit PNG format.
png32 specifies the 32-bit PNG format.
gif specifies the GIF format.
jpg specifies the JPEG compression format.
jpg-baseline specifies a non-progressive JPEG compression format.
pedro-andrade-inpe commented 7 years ago

directory is the current directory and should not be available in the interface.

pedro-andrade-inpe commented 7 years ago

dataset name: "IMG_02082016_321077D" should be feature.

pedro-andrade-inpe commented 7 years ago

format is available within Layer and has "png" as default value.