1 package fr.ifremer.dali.map;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import fr.ifremer.quadrige3.core.dao.technical.enumeration.EnumValue;
25 import org.geotools.geometry.jts.ReferencedEnvelope;
26 import org.geotools.referencing.crs.DefaultGeographicCRS;
27
28 import static org.nuiton.i18n.I18n.n;
29 import static org.nuiton.i18n.I18n.t;
30
31
32
33
34
35
36 public enum MapProjection implements EnumValue {
37
38 WGS84("EPSG:4326", n("dali.core.enums.mapProjection.wgs84"), new ReferencedEnvelope(-180, 180, -90, 90, DefaultGeographicCRS.WGS84)),
39 WGS84_PSEUDO_MERCATOR("EPSG:3857", n("dali.core.enums.mapProjection.pseudoMercator"), new ReferencedEnvelope(-180, 180, -85.05112878, 85.05112878, DefaultGeographicCRS.WGS84));
40
41 private final String code;
42 private final String i18nKey;
43 private final ReferencedEnvelope envelope;
44
45 MapProjection(String code, String i18nKey, ReferencedEnvelope envelope) {
46 this.code = code;
47 this.i18nKey = i18nKey;
48 this.envelope = envelope;
49 }
50
51 @Override
52 public String getCode() {
53 return code;
54 }
55
56 @Override
57 public String getLabel() {
58 return t(i18nKey);
59 }
60
61 public ReferencedEnvelope getEnvelope() {
62 return envelope;
63 }
64 }