Top
Menu

Services

Pixel API

The Pixel API allows retrieving pixels values. Using this API, one may do single point or polyline request. Feel free to explore the jupyter notebook concerning this API.

Syntax

To perform a request on the pixel API, at least the POF-ML script and the pixel position that will be calculated must be specified.

Simple pixel request

For a simple pixel request, the API syntax is the following:

https://visioterra.org/VtWeb/servlet/PixelServlet?ModuleId=VtElevation&DatasetId=DEM/SRTM&GranuleId=SRTMGL1_v003&Style=QT_elevation&LON=55.714&LAT=-21.244&BILINEAR=TRUE

where

  • moduleId / datasetId / granuleId - is the product identification. See the Product definition section of POF-ML syntax.
  • style - is the POF-ML script. See the POF-ML Script section of POF-ML syntax.
  • LON & LAT - is the position of the pixel. You can add multiple points if you want.
  • BILINEAR - is wether or not you want bilinear interpolation, if set to FALSE : give the value of the nearest pixel.

The return is the value of the pixel

2236.5683867002795

Polyline request

The Pixel API allow us to get multiple pixels at once by defining a list of points separated by a coma.

https://visioterra.org/VtWeb/servlet/PixelServlet?ModuleId=VtElevation&DatasetId=DEM/COP-DEM/GLO-30&GranuleId=COP-DEM_GLO-30-DGED&Style=QT_elevation&LON=55.706133842467956,55.70642630259118,55.70671876271446&LAT=-21.244339942931713,-21.24433995629202,-21.244339969148157&BILINEAR=TRUE

where the result will be the value of each pixel separated by a coma :

2596.746536249074,2601.4337651421297,2595.6800733870814

Examples

Simple DEM comparison between SRTMGL1 and Copernicus DEM

Here we will perfom a request to retrieve the elevation of SRTMGL1 along a polyline over a crater. Here is the definition of the request :

https://visioterra.org/VtWeb/servlet/PixelServlet?ModuleId=VtElevation&DatasetId=DEM/SRTM&GranuleId=SRTMGL1_v003&Style=QT_elevation&LON=55.706133842467956,55.70642630259118,55.70671876271446,55.707011222837785,55.70730368296117,55.70759614308459,55.707888603208055,55.708181063331565,55.70847352345511,55.708765983578694,55.70905844370232,55.70935090382598,55.70964336394967,55.70993582407338,55.710228284197136,55.7105207443209,55.7108132044447,55.711105664568514,55.71139812469236,55.71169058481622,55.711983044940084,55.71227550506398,55.71256796518787,55.71286042531178,55.7131528854357,55.71344534555963,55.71373780568354,55.71403026580747,55.71432272593141,55.71461518605533,55.714907646179256,55.71520010630317,55.71549256642708,55.71578502655098,55.71607748667487,55.71636994679874,55.716662406922595,55.71695486704644,55.717247327170256,55.71753978729405,55.71783224741782,55.71812470754157,55.71841716766529,55.718709627788975,55.719002087912635,55.71929454803626,55.71958700815984,55.71987946828339,55.7201719284069,55.72046438853037,55.720756848653785,55.72104930877717,55.721341768900494,55.72163422902377,55.721926689147&LAT=-21.244339942931713,-21.24433995629202,-21.244339969148157,-21.244339981500136,-21.244339993347953,-21.244340004691608,-21.244340015531098,-21.244340025866432,-21.244340035697594,-21.2443400450246,-21.244340053847445,-21.24434006216612,-21.24434006998064,-21.244340077290996,-21.244340084097185,-21.24434009039922,-21.24434009619709,-21.244340101490792,-21.244340106280337,-21.24434011056572,-21.244340114346937,-21.24434011762399,-21.24434012039689,-21.24434012266562,-21.24434012443019,-21.2443401256906,-21.244340126446843,-21.244340126698926,-21.244340126446843,-21.244340125690602,-21.244340124430202,-21.244340122665633,-21.244340120396906,-21.24434011762401,-21.24434011434696,-21.244340110565748,-21.244340106280365,-21.244340101490824,-21.244340096197128,-21.244340090399263,-21.24434008409723,-21.244340077291042,-21.24434006998069,-21.244340062166174,-21.244340053847502,-21.24434004502466,-21.244340035697657,-21.244340025866496,-21.24434001553117,-21.24434000469168,-21.24433999334803,-21.244339981500218,-21.244339969148246,-21.24433995629211,-21.244339942931806&BILINEAR=TRUE

with the body

2601.4085388118924,2609.4198225168143,2609.584793844367,2599.5437073435187,2588.9338530951513,2584.67279557795,2583.8442911467396,2582.1696857507304,2581.740195958701,2584.0310424973604,2587.4122724262875,2583.188658632932,2566.892962566359,2531.5211727217634,2496.9962837928215,2476.505238090778,2465.833405155767,2459.308868702099,2456.581420984964,2455.9672657861006,2455.4403901007663,2455.4675448265907,2457.447034742816,2459.140772243486,2458.456414058499,2457.3246109995125,2456.9447951263624,2456.2513371249615,2456.643066404254,2457.0570188642237,2457.9265407133394,2459.088994196607,2459.9448425458513,2460.0,2460.026094618126,2460.3002945540898,2460.9821697023426,2461.4332906744658,2462.39942989171,2463.452182351563,2464.5558631016497,2465.564630066856,2466.4348517007834,2466.902916461081,2468.208505202459,2471.9822474149964,2476.5512600067577,2476.8188366863883,2470.0446565966354,2461.18252349073,2452.8613348793883,2445.42004026423,2437.0861067921514,2423.841470212098,2407.7364807649424

We do the same for the Copernicus DEM.

https://visioterra.org/VtWeb/servlet/PixelServlet?ModuleId=VtElevation&DatasetId=DEM/COP-DEM/GLO-30&GranuleId=COP-DEM_GLO-30-DGED&Style=QT_elevation&LON=55.706133842467956,55.70642630259118,55.70671876271446,55.707011222837785,55.70730368296117,55.70759614308459,55.707888603208055,55.708181063331565,55.70847352345511,55.708765983578694,55.70905844370232,55.70935090382598,55.70964336394967,55.70993582407338,55.710228284197136,55.7105207443209,55.7108132044447,55.711105664568514,55.71139812469236,55.71169058481622,55.711983044940084,55.71227550506398,55.71256796518787,55.71286042531178,55.7131528854357,55.71344534555963,55.71373780568354,55.71403026580747,55.71432272593141,55.71461518605533,55.714907646179256,55.71520010630317,55.71549256642708,55.71578502655098,55.71607748667487,55.71636994679874,55.716662406922595,55.71695486704644,55.717247327170256,55.71753978729405,55.71783224741782,55.71812470754157,55.71841716766529,55.718709627788975,55.719002087912635,55.71929454803626,55.71958700815984,55.71987946828339,55.7201719284069,55.72046438853037,55.720756848653785,55.72104930877717,55.721341768900494,55.72163422902377,55.721926689147&LAT=-21.244339942931713,-21.24433995629202,-21.244339969148157,-21.244339981500136,-21.244339993347953,-21.244340004691608,-21.244340015531098,-21.244340025866432,-21.244340035697594,-21.2443400450246,-21.244340053847445,-21.24434006216612,-21.24434006998064,-21.244340077290996,-21.244340084097185,-21.24434009039922,-21.24434009619709,-21.244340101490792,-21.244340106280337,-21.24434011056572,-21.244340114346937,-21.24434011762399,-21.24434012039689,-21.24434012266562,-21.24434012443019,-21.2443401256906,-21.244340126446843,-21.244340126698926,-21.244340126446843,-21.244340125690602,-21.244340124430202,-21.244340122665633,-21.244340120396906,-21.24434011762401,-21.24434011434696,-21.244340110565748,-21.244340106280365,-21.244340101490824,-21.244340096197128,-21.244340090399263,-21.24434008409723,-21.244340077291042,-21.24434006998069,-21.244340062166174,-21.244340053847502,-21.24434004502466,-21.244340035697657,-21.244340025866496,-21.24434001553117,-21.24434000469168,-21.24433999334803,-21.244339981500218,-21.244339969148246,-21.24433995629211,-21.244339942931806&BILINEAR=TRUE

with the body :

2596.746536249074,2601.4337651421297,2595.6800733870814,2586.734696892662,2584.170776490419,2583.757973604559,2580.436066632713,2573.4660355826086,2558.4560128672438,2529.42950930654,2485.5538647856024,2445.3975195075977,2411.306271534446,2374.172150716121,2348.7167110296596,2333.2764771434768,2325.154999967163,2320.069703305709,2310.5308870936415,2295.156432868246,2277.115514267569,2259.0535586280303,2244.5521293052207,2239.001541608078,2238.259017934148,2238.105467203391,2237.905712700328,2236.940664398865,2236.66353692558,2236.640602555908,2236.468479201942,2236.5373465289845,2236.5042700180293,2237.053343379581,2237.1920888997774,2237.4423799173373,2241.337625470022,2253.1632616003485,2271.8437938381912,2298.84968550363,2329.3658403010363,2355.5207688499336,2378.4470747778796,2395.8641948994405,2416.2544618812194,2445.921772317621,2469.9064936475274,2476.4398341401334,2469.2651176329096,2459.7487277961045,2450.6711891629184,2441.2825187827602,2430.4834613941525,2418.2381775768904,2406.5340881687007

We can now plot the two results to visualize the differences :

crop-field-histogram