API REST specifiche per le operazioni di download, clipping e geoprocessing, per garantire l’interoperabilità dei dati
Lo scarico è possibile attraverso chiamate GET HTTP che restituiscono dati dal GeoDB, usando una URL composta da una parte fissa e da una variabile.
La parte fissa (BASE_URL)
https://droughtsdi.fi.ibimet.cnr.it/dgws/api
La parte variabile è composta da tre diversi parametri: il formato dell’immagine, il tipo di immagine e il periodo. I parametri opzionali possono essere definiti se si vuole selezionare un poligono specifico di interesse per l’utente.
Formato immagine
Tipo di immagine (parametro o indice)
Periodo
N.B.: per l’indice SPIil giorno o il doy va indicato l’ultimo giorno del mese. Per gli altri indici, il giorno o il doy devono corrispondere con il giorno per cui sono disponibili le immagini satellitari.
Opzioni (solo per j_get_image)
La definizione del giorno è obbligatoria, anche se si vogliono scaricare indici con risoluzione temporale mensile, settimanale o bi-settimanale. Le immagini PNG sono classificate, mentre quelle GTIFF sono salvate in formato real.
BASE_URL/download/j_get_whole_{image_format}/{image_type}/{year}/{doy}
BASE_URL/download/j_get_whole_{image_format}/{image_type}/{year}/{month}/{day}
https://droughtsdi.fi.ibimet.cnr.it/dgws/api/download/j_get_whole_png/spi6/2018/5/31
http://149.139.16.84:8080/dgws/api/download/j_get_whole_gtiff/spi3/2017/209
Tramite chiamate GET HTTP è anche possibile selezionare uno o più poligoni per ritagliare e scaricare solo dati di specifiche porzioni geografiche. La definizione di tali poligoni avviene aggiungendo un’altra parte alla URL precedentemente descritta.
La parte di ritaglio
.../polygon/POLYGON{in WKT format}/srid_from/{EPSG:code}
La nuova parte di URL è composta da due parametri: le coordinate di ciascun vertice del poligono, e l’identificativo spaziale di riferimento dei dati nel GeoDB.
Coordinate dei vertici
Sistema di riferimento spaziale
Le coordinate dei vertici del poligono devono essere scritte in formato WKT.
BASE_URL/download/j_get_whole_{image_format}/{image_type}/{year}/{doy}/polygon/POLYGON{in WKT format}/srid_from/{EPSG:code}
BASE_URL/download/j_get_whole_{image_format}/{image_type}/{year}/{month}/{day}/polygon/POLYGON{in WKT format}/srid_from/{EPSG:code}
https://droughtsdi.fi.ibimet.cnr.it/dgws/api/download/j_get_whole_png/vhi/2018/129/polygon/POLYGON((6%2047.5,19%2047.5,19%2036,6%2036,6%2047.5))/srid_from/4326/
https://droughtsdi.fi.ibimet.cnr.it/dgws/api/download/j_get_whole_gtiff/spi6/2019/2/28/polygon/POLYGON((6%2047.5,19%2047.5,19%2036,6%2036,6%2047.5))/srid_from/4326/
Tramite chiamate GET HTTP è possibile calcolare statistiche geografiche di base (media, valori minimo e massimo, deviazione standard, numero di pixel, 25° e 75° quantile) di un poligono definito, lungo la serie storica. I risultati sono rilasciati in formato .json o .csv.
Le coordinate dei vertici del poligono devono essere scritte in formato WKT. Il formato di output può essere .json o .txt.
BASE_URL/calculate/{output_format}/{image_type}/polygon/POLYGON{in WKT format}/srid_from/{EPSG:code}
La nuova parte di URL è composta da quattro parametri: il formato di output, il tipo di immagine, le coordinate di ciascun vertice del poligono, e l’identificativo spaziale di riferimento dei dati nel GeoDB.
Coordinate dei vertici
Sistema di riferimento spaziale
https://droughtsdi.fi.ibimet.cnr.it/dgws/api/calculate/series/vhi/polygon/POLYGON((9.5%2044.6,12.5%2044.6,12.5%2042.0,9.5%2042.0,9.5%2044.6))/srid_from/4326
https://droughtsdi.fi.ibimet.cnr.it/dgws/api/calculate/seriescsv/spi12/polygon/POLYGON((12.366%2041.99,12.63%2041.99,12.63%2041.795,12.366%2041.795,12.366%2041.99))/srid_from/4326
Cookie | Durata | Descrizione |
---|---|---|
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category . |
cookielawinfo-checkbox-analytics | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category . |
cookielawinfo-checkbox-functional | 1 year | The cookie is set by the GDPR Cookie Consent plugin to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Necessary" category . |
cookielawinfo-checkbox-others | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to store the user consent for cookies in the category "Others". |
cookielawinfo-checkbox-performance | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to store the user consent for cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | This cookie is used by the website's WordPress theme. It allows the website owner to implement or change the website's content in real-time. |
Cookie | Durata | Descrizione |
---|---|---|
__cf_bm | 30 minutes | This cookie, set by Cloudflare, is used to support Cloudflare Bot Management. |
pll_language | 1 year | The pll _language cookie is used by Polylang to remember the language selected by the user when returning to the website, and also to get the language information when not available in another way. |
Cookie | Durata | Descrizione |
---|---|---|
_pk_id.1.a87b | 1 year 27 days | No description |
_pk_ses.1.a87b | 30 minutes | No description |
AWSALBTG | 7 days | No description available. |
AWSALBTGCORS | 7 days | No description available. |
experiments-fingerprint | 6 months | No description |
experiments-raw | 6 months | No description |
sessionid | 14 days | No description |