Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

proj4

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proj4 - npm Package Compare versions

Comparing version 2.3.10 to 2.3.11

2

bower.json
{
"name": "proj4",
"version": "2.3.10",
"version": "2.3.11",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/proj4js/proj4js",

{
"name": "proj4",
"version": "2.3.10",
"version": "2.3.11",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",

@@ -5,0 +5,0 @@ "repo": "proj4js/proj4js",

@@ -21,19 +21,19 @@ var HALF_PI = Math.PI/2;

}
if (proj.datum_params) {
for (var i = 0; i < proj.datum_params.length; i++) {
proj.datum_params[i] = parseFloat(proj.datum_params[i]);
}
if (proj.datum_params[0] !== 0 || proj.datum_params[1] !== 0 || proj.datum_params[2] !== 0) {
this.datum_params = proj.datum_params.map(parseFloat);
if (this.datum_params[0] !== 0 || this.datum_params[1] !== 0 || this.datum_params[2] !== 0) {
this.datum_type = PJD_3PARAM;
}
if (proj.datum_params.length > 3) {
if (proj.datum_params[3] !== 0 || proj.datum_params[4] !== 0 || proj.datum_params[5] !== 0 || proj.datum_params[6] !== 0) {
if (this.datum_params.length > 3) {
if (this.datum_params[3] !== 0 || this.datum_params[4] !== 0 || this.datum_params[5] !== 0 || this.datum_params[6] !== 0) {
this.datum_type = PJD_7PARAM;
proj.datum_params[3] *= SEC_TO_RAD;
proj.datum_params[4] *= SEC_TO_RAD;
proj.datum_params[5] *= SEC_TO_RAD;
proj.datum_params[6] = (proj.datum_params[6] / 1000000.0) + 1.0;
this.datum_params[3] *= SEC_TO_RAD;
this.datum_params[4] *= SEC_TO_RAD;
this.datum_params[5] *= SEC_TO_RAD;
this.datum_params[6] = (this.datum_params[6] / 1000000.0) + 1.0;
}
}
}
// DGR 2011-03-21 : nadgrids support

@@ -46,3 +46,2 @@ this.datum_type = proj.grids ? PJD_GRIDSHIFT : this.datum_type;

this.ep2 = proj.ep2;
this.datum_params = proj.datum_params;
if (this.datum_type === PJD_GRIDSHIFT) {

@@ -49,0 +48,0 @@ this.grids = proj.grids;

@@ -114,3 +114,9 @@ var D2R = 0.01745329251994329577;

if (wkt.UNIT.convert) {
wkt.to_meter = parseFloat(wkt.UNIT.convert, 10);
if (wkt.type === 'GEOGCS') {
if (wkt.DATUM && wkt.DATUM.SPHEROID) {
wkt.to_meter = parseFloat(wkt.UNIT.convert, 10)*wkt.DATUM.SPHEROID.a;
}
} else {
wkt.to_meter = parseFloat(wkt.UNIT.convert, 10);
}
}

@@ -117,0 +123,0 @@ }

{
"name": "proj4",
"version": "2.3.10",
"version": "2.3.11",
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -174,2 +174,12 @@ // You can do this in the grunt config for each mocha task, see the `options` config

assert.strictEqual(proj4.defs['urn:x-ogc:def:crs:EPSG:4326'], proj4.defs['EPSG:4326']);
describe('wkt', function() {
it('should provide the correct conversion factor for WKT GEOGCS projections', function() {
proj4.defs('EPSG:4269', 'GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]]');
assert.equal(proj4.defs['EPSG:4269'].to_meter, 6378137*0.01745329251994328);
proj4.defs('EPSG:4279', 'GEOGCS["OS(SN)80",DATUM["OS_SN_1980",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6279"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4279"]]');
assert.equal(proj4.defs['EPSG:4279'].to_meter, 6377563.396*0.01745329251994328);
});
});
});

@@ -176,0 +186,0 @@ describe('errors', function() {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc