@ciag/sentinel-hub-wms
Version:
a API to create the sentinel ogs requests, and tools to apply on the data
31 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
//https://services.sentinel-hub.com/ogc/wfs/be0ceacc-a155-4e85-85b4-8250f0e8215e?REQUEST=GetFeature&TYPENAMES=S2.TILE&OUTPUTFORMAT=application/json&BBOX=1600965,5819367,1610917,5826373&TIME=2019-01-01/2019-04-23
class GetFeaturesRequest {
constructor(preset = "https://services.sentinel-hub.com/ogc/wfs/") {
this.preset = preset;
this.parameters = [];
this.request = "REQUEST=GetFeature";
this.timeStart = new Date('2019-01-01').toISOString().split('T')[0];
this.timeEnd = new Date().toISOString().split('T')[0];
}
addUUID(uuid) { this.UUID = uuid; }
addParameter(name, value) {
this.parameters.push(name + "=" + value);
}
/**
* Requesting via proxyLink
*/
getProxyLink(proxy) {
return proxy + '?' + this.request + '&' + this.parameters.join("&");
}
;
/**
* Requesting directly from sentinel
*/
getDirectLink(uuid = undefined) {
return this.preset + this.UUID + "?" + this.request + '&' + this.parameters.join("&");
}
}
exports.GetFeaturesRequest = GetFeaturesRequest;
//# sourceMappingURL=GetFeaturesRequest.js.map