Skip to content

Commit

Permalink
fix(tutorials): migrate urls to IGN geoplateforme
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Mar 13, 2024
1 parent f6baf69 commit 5d324ca
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/3DTiles-point-cloud-pnts.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var orthoLayer = new itowns.ColorLayer('Ortho', {
view.addLayer(orthoLayer);

var elevationSource = new itowns.WMTSSource({
url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES',
tileMatrixSet: 'WGS84G',
Expand Down Expand Up @@ -226,7 +226,7 @@ The full code to achieve this result is:
view.addLayer(orthoLayer);
var elevationSource = new itowns.WMTSSource({
url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES',
tileMatrixSet: 'WGS84G',
Expand Down
22 changes: 11 additions & 11 deletions docs/tutorials/Raster-data-Lambert93.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To do so, we need to pass five argument to `Extent` constructor, which are :
Not all CRS are defined by default within iTowns, which is why we need to define our CRS using [proj4](https://proj.org/) prior to instantiating the `Extent` ;
- The westernmost, easternmost, southernmost and northernmost coordinates of the extent.
- Finally, we create a `{@link PlanarView}` giving it the required `DomElement` and `Extent` parameters.

At this stage, our webpage should look like this :

![Simple PlanarView](images/Raster-data-Lambert93-1.png)
Expand Down Expand Up @@ -115,7 +115,7 @@ We can start displaying ortho-images provided by the [Geoportail](https://www.ge

```js
const sourceOrtho = new itowns.WMSSource({
url: "https://wxs.ign.fr/inspire/inspire/r/wms",
url: "https://data.geopf.fr/wms-r/wms?",
name: "OI.OrthoimageCoverage.HR",
format: 'image/png',
crs: 'EPSG:2154',
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/altimetrie/geoportail/r/wms",
url: "https://data.geopf.fr/wms-r/wms?",
name: "ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES",
format: "image/x-bil;bits=32",
crs: 'EPSG:2154',
Expand Down Expand Up @@ -184,10 +184,10 @@ The code that is shown bellow sums up all the steps it took to do so.
<div id="viewerDiv"></div>
<script src="../dist/itowns.js"></script>
<script type="text/javascript">
// Retrieve the view container
const viewerDiv = document.getElementById('viewerDiv');
// Define the view geographic extent
itowns.proj4.defs(
'EPSG:2154',
Expand All @@ -198,23 +198,23 @@ The code that is shown bellow sums up all the steps it took to do so.
644500.0, 659499.99,
6857500.0, 6867499.99,
);
// Define the camera initial placement
const placement = {
coord: viewExtent.center(),
tilt: 12,
heading: 40,
range: 16000,
};
// Create the planar view
const view = new itowns.PlanarView(viewerDiv, viewExtent, {
placement: placement,
});
// Define the source of the ortho-images
const sourceOrtho = new itowns.WMSSource({
url: "https://wxs.ign.fr/inspire/inspire/r/wms",
url: "https://data.geopf.fr/wms-r/wms?",
name: "OI.OrthoimageCoverage.HR",
format: "image/png",
crs: 'EPSG:2154',
Expand All @@ -223,10 +223,10 @@ The code that is shown bellow sums up all the steps it took to do so.
// Create the ortho-images ColorLayer and add it to the view
const layerOrtho = new itowns.ColorLayer('Ortho', { source: sourceOrtho });
view.addLayer(layerOrtho);
// Define the source of the dem data
const sourceDEM = new itowns.WMSSource({
url: "https://wxs.ign.fr/altimetrie/geoportail/r/wms",
url: "https://data.geopf.fr/wms-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
Original file line number Diff line number Diff line change
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/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/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/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/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/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/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/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3',
tileMatrixSet: 'WGS84G',
Expand Down
34 changes: 17 additions & 17 deletions docs/tutorials/Vector-data-3d.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ layer to a more precise one.
tilt: 20,
};
var view = new itowns.GlobeView(viewerDiv, placement);
var colorSource = new itowns.WMTSSource({
url: 'http://wxs.ign.fr/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:3857',
name: 'ORTHOIMAGERY.ORTHOPHOTOS',
tileMatrixSet: 'PM',
format: 'image/jpeg'
});
var colorLayer = new itowns.ColorLayer('Ortho', {
source: colorSource,
});
view.addLayer(colorLayer);
var elevationSource = new itowns.WMTSSource({
url: 'http://wxs.ign.fr/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES',
tileMatrixSet: 'WGS84G',
Expand Down Expand Up @@ -80,11 +80,11 @@ layer to a more precise one.
}
}
});
var elevationLayer = new itowns.ElevationLayer('MNT_WORLD', {
source: elevationSource,
});
view.addLayer(elevationLayer);
</script>
</body>
Expand All @@ -101,7 +101,7 @@ Before creating this layer, let's instantiate the data source:
```js

var geometrySource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down Expand Up @@ -147,7 +147,7 @@ function setAltitude(properties) {
}

var geometrySource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down Expand Up @@ -185,7 +185,7 @@ z_min: 83.7
```

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
66](https://geoservices.ign.fr/sites/default/files/2024-02/DC_BDTOPO_3-3_0.pdf), in French), we have an
explanation on each property. To help us place the data correctly, let's use the
`altitude_minimale_sol` property.
It corresponds to the minimal altitude of the building floor.
Expand All @@ -211,7 +211,7 @@ function setExtrusion(properties) {
}

var geometrySource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down Expand Up @@ -252,7 +252,7 @@ function setColor(properties) {
}

var geometrySource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down Expand Up @@ -311,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/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:3857',
name: 'ORTHOIMAGERY.ORTHOPHOTOS',
tileMatrixSet: 'PM',
Expand All @@ -325,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/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES',
tileMatrixSet: 'WGS84G',
Expand Down Expand Up @@ -376,9 +376,9 @@ 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: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down
14 changes: 7 additions & 7 deletions docs/tutorials/Vector-data-on-ground.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ We need to change the starting position to something more appropriate.
coord: new itowns.Coordinates('EPSG:4326', 3.05, 48.97),
range: 15000,
};
// Create the view
var view = new itowns.GlobeView(viewerDiv, placement);
// Define the source of the ortho-images
var orthoSource = new itowns.WMTSSource({
url: 'https://wxs.ign.fr/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: "EPSG:3857",
name: 'ORTHOIMAGERY.ORTHOPHOTOS',
tileMatrixSet: 'PM',
Expand All @@ -56,10 +56,10 @@ We need to change the starting position to something more appropriate.
source: orthoSource,
});
view.addLayer(orthoLayer);
// Define the source of the dem data
var elevationSource = new itowns.WMTSSource({
url: 'https://wxs.ign.fr/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3',
tileMatrixSet: 'WGS84G',
Expand Down Expand Up @@ -230,7 +230,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/decouverte/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: "EPSG:3857",
name: 'ORTHOIMAGERY.ORTHOPHOTOS',
tileMatrixSet: 'PM',
Expand All @@ -245,7 +245,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/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
crs: 'EPSG:4326',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3',
tileMatrixSet: 'WGS84G',
Expand Down

0 comments on commit 5d324ca

Please sign in to comment.