Skip to content

Commit

Permalink
fix(examples): migrate ign and grandlyon urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jailln authored and Desplandis committed Feb 14, 2024
1 parent ec7ae6c commit 3f3ed82
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 33 deletions.
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Administrative.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"transparent": true,
"source": {
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/administratif/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"format": "image/png",
"name": "LIMITES_ADMINISTRATIVES_EXPRESS.LATEST",
"style": "normal",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Cada.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/parcellaire/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "omit"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Cassini.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "Cassini",
"source": {
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Denomination.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:3857",
"tileMatrixSet": "PM",
"format": "image/png",
Expand Down
4 changes: 2 additions & 2 deletions examples/layers/JSONLayers/EtatMajor.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "Etat major (1850)",
"id": "Etat major (1850)",
"opacity": 1,
"transparent": true,
"source": {
"crs": "EPSG:3857",
"url": "http://wxs.ign.fr/cartes/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/IGN_MNS_HIGHRES.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"max": 17
},
"source": {
"url": "https://wxs.ign.fr/altimetrie/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/IGN_MNT.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"source": {
"url": "https://wxs.ign.fr/altimetrie/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/IGN_MNT_HIGHRES.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
},
"source": {
"url": "https://wxs.ign.fr/altimetrie/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Ortho.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "Ortho",
"source": {
"url": "https://wxs.ign.fr/decouverte/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Railways.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"transparent": true,
"source": {
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"format": "image/png",
"networkOptions": {
"crossOrigin": "omit"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Region.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "Region",
"transparent" : true,
"source": {
"url" : "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/v/wms",
"url" : "https://data.geopf.fr/wms-r/wms?",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/ScanEX.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"effect_parameter": 2.5,
"source": {
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"format": "image/jpeg",
"name": "GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",
"attribution" : {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Top25.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "Top25",
"source": {
"crs": "EPSG:3857",
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Transport.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"transparent": true,
"source": {
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"format": "image/png",
"networkOptions": {
"crossOrigin": "omit"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/WORLD_DTM.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"source": {
"format": "image/x-bil;bits=32",
"crs": "EPSG:4326",
"url": "https://wxs.ign.fr/altimetrie/geoportail/wmts",
"url": "https://data.geopf.fr/wmts?",
"name": "ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3",
"tileMatrixSet": "WGS84G",
"tileMatrixSetLimits": {
Expand Down
4 changes: 2 additions & 2 deletions examples/source_stream_wfs_25d.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
}

var wfsBuildingSource = 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 @@ -271,7 +271,7 @@
view.addLayer(wfsBuildingLayer);

var wfsCartoSource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/cartovecto/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDCARTO_BDD_WLD_WGS84G:zone_habitat_mairie',
crs: 'EPSG:3946',
Expand Down
19 changes: 10 additions & 9 deletions examples/source_stream_wfs_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@

var color = new itowns.THREE.Color();
var tile;
function altitudeLine(properties, contour) {
function altitudeLine(properties, ctx) {
var result;
var z = 0;
if (contour) {
result = itowns.DEMUtils.getTerrainObjectAt(view.tileLayer, contour, 0, tile);
if (ctx.coordinates) {
result = itowns.DEMUtils.getTerrainObjectAt(view.tileLayer, ctx.coordinates, 0, tile);
if (!result) {
result = itowns.DEMUtils.getTerrainObjectAt(view.tileLayer, contour, 0);
result = itowns.DEMUtils.getTerrainObjectAt(view.tileLayer, ctx.coordinates, 0);
}
tile = [result.tile];
if (result) {
tile = [result.tile];
z = result.coord.z;
}
return z + 5;
Expand All @@ -95,19 +95,20 @@
return false;
}

var lyonTclBusSource = new itowns.WFSSource({
lyonTclBusSource = new itowns.WFSSource({
url: "https://data.grandlyon.com/geoserver/sytral/ows?",
protocol: 'wfs',
url: 'https://download.data.grandlyon.com/wfs/rdata?',
version: '2.0.0',
typeName: 'tcl_sytral.tcllignebus',
id: 'tcl_bus',
typeName: "tcl_sytral.tcllignebus_2_0_0",
crs: 'EPSG:3946',
extent: {
west: 1822174.60,
east: 1868247.07,
south: 5138876.75,
north: 5205890.19,
},
format: 'geojson',
format: 'application/json',
});

var lyonTclBusLayer = new itowns.FeatureGeometryLayer('WFS Bus lines',{
Expand Down
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}

var wfsBuildingSource = 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
2 changes: 1 addition & 1 deletion src/Layer/ElevationLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ElevationLayer extends RasterLayer {
* // Create an ElevationLayer
* const elevation = new ElevationLayer('IGN_MNT', {
* source: new WMTSSource({
* "url": "https://wxs.ign.fr/altimetrie/geoportail/wmts",
* "url": "https://data.geopf.fr/wmts?",
* "crs": "EPSG:4326",
* "format": "image/x-bil;bits=32",
* "name": "ELEVATION.ELEVATIONGRIDCOVERAGE",
Expand Down
4 changes: 2 additions & 2 deletions src/Source/WFSSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import CRS from 'Core/Geographic/Crs';
* // Add color layer with WFS source
* // Create the source
* const wfsSource = new itowns.WFSSource({
* url: 'http://wxs.fr/wfs',
* url: 'https://data.geopf.fr/wfs/ows?',
* version: '2.0.0',
* typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_remarquable',
* crs: 'EPSG:4326',
Expand Down Expand Up @@ -66,7 +66,7 @@ import CRS from 'Core/Geographic/Crs';
* // Add geometry layer with WFS source
* // Create the source
* const wfsSource = new itowns.WFSSource({
* url: 'http://wxs.fr/wfs',
* url: 'https://data.geopf.fr/wfs/ows?',
* version: '2.0.0',
* typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_remarquable',
* crs: 'EPSG:4326',
Expand Down
2 changes: 1 addition & 1 deletion test/functional/source_stream_wfs_25d.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('source_stream_wfs_25d', function _() {
// Test picking a feature geometry property from `wfsBuilding` layer.
// Picking is done at the given screen coordinates.
const buildingId = await page.evaluate(() => picking({ x: 97, y: 213 }));
assert.equal(buildingId.geojson.id, 'batiment.BATIMENT0000000241634062');
assert.equal(buildingId.geojson.id, 'batiment.172147');
});
it('should remove GeometryLayer', async () => {
const countGeometryLayerStart = await page.evaluate(() => view.getLayers(l => l.isGeometryLayer).length);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/demutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('DemUtils', function () {
const source = new WMTSSource({
format: 'image/x-bil;bits=32',
crs: 'EPSG:4326',
url: 'https://wxs.ign.fr/altimetrie/geoportail/wmts',
url: 'https://data.geopf.fr/wmts?',
name: 'ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3',
tileMatrixSet: 'WGS84G',
networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {
Expand Down

0 comments on commit 3f3ed82

Please sign in to comment.