From 0c10d82e143f5cd8ee3d5f9e03bc9ec3d41329ba Mon Sep 17 00:00:00 2001 From: Anthony GULLIENT Date: Tue, 28 Feb 2023 12:32:19 +0100 Subject: [PATCH] doc(tutorials): fix tutorials source API keys --- docs/tutorials/3DTiles-point-cloud-pnts.md | 4 +- docs/tutorials/Raster-data-Lambert93.md | 12 ++--- docs/tutorials/Raster-data-WGS84.md | 8 +-- docs/tutorials/Vector-data-3d.md | 59 ++++++++++++++-------- docs/tutorials/Vector-data-on-ground.md | 8 +-- 5 files changed, 54 insertions(+), 37 deletions(-) diff --git a/docs/tutorials/3DTiles-point-cloud-pnts.md b/docs/tutorials/3DTiles-point-cloud-pnts.md index 2de1283c4f..a1d38d73f3 100644 --- a/docs/tutorials/3DTiles-point-cloud-pnts.md +++ b/docs/tutorials/3DTiles-point-cloud-pnts.md @@ -68,7 +68,7 @@ We won't go into the details of creating the view, adding the ortho images and t view.addLayer(orthoLayer); var elevationSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES', tileMatrixSet: 'WGS84G', @@ -235,7 +235,7 @@ The full code to achieve this result is: view.addLayer(orthoLayer); var elevationSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES', tileMatrixSet: 'WGS84G', diff --git a/docs/tutorials/Raster-data-Lambert93.md b/docs/tutorials/Raster-data-Lambert93.md index b3a3b14698..81589cf8fc 100644 --- a/docs/tutorials/Raster-data-Lambert93.md +++ b/docs/tutorials/Raster-data-Lambert93.md @@ -115,8 +115,8 @@ We can start displaying ortho-images provided by the [Geoportail](https://www.ge ```js const sourceOrtho = new itowns.WMSSource({ - url: "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/r/wms", - name: "HR.ORTHOIMAGERY.ORTHOPHOTOS", + url: "https://wxs.ign.fr/inspire/inspire/r/wms", + name: "OI.OrthoimageCoverage.HR", format: 'image/png', crs: 'EPSG:2154', extent: viewExtent, @@ -147,7 +147,7 @@ Then we can simply create the `ElevationLayer`, giving it a unique `id` and the ```js const sourceDEM = new itowns.WMSSource({ - url: "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/r/wms", + url: "https://wxs.ign.fr/altimetrie/geoportail/r/wms", name: "ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES", format: "image/x-bil;bits=32", crs: 'EPSG:2154', @@ -214,8 +214,8 @@ The code that is shown bellow sums up all the steps it took to do so. // Define the source of the ortho-images const sourceOrtho = new itowns.WMSSource({ - url: "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/r/wms", - name: "HR.ORTHOIMAGERY.ORTHOPHOTOS", + url: "https://wxs.ign.fr/inspire/inspire/r/wms", + name: "OI.OrthoimageCoverage.HR", format: "image/png", crs: 'EPSG:2154', extent: viewExtent, @@ -226,7 +226,7 @@ The code that is shown bellow sums up all the steps it took to do so. // Define the source of the dem data const sourceDEM = new itowns.WMSSource({ - url: "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/r/wms", + url: "https://wxs.ign.fr/altimetrie/geoportail/r/wms", name: "ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES", format: "image/x-bil;bits=32", crs: 'EPSG:2154', diff --git a/docs/tutorials/Raster-data-WGS84.md b/docs/tutorials/Raster-data-WGS84.md index 75e7ee4b67..b99a41af5f 100644 --- a/docs/tutorials/Raster-data-WGS84.md +++ b/docs/tutorials/Raster-data-WGS84.md @@ -71,7 +71,7 @@ Adding a layer to itowns is done in three steps: creating a data `{@link Source} ```js var orthoSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/decouverte/geoportail/wmts', crs: 'EPSG:3857', name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -113,7 +113,7 @@ previous one. ```js var elevationSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3', tileMatrixSet: 'WGS84G', @@ -167,7 +167,7 @@ Here is the final code: var view = new itowns.GlobeView(viewerDiv, placement); var orthoSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/decouverte/geoportail/wmts', crs: "EPSG:3857", name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -181,7 +181,7 @@ Here is the final code: view.addLayer(orthoLayer); var elevationSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3', tileMatrixSet: 'WGS84G', diff --git a/docs/tutorials/Vector-data-3d.md b/docs/tutorials/Vector-data-3d.md index 437e8fe7e7..cd384db4c6 100644 --- a/docs/tutorials/Vector-data-3d.md +++ b/docs/tutorials/Vector-data-3d.md @@ -34,7 +34,7 @@ layer to a more precise one. var view = new itowns.GlobeView(viewerDiv, placement); var colorSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/decouverte/geoportail/wmts', crs: 'EPSG:3857', name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -48,7 +48,7 @@ layer to a more precise one. view.addLayer(colorLayer); var elevationSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES', tileMatrixSet: 'WGS84G', @@ -99,11 +99,16 @@ layer for such usecases: `{@link FeatureGeometryLayer}` (which is a pre-configur Before creating this layer, let's instantiate the data source: ```js + var geometrySource = new itowns.WFSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?', - typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_indifferencie', + url: 'https://wxs.ign.fr/topographie/geoportail/wfs?', + version: '2.0.0', + typeName: 'BDTOPO_V3:batiment', crs: 'EPSG:4326', + ipr: 'IGN', + format: 'application/json', }); + ``` With our source instantiated, we can create our `FeatureGeometryLayer`, giving it the usual `id` and `source` parameters : @@ -142,9 +147,12 @@ function setAltitude(properties) { } var geometrySource = new itowns.WFSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?', - typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_indifferencie', + url: 'https://wxs.ign.fr/topographie/geoportail/wfs?', + version: '2.0.0', + typeName: 'BDTOPO_V3:batiment', crs: 'EPSG:4326', + ipr: 'IGN', + format: 'application/json', }); var geometryLayer = new itowns.FeatureGeometryLayer('Buildings', { @@ -176,16 +184,15 @@ z_max: 83.7 z_min: 83.7 ``` -Reading the documentation of the database we are querying ([section 9.1, page -84](http://professionnels.ign.fr/doc/DC_BDTOPO_3-0.pdf), in French), we have an +Reading the documentation of the database we are querying ([section 7.2, page +66](https://geoservices.ign.fr/sites/default/files/2023-01/DC_BDTOPO_3-3.pdf), in French), we have an explanation on each property. To help us place the data correctly, let's use the -`z_min` and the `hauteur` (height) properties. -The first one corresponds to the altitude of the building roof, and the second one specifies its height. -We can therefore set the base altitude of our buildings by substracting the value of `hauteur` to the value of `z_min` : +`altitude_minimale_sol` property. +It corresponds to the minimal altitude of the building floor. ```js function setAltitude(properties) { - return properties.z_min - properties.hauteur; + return properties.altitude_minimale_sol; } ``` Now we can't see completely our buildings. What can we do about that @@ -204,9 +211,12 @@ function setExtrusion(properties) { } var geometrySource = new itowns.WFSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?', - typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_indifferencie', + url: 'https://wxs.ign.fr/topographie/geoportail/wfs?', + version: '2.0.0', + typeName: 'BDTOPO_V3:batiment', crs: 'EPSG:4326', + ipr: 'IGN', + format: 'application/json', }); var geometryLayer = new itowns.FeatureGeometryLayer('Buildings', { @@ -242,9 +252,12 @@ function setColor(properties) { } var geometrySource = new itowns.WFSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?', - typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_indifferencie', + url: 'https://wxs.ign.fr/topographie/geoportail/wfs?', + version: '2.0.0', + typeName: 'BDTOPO_V3:batiment', crs: 'EPSG:4326', + ipr: 'IGN', + format: 'application/json', }); var geometryLayer = new itowns.FeatureGeometryLayer('Buildings', { @@ -298,7 +311,7 @@ on a `GlobeView`, and change the appearance and positioning of this layer. Here var view = new itowns.GlobeView(viewerDiv, placement); var colorSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/decouverte/geoportail/wmts', crs: 'EPSG:3857', name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -312,7 +325,7 @@ on a `GlobeView`, and change the appearance and positioning of this layer. Here view.addLayer(colorLayer); var elevationSource = new itowns.WMTSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES', tileMatrixSet: 'WGS84G', @@ -352,7 +365,7 @@ on a `GlobeView`, and change the appearance and positioning of this layer. Here view.addLayer(elevationLayer); function setAltitude(properties) { - return properties.z_min - properties.hauteur; + return properties.altitude_minimale_sol; } function setExtrusion(properties) { @@ -363,10 +376,14 @@ on a `GlobeView`, and change the appearance and positioning of this layer. Here return new itowns.THREE.Color(0xaaaaaa); } + var geometrySource = new itowns.WFSSource({ - url: 'http://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?', - typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_indifferencie', + url: 'https://wxs.ign.fr/topographie/geoportail/wfs?', + version: '2.0.0', + typeName: 'BDTOPO_V3:batiment', crs: 'EPSG:4326', + ipr: 'IGN', + format: 'application/json', }); var geometryLayer = new itowns.FeatureGeometryLayer('Buildings', { diff --git a/docs/tutorials/Vector-data-on-ground.md b/docs/tutorials/Vector-data-on-ground.md index d8f0fed693..b34629c467 100644 --- a/docs/tutorials/Vector-data-on-ground.md +++ b/docs/tutorials/Vector-data-on-ground.md @@ -44,7 +44,7 @@ We need to change the starting position to something more appropriate. // Define the source of the ortho-images var orthoSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/decouverte/geoportail/wmts', crs: "EPSG:3857", name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -58,7 +58,7 @@ We need to change the starting position to something more appropriate. // Define the source of the dem data var elevationSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3', tileMatrixSet: 'WGS84G', @@ -229,7 +229,7 @@ By reaching here, you are now able to display simple vector data projected on th // Define the source of the ortho-images var orthoSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/decouverte/geoportail/wmts', crs: "EPSG:3857", name: 'ORTHOIMAGERY.ORTHOPHOTOS', tileMatrixSet: 'PM', @@ -243,7 +243,7 @@ By reaching here, you are now able to display simple vector data projected on th // Define the source of the dem data var elevationSource = new itowns.WMTSSource({ - url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts', + url: 'https://wxs.ign.fr/altimetrie/geoportail/wmts', crs: 'EPSG:4326', name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3', tileMatrixSet: 'WGS84G',