Skip to content

Commit

Permalink
trial fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Oct 14, 2024
1 parent 80c9080 commit d2d10a2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
27 changes: 15 additions & 12 deletions process.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function mapit(obj, key, value) {
}, thing);
if (key) {
obj[key] = out;
obj[key].type = key;
}
}

Expand Down Expand Up @@ -78,30 +77,34 @@ export function sExpr(v, obj) {
sExpr(v[3], obj[key]);
}
return;
case 'PROJECTEDCRS':
case 'PROJCRS':
case 'GEOGCS':
case 'GEOCCS':
case 'PROJCS':
case 'LOCAL_CS':
case 'GEODCRS':
case 'GEODETICCRS':
case 'GEODETICDATUM':
case 'EDATUM':
case 'ENGINEERINGDATUM':
case 'VERT_CS':
case 'VERTCRS':
case 'VERTICALCRS':
case 'COMPD_CS':
case 'COMPOUNDCRS':
case 'ENGINEERINGCRS':
case 'ENGCRS':
case 'FITTED_CS':
case 'LOCAL_DATUM':
case 'DATUM':
v[0] = ['name', v[0]];
mapit(obj, key, v);
return;
case 'PROJECTEDCRS':
case 'PROJCRS':
case 'GEOGCS':
case 'GEOCCS':
case 'PROJCS':
case 'LOCAL_CS':
case 'GEODCRS':
case 'GEODETICCRS':
case 'GEODETICDATUM':
case 'ENGCRS':
case 'ENGINEERINGCRS':
v[0] = ['name', v[0]];
mapit(obj, key, v);
obj[key].type = key;
return;
default:
i = -1;
while (++i < v.length) {
Expand Down
33 changes: 31 additions & 2 deletions test-fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"type": "PROJCS",
"name": "NZGD49 / New Zealand Map Grid",
"GEOGCS": {
"type": "GEOGCS",
"name": "NZGD49",
"DATUM": {
"name": "New_Zealand_Geodetic_Datum_1949",
Expand Down Expand Up @@ -41,7 +42,25 @@
},
"AUTHORITY": {
"EPSG": "4272"
}
},
"title": "EPSG:4272",
"projName": "longlat",
"units": "degree",
"to_meter": 111323.87156969598,
"datumCode": "nzgd49",
"ellps": "intl",
"a": 6378388,
"rf": 297,
"datum_params": [
59.47,
-5.04,
187.44,
0.47,
-0.1,
1.024,
-4.5993
],
"srsCode": "NZGD49"
},
"UNIT": {
"name": "metre",
Expand Down Expand Up @@ -89,6 +108,7 @@
"type": "PROJCS",
"name": "NAD83 / Massachusetts Mainland",
"GEOGCS": {
"type": "GEOGCS",
"name": "NAD83",
"DATUM": {
"name": "North_American_Datum_1983",
Expand Down Expand Up @@ -120,7 +140,16 @@
},
"AUTHORITY": {
"EPSG": "4269"
}
},
"title": "4269",
"projName": "longlat",
"units": "degree",
"to_meter": 111319.49079327348,
"datumCode": "north_american_datum_1983",
"ellps": "GRS 1980",
"a": 6378137,
"rf": 298.257222101,
"srsCode": "NAD83"
},
"UNIT": {
"name": "metre",
Expand Down

0 comments on commit d2d10a2

Please sign in to comment.