Skip to content

Commit

Permalink
v0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
mbloch committed Apr 7, 2023
1 parent 5f5da84 commit c0bd7e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.0.36
* Bug fix

v0.0.35
* Fixed a WKT parsing bug.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mproj",
"version": "0.0.35",
"version": "0.0.36",
"description": "A JavaScript port of the Proj.4 cartographic projections library",
"keywords": [
"projections",
Expand Down
5 changes: 4 additions & 1 deletion src/pj_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function get_geod_defn(P) {
if ('datum' in P.params) {
got_datum = true;
defn += get_param(P, 'datum');
} else if ('R' in P.params) {
// moving R above other params, to match sequence in pj_ell_set.js
defn += get_param(P, 'R');
} else if ('ellps' in P.params) {
defn += get_param(P, 'ellps');
} else if ('a' in P.params) {
Expand All @@ -34,7 +37,7 @@ function get_geod_defn(P) {
defn += get_param(P, 'towgs84');
defn += get_param(P, 'nadgrids');
}
defn += get_param(P, 'R');
// defn += get_param(P, 'R'); // moved to above ellps
defn += get_param(P, 'R_A');
defn += get_param(P, 'R_V');
defn += get_param(P, 'R_a');
Expand Down
5 changes: 5 additions & 0 deletions test/pj_utils_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ describe('pj_utils.js', function () {
})
}
}
test('+proj=lcc +lat_0=25 +lon_0=-95 +lat_1=25 +lat_2=25 +x_0=0 +y_0=0 +R=6371200',
'+proj=lcc +lat_0=25 +lon_0=-95 +lat_1=25 +lat_2=25 +x_0=0 +y_0=0 +R=6371200');
// +R takes precendence over ellps
test('+proj=lcc +lat_0=25 +lon_0=-95 +lat_1=25 +lat_2=25 +x_0=0 +y_0=0 +ellps=clrk66 +R=6371200',
'+proj=lcc +lat_0=25 +lon_0=-95 +lat_1=25 +lat_2=25 +x_0=0 +y_0=0 +R=6371200');
test('+proj=utm +zone=18 +datum=NAD83', '+proj=utm +zone=18 +datum=NAD83');
test('+proj=robin +a=6371000 +no_defs', '+proj=robin +a=6371000 +es=0');
test('+proj=robin +a=6371000 +b=6371000', '+proj=robin +a=6371000 +b=6371000');
Expand Down

0 comments on commit c0bd7e7

Please sign in to comment.