Skip to content

Commit

Permalink
branchement sur le service d'alti de la gpf par défaut
Browse files Browse the repository at this point in the history
resource rge_alti_wld
  • Loading branch information
elias75015 committed Dec 14, 2023
1 parent 00d0ac5 commit 343ac9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Services/Alti/Alti.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function Alti (options) {
this.options.outputFormat = (typeof options.outputFormat === "string") ? options.outputFormat.toLowerCase() : "xml";

// ressource utilisée pour le calcul altimétrique
this.options.resource = options.resource || "rge_alti_corse2a_float32_zip_lamb93";
this.options.resource = options.resource || "ign_rge_alti_wld";

// sampling
this.options.sampling = options.sampling || null;
Expand All @@ -132,13 +132,10 @@ function Alti (options) {
// en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)
// ainsi que sur le type de service (profil ou elevation)
if (!this.options.serverUrl) {
// Code commenté pour Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti
/* var lstUrlByDefault = DefaultUrlService.Alti.newUrl();
var lstUrlByDefault = DefaultUrlService.Alti.newUrl();
if (this.options.oldAltiService) {
lstUrlByDefault = DefaultUrlService.Alti.url();
} */
// Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti
var lstUrlByDefault = DefaultUrlService.Alti.url();
}
var urlFound = null;
switch (this.options.api) {
case "WPS":
Expand Down
9 changes: 9 additions & 0 deletions src/Services/DefaultUrlService.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ var DefaultUrlService = {
* @returns {String} url
*/
newUrl : function () {
var NEW_ALTI_HOSTNAME = "data.geopf.fr";

return {
// rest
"elevation-json" : DefaultUrlService.newUrl(this.new_key["elevation-json"], NEW_ALTI_HOSTNAME),
"elevation-xml" : DefaultUrlService.newUrl(this.new_key["elevation-xml"], NEW_ALTI_HOSTNAME),
"profil-json" : DefaultUrlService.newUrl(this.new_key["profil-json"], NEW_ALTI_HOSTNAME),
"profil-xml" : DefaultUrlService.newUrl(this.new_key["profil-xml"], NEW_ALTI_HOSTNAME)
};
},
/**
* url from wxs service
Expand Down

0 comments on commit 343ac9b

Please sign in to comment.