Skip to content

Commit 70f5a0c

Browse files
authored
Merge pull request #33 from proj4js/less-datum-mods
Less datum code modifications
2 parents e1c270c + 87ff240 commit 70f5a0c

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function setPropertiesFromWkt(wkt) {
106106
if (wkt.datumCode.slice(0, 2) === 'd_') {
107107
wkt.datumCode = wkt.datumCode.slice(2);
108108
}
109-
if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') {
109+
if (wkt.datumCode === 'new_zealand_1949') {
110110
wkt.datumCode = 'nzgd49';
111111
}
112112
if (wkt.datumCode === 'wgs_1984' || wkt.datumCode === 'world_geodetic_system_1984') {
@@ -115,13 +115,7 @@ function setPropertiesFromWkt(wkt) {
115115
}
116116
wkt.datumCode = 'wgs84';
117117
}
118-
if (wkt.datumCode.slice(-6) === '_ferro') {
119-
wkt.datumCode = wkt.datumCode.slice(0, - 6);
120-
}
121-
if (wkt.datumCode.slice(-8) === '_jakarta') {
122-
wkt.datumCode = wkt.datumCode.slice(0, - 8);
123-
}
124-
if (~wkt.datumCode.indexOf('belge')) {
118+
if (wkt.datumCode === 'belge_1972') {
125119
wkt.datumCode = 'rnb72';
126120
}
127121
if (geogcs.DATUM && geogcs.DATUM.SPHEROID) {

test-fixtures.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"projName": "longlat",
4848
"units": "degree",
4949
"to_meter": 111323.87156969598,
50-
"datumCode": "nzgd49",
50+
"datumCode": "new_zealand_geodetic_datum_1949",
5151
"ellps": "intl",
5252
"a": 6378388,
5353
"rf": 297,
@@ -85,7 +85,7 @@
8585
"projName": "New_Zealand_Map_Grid",
8686
"units": "meter",
8787
"to_meter": 1,
88-
"datumCode": "nzgd49",
88+
"datumCode": "new_zealand_geodetic_datum_1949",
8989
"datum_params": [
9090
59.47, -5.04,
9191
187.44, 0.47,

0 commit comments

Comments
 (0)