Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Portail de données
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TEMPO
Portail de données
Commits
b4770085
Commit
b4770085
authored
1 year ago
by
Olivier Maury
Browse files
Options
Downloads
Patches
Plain Diff
Migrer les couches IGN vers Géoplateforme. fixes #9919
parent
98c98175
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/soeretempo/gwt/client/search/TileSuppliers.java
+16
-31
16 additions, 31 deletions
...n/java/fr/soeretempo/gwt/client/search/TileSuppliers.java
with
16 additions
and
31 deletions
src/main/java/fr/soeretempo/gwt/client/search/TileSuppliers.java
+
16
−
31
View file @
b4770085
...
...
@@ -56,7 +56,7 @@ import ol.tilegrid.WmtsTileGridOptions;
/**
* Helper methods to construct various tiles for OpenLayers.
*
* Service list for IGN : https://geoservices.ign.fr/
documentation/services
* Service list for IGN : https://geoservices.ign.fr/
services-geoplateforme
*
* @author Olivier Maury
* @author Louis Tromel
...
...
@@ -67,7 +67,6 @@ public abstract class TileSuppliers {
* Base infos to create an IGN layer.
*
* @author ltromel
*
*/
private
static
class
IgnWmtsLayer
{
...
...
@@ -92,7 +91,7 @@ public abstract class TileSuppliers {
private
String
style
=
"normal"
;
/**
* Layer name displayed
i
n
tempo
.
* Layer name displayed
o
n
map
.
*/
private
String
title
;
...
...
@@ -101,11 +100,6 @@ public abstract class TileSuppliers {
*/
private
String
type
=
"base"
;
/**
* URL requested (contains the key).
*/
private
String
url
;
/**
* @return the attributions
*/
...
...
@@ -148,13 +142,6 @@ public abstract class TileSuppliers {
return
type
;
}
/**
* @return the url
*/
String
getUrl
()
{
return
url
;
}
/**
* @param values the attributions to set
*/
...
...
@@ -197,15 +184,13 @@ public abstract class TileSuppliers {
type
=
layerType
;
}
/**
* @param layerUrl the url to set
*/
void
setUrl
(
final
String
layerUrl
)
{
url
=
layerUrl
;
}
}
/**
* Attributions attribute.
*/
private
static
final
String
ATTRIBUTIONS
=
"layer-attributions"
;
/**
* I18n constants.
*/
...
...
@@ -226,10 +211,9 @@ public abstract class TileSuppliers {
*/
public
static
Base
createIgnAdministrativeLimits
()
{
final
IgnWmtsLayer
wmts
=
new
IgnWmtsLayer
();
wmts
.
setLayer
(
"ADMINEXPRESS-COG
-CARTO
.LATEST"
);
wmts
.
setLayer
(
"ADMINEXPRESS-COG.LATEST"
);
wmts
.
setTitle
(
CSTS
.
ignAdministrativeLimits
());
wmts
.
setType
(
""
);
wmts
.
setUrl
(
"https://wxs.ign.fr/administratif/geoportail/wmts"
);
wmts
.
setAttributions
(
" - "
+
CSTS
.
ignOverlayAttributions
());
return
createIgnWmtsLayer
(
wmts
);
}
...
...
@@ -243,7 +227,6 @@ public abstract class TileSuppliers {
wmts
.
setTitle
(
CSTS
.
ignAerial
());
wmts
.
setAttributions
(
CSTS
.
ignAerialAttributions
());
wmts
.
setFormat
(
"image/jpeg"
);
wmts
.
setUrl
(
"https://wxs.ign.fr/ortho/geoportail/wmts"
);
return
createIgnWmtsLayer
(
wmts
);
}
...
...
@@ -254,7 +237,6 @@ public abstract class TileSuppliers {
wmts
.
setAttributions
(
" - "
+
CSTS
.
ignOverlayAttributions
());
wmts
.
setType
(
""
);
wmts
.
setStyle
(
"normal"
);
wmts
.
setUrl
(
"https://wxs.ign.fr/agriculture/geoportail/wmts"
);
return
createIgnWmtsLayer
(
wmts
);
}
...
...
@@ -266,7 +248,6 @@ public abstract class TileSuppliers {
wmts
.
setLayer
(
"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2"
);
wmts
.
setTitle
(
CSTS
.
ignInternationalMap
());
wmts
.
setAttributions
(
CSTS
.
ignInternationalMapAttributions
());
wmts
.
setUrl
(
"https://wxs.ign.fr/cartes/geoportail/wmts"
);
return
createIgnWmtsLayer
(
wmts
);
}
...
...
@@ -277,12 +258,11 @@ public abstract class TileSuppliers {
wmts
.
setAttributions
(
" - "
+
CSTS
.
ignOverlayAttributions
());
wmts
.
setType
(
""
);
wmts
.
setStyle
(
"estompage_grayscale"
);
wmts
.
setUrl
(
"https://wxs.ign.fr/altimetrie/geoportail/wmts"
);
return
createIgnWmtsLayer
(
wmts
);
}
/**
* See https://geoservices.ign.fr/services-
web-decouverte
.
* See https://geoservices.ign.fr/services-
geoplateforme-diffusion
.
*
* @param wmts basic caracteristics to generate an IGN served layer
* @return base layer
...
...
@@ -290,7 +270,7 @@ public abstract class TileSuppliers {
private
static
Base
createIgnWmtsLayer
(
final
IgnWmtsLayer
wmts
)
{
final
Projection
projection
=
Projection
.
get
(
"EPSG:3857"
);
final
WmtsOptions
wmtsOptions
=
OLFactory
.
createOptions
();
wmtsOptions
.
setUrl
(
wmts
.
getUrl
()
);
wmtsOptions
.
setUrl
(
"https://data.geopf.fr/wmts"
);
wmtsOptions
.
setLayer
(
wmts
.
getLayer
());
wmtsOptions
.
setFormat
(
wmts
.
getFormat
());
wmtsOptions
.
setMatrixSet
(
"PM"
);
...
...
@@ -309,6 +289,7 @@ public abstract class TileSuppliers {
wmtsLayer
.
set
(
TITLE
,
wmts
.
getTitle
());
wmtsLayer
.
set
(
TYPE
,
wmts
.
getType
());
wmtsLayer
.
setVisible
(
false
);
wmtsLayer
.
set
(
ATTRIBUTIONS
,
wmts
.
getAttributions
());
return
wmtsLayer
;
}
...
...
@@ -320,6 +301,7 @@ public abstract class TileSuppliers {
layer
.
set
(
TITLE
,
CSTS
.
mapBaseLayerEmpty
());
layer
.
set
(
TYPE
,
"base"
);
layer
.
setVisible
(
false
);
layer
.
set
(
ATTRIBUTIONS
,
"-"
);
return
layer
;
}
...
...
@@ -337,6 +319,7 @@ public abstract class TileSuppliers {
tile
.
set
(
TITLE
,
"OpenTopoMap"
);
tile
.
set
(
TYPE
,
"base"
);
tile
.
setVisible
(
false
);
tile
.
set
(
ATTRIBUTIONS
,
options
.
getAttributions
());
return
tile
;
}
...
...
@@ -359,6 +342,7 @@ public abstract class TileSuppliers {
final
Tile
osmLayer
=
new
Tile
(
osmLayerOptions
);
osmLayer
.
set
(
TITLE
,
"OpenStreetMap"
);
osmLayer
.
set
(
TYPE
,
"base"
);
osmLayer
.
set
(
ATTRIBUTIONS
,
options
.
getAttributions
());
return
osmLayer
;
}
...
...
@@ -380,6 +364,7 @@ public abstract class TileSuppliers {
tile
.
set
(
TITLE
,
"OpenStreetMap Piano"
);
tile
.
set
(
TYPE
,
"base"
);
tile
.
setVisible
(
false
);
tile
.
set
(
ATTRIBUTIONS
,
options
.
getAttributions
());
return
tile
;
}
...
...
@@ -418,4 +403,4 @@ public abstract class TileSuppliers {
private
TileSuppliers
()
{
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment