LandGIS REST API Information


LandGIS app

Please, feel free to checkout LandGIS API in action by visiting LandGIS app.

OpenGeoHub Geonode

To preview layers individually and access their metadata, visit our Geonode implementation.

REST API


Performance

Lightweight and written in R programming language, LandGIS REST API shows excellent querying performance

Customizable

Users can pass multiple parameters to the query, to filter out the data. Filtering can be performed by variety of categories, but also, there is an option to pass regex parameter to match string patterns in layer file names, which makes this API highly customizable

Multiple layers

Queries can target multiple layers, which enriches the response. For example, user can get time-series data from image mosaics

Documentation

REST API documentation and capabilities are described in Swagger. Swagger is a specification for documenting REST API. It specifies the format (URL, method, and representation) to describe REST web services. Through Swagger, users are able to learn about REST API capabilities and test it out using the interactive interface.

EXAMPLES


LandGIS data services REST API contains scripts and functions that allow users to and developers to fetch raw data (point queries) in some simple textual formats such as GeoJSON, csv, compressed GeoTIFFs or similar. The following query would fetch monthly precipitations at a location X, Y:

http://landgisapi.opengeohub.org/query/point?lat=7.58033&lon=35.6561&coll=layers1km&regex=clm_precipitation_imerge.(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)_m_1km_s0..0cm_.*_v0.1.tif

Result:

                                       
     {
         "Project description": [
             "https://opengeohub.org/about-landgis"
         ],
         "Description of all codes": [
             "https://github.com/envirometrix/landGISmaps/"
         ],
         "info": [ ],
         "response": [
             {
                 "lon": 35.6561,
                 "lat": 7.5803,
                 "clm_precipitation_imerge.apr_m_1km_s0..0cm_2014..2018_v0.1.tif": 149,
                 "clm_precipitation_imerge.aug_m_1km_s0..0cm_2014..2018_v0.1.tif": 194,
                 "clm_precipitation_imerge.dec_m_1km_s0..0cm_2014..2018_v0.1.tif": 48,
                 "clm_precipitation_imerge.feb_m_1km_s0..0cm_2014..2018_v0.1.tif": 51,
                 "clm_precipitation_imerge.jan_m_1km_s0..0cm_2014..2018_v0.1.tif": 56,
                 "clm_precipitation_imerge.jul_m_1km_s0..0cm_2014..2018_v0.1.tif": 184,
                 "clm_precipitation_imerge.jun_m_1km_s0..0cm_2014..2018_v0.1.tif": 198,
                 "clm_precipitation_imerge.mar_m_1km_s0..0cm_2014..2018_v0.1.tif": 109,
                 "clm_precipitation_imerge.may_m_1km_s0..0cm_2014..2018_v0.1.tif": 203,
                 "clm_precipitation_imerge.nov_m_1km_s0..0cm_2014..2018_v0.1.tif": 81,
                 "clm_precipitation_imerge.oct_m_1km_s0..0cm_2014..2018_v0.1.tif": 152,
                 "clm_precipitation_imerge.sep_m_1km_s0..0cm_2014..2018_v0.1.tif": 197
             }
         ]
     }
                                   

The following query would fetch monthly values for FAPAR vegetation indices layer at a location X, Y:

https://landgisapi.opengeohub.org/query/point?lat=44.52784279845551&lon=20.566406249999996&coll=layers250m&&regex=veg_fapar_proba.v.(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)_d_250m_s0..0cm_.*_v1.0.tif

Result:

                                       
    {
        Project description: [
        "   https://opengeohub.org/about-landgis"
        ],
        Description of all codes: [
            "https://github.com/envirometrix/landGISmaps/"
        ],
        info: [ ],
        response: [
            {
                lon: 20.5664,
                lat: 44.5278,
                veg_fapar_proba.v.apr_d_250m_s0..0cm_2014..2017_v1.0.tif: 160,
                veg_fapar_proba.v.aug_d_250m_s0..0cm_2014..2017_v1.0.tif: 164,
                veg_fapar_proba.v.dec_d_250m_s0..0cm_2014..2017_v1.0.tif: 121,
                veg_fapar_proba.v.feb_d_250m_s0..0cm_2014..2017_v1.0.tif: 101,
                veg_fapar_proba.v.jan_d_250m_s0..0cm_2014..2017_v1.0.tif: 105,
                veg_fapar_proba.v.jul_d_250m_s0..0cm_2014..2017_v1.0.tif: 152,
                veg_fapar_proba.v.jun_d_250m_s0..0cm_2014..2017_v1.0.tif: 147,
                veg_fapar_proba.v.mar_d_250m_s0..0cm_2014..2017_v1.0.tif: 130,
                veg_fapar_proba.v.may_d_250m_s0..0cm_2014..2017_v1.0.tif: 165,
                veg_fapar_proba.v.nov_d_250m_s0..0cm_2014..2017_v1.0.tif: 138,
                veg_fapar_proba.v.oct_d_250m_s0..0cm_2014..2017_v1.0.tif: 151,
                veg_fapar_proba.v.sep_d_250m_s0..0cm_2014..2017_v1.0.tif: 149
            }
        ]
    }
                                   

The following query would fetch monthly temperature values at a location X, Y:

https://landgisapi.opengeohub.org/query/point?lat=44.1506811597809&lon=20.21484375&coll=layers1km&&regex=clm_lst_mod11a2.(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).day_m_1km_s0..0cm_.*_v1.0.tif

Result:

                                       
    {
        Project description: [
            "https://opengeohub.org/about-landgis"
        ],
        Description of all codes: [
            "https://github.com/envirometrix/landGISmaps/"
        ],
        info: [ ],
        response: [
            {
                lon: 20.2148,
                lat: 44.1507,
                clm_lst_mod11a2.apr.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14635,
                clm_lst_mod11a2.aug.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 15027,
                clm_lst_mod11a2.dec.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 13656,
                clm_lst_mod11a2.feb.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 13774,
                clm_lst_mod11a2.jan.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 13659,
                clm_lst_mod11a2.jul.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 15076,
                clm_lst_mod11a2.jun.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14896,
                clm_lst_mod11a2.mar.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14280,
                clm_lst_mod11a2.may.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14754,
                clm_lst_mod11a2.nov.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14071,
                clm_lst_mod11a2.oct.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14372,
                clm_lst_mod11a2.sep.day_m_1km_s0..0cm_2000..2017_v1.0.tif: 14697
            }
        ]
    }
                                   

Listing all available layers is performed using the following query:

https://landgisapi.opengeohub.org/query/layers

Result:

                                   
    {
        layers10km: [
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_0_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "0",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_1000_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "1000",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_100_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "100",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_1100_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "1100",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_1200_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "1200",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_1300_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "1300",
            version: "v3.2"
        },
        {
            file: "lcv_landuse.cropland_hyde_p_10km_s0..0cm_1400_v3.2.tif",
            code: "lcv",
            variable: "landuse.cropland",
            procedure: "hyde",
            probability: "p",
            resolution: "10km",
            depth: "s0..0cm",
            time: "1400",
            version: "v3.2"
        }, 
        ...
                               

If you want to determine a soil type (USDA great group) use:

http://landgisapi.opengeohub.org/query/point?lat=30.2543&lon=-95.5811&coll=predicted250m&regex=sol_grtgroup_usda.soiltax_c_250m_b0..0cm_1950..2017_v0.1.tif

Result:

											
 {
     "Project description": [
        "https://opengeohub.org/about-landgis"
     ],
     "Description of all codes": [
        "https://github.com/envirometrix/landGISmaps/"
     ],
     "info": [
        {
           X: 30,
           Number: 30,
           Group: "paleudalfs",
           Great_Group_2015_match: "Paleudalfs",
           Suborder: "Udalfs",
           Order: "Alfisols"
        }
     ],
     "response": [
        {
           lon: -95.5811,
           lat: 30.2543,
           sol_grtgroup_usda.soiltax_c_250m_b0..0cm_1950..2017_v0.1.tif: 30
        }
     ]
 }
									  

You can also target multiple points(limited to maximum of 50 points) by providing geojson with point feature collection and layer name from the table. See the CURL example below:

curl -X POST --form "points=@test_points.geojson" --form "layer=pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif" https://landgisapi.opengeohub.org/query/points -o results.json

GeoJSON example:

                                        
 {
    "type": "FeatureCollection",
    "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },

    "features": [
        { "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Point", "coordinates": [ 9.408390409649236, 52.848327984847899 ] } },
        { "type": "Feature", "properties": { "id": 2 }, "geometry": { "type": "Point", "coordinates": [ 12.702482874944128, 52.478464971200751 ] } },
        { "type": "Feature", "properties": { "id": 3 }, "geometry": { "type": "Point", "coordinates": [ 7.258561642825203, 51.993019765788873 ] } },
        { "type": "Feature", "properties": { "id": 4 }, "geometry": { "type": "Point", "coordinates": [ 6.345462327883812, 49.253721820964699 ] } },
        { "type": "Feature", "properties": { "id": 5 }, "geometry": { "type": "Point", "coordinates": [ 11.847174655885103, 46.630006067905256 ] } },
        { "type": "Feature", "properties": { "id": 6 }, "geometry": { "type": "Point", "coordinates": [ 5.605736300589521, 45.173670451669643 ] } },
        { "type": "Feature", "properties": { "id": 7 }, "geometry": { "type": "Point", "coordinates": [ 1.144263698470827, 46.260143054258137 ] } },
        { "type": "Feature", "properties": { "id": 8 }, "geometry": { "type": "Point", "coordinates": [ 5.374571917060055, 61.678807435673519 ] } },
        { "type": "Feature", "properties": { "id": 9 }, "geometry": { "type": "Point", "coordinates": [ 9.327482875413924, 20.346615660605011 ] } },
        { "type": "Feature", "properties": { "id": 10 }, "geometry": { "type": "Point", "coordinates": [ -11.199914382002657, 19.838054016840182 ] } },
        { "type": "Feature", "properties": { "id": 11 }, "geometry": { "type": "Point", "coordinates": [ -9.304366437061036, 37.314081411667814 ] } },
        { "type": "Feature", "properties": { "id": 12 }, "geometry": { "type": "Point", "coordinates": [ -1.953339040824019, 6.52298552554295 ] } },
        { "type": "Feature", "properties": { "id": 13 }, "geometry": { "type": "Point", "coordinates": [ -85.728430707053448, 37.592505157764784 ] } },
        { "type": "Feature", "properties": { "id": 14 }, "geometry": { "type": "Point", "coordinates": [ -96.388054879886795, 37.384657332667757 ] } },
        { "type": "Feature", "properties": { "id": 15 }, "geometry": { "type": "Point", "coordinates": [ -103.66272875828281, 31.297685311969051 ] } },
        { "type": "Feature", "properties": { "id": 16 }, "geometry": { "type": "Point", "coordinates": [ -101.495172867985218, 22.568076657893833 ] } },
        { "type": "Feature", "properties": { "id": 17 }, "geometry": { "type": "Point", "coordinates": [ -73.851412130080362, 5.138551896185831 ] } },
        { "type": "Feature", "properties": { "id": 18 }, "geometry": { "type": "Point", "coordinates": [ -49.503524047285552, -5.52107227664751 ] } },
        { "type": "Feature", "properties": { "id": 19 }, "geometry": { "type": "Point", "coordinates": [ -69.694455628139792, -10.212494614551879 ] } },
        { "type": "Feature", "properties": { "id": 20 }, "geometry": { "type": "Point", "coordinates": [ -64.735800372253536, -31.412972774448836 ] } }
    ]
 }
                                
                                  

Result:

                                        
    [
      [
        {
          "lon": 9.4084,
          "lat": 52.8483,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 185
        }
      ],
      [
        {
          "lon": 12.7025,
          "lat": 52.4785,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 139
        }
      ],
      [
        {
          "lon": 7.2586,
          "lat": 51.993,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 177
        }
      ],
      [
        {
          "lon": 6.3455,
          "lat": 49.2537,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 156
        }
      ],
      [
        {
          "lon": 11.8472,
          "lat": 46.63,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 177
        }
      ],
      [
        {
          "lon": 5.6057,
          "lat": 45.1737,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 203
        }
      ],
      [
        {
          "lon": 1.1443,
          "lat": 46.2601,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 166
        }
      ],
      [
        {
          "lon": 5.3746,
          "lat": 61.6788,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 158
        }
      ],
      [
        {
          "lon": 9.3275,
          "lat": 20.3466,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 255
        }
      ],
      [
        {
          "lon": -11.1999,
          "lat": 19.8381,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 255
        }
      ],
      [
        {
          "lon": -9.3044,
          "lat": 37.3141,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 255
        }
      ],
      [
        {
          "lon": -1.9533,
          "lat": 6.523,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 185
        }
      ],
      [
        {
          "lon": -85.7284,
          "lat": 37.5925,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 177
        }
      ],
      [
        {
          "lon": -96.3881,
          "lat": 37.3847,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 168
        }
      ],
      [
        {
          "lon": -103.6627,
          "lat": 31.2977,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 11
        }
      ],
      [
        {
          "lon": -101.4952,
          "lat": 22.5681,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 72
        }
      ],
      [
        {
          "lon": -73.8514,
          "lat": 5.1386,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 166
        }
      ],
      [
        {
          "lon": -49.5035,
          "lat": -5.5211,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 230
        }
      ],
      [
        {
          "lon": -69.6945,
          "lat": -10.2125,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 234
        }
      ],
      [
        {
          "lon": -64.7358,
          "lat": -31.413,
          "pnv_fapar_proba.v.jul_d_1km_s0..0cm_2014..2017_v0.1.tif": 104
        }
      ]
    ]