Skip to content

Commit

Permalink
doc(tutorials): fix tutorials source API keys
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGlt authored and gchoqueux committed May 2, 2023
1 parent 96987fd commit 0c10d82
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 37 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/3DTiles-point-cloud-pnts.md
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
12 changes: 6 additions & 6 deletions docs/tutorials/Raster-data-Lambert93.md
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand All @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/Raster-data-WGS84.md
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
59 changes: 38 additions & 21 deletions docs/tutorials/Vector-data-3d.md
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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 :
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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
Expand All @@ -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', {
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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) {
Expand All @@ -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', {
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/Vector-data-on-ground.md
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 0c10d82

Please sign in to comment.