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.18-alpha to 2.4.0

lib/constants/values.js

2

bower.json
{
"name": "proj4",
"version": "2.3.18-alpha",
"version": "2.4.0",
"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.18-alpha",
"version": "2.4.0",
"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",

@@ -1,2 +0,2 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';
import sign from './sign';

@@ -6,2 +6,2 @@

return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));
}
}

@@ -1,7 +0,3 @@

var TWO_PI = Math.PI * 2;
// SPI is slightly greater than Math.PI, so values that exceed the -180..180
// degree range by a tiny amount don't get wrapped. This prevents points that
// have drifted from their original location along the 180th meridian (due to
// floating point error) from changing their sign.
var SPI = 3.14159265359;
import {TWO_PI, SPI} from '../constants/values';
import sign from './sign';

@@ -11,2 +7,2 @@

return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));
}
}

@@ -1,5 +0,5 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';
export default function(x, L) {
return 2 * Math.atan(x * Math.exp(L)) - HALF_PI;
}
}

@@ -1,2 +0,2 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';

@@ -32,2 +32,2 @@ export default function(eccent, q) {

return NaN;
}
}

@@ -1,2 +0,2 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';

@@ -16,2 +16,2 @@ export default function(eccent, phi, sinphi) {

return Math.log(Math.tan((HALF_PI + phi) / 2)) + eccent * Math.log((1 - con) / (1 + con)) / 2;
}
}

@@ -1,2 +0,2 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';

@@ -17,2 +17,2 @@ export default function(eccent, ts) {

return -9999;
}
}
import pj_mlfn from "./pj_mlfn";
var EPSLN = 1.0e-10;
import {EPSLN} from '../constants/values';
var MAX_ITER = 20;

@@ -21,2 +22,2 @@

return phi;
}
}

@@ -1,2 +0,2 @@

var HALF_PI = Math.PI/2;
import {HALF_PI} from '../constants/values';

@@ -8,2 +8,2 @@ export default function(eccent, phi, sinphi) {

return (Math.tan(0.5 * (HALF_PI - phi)) / con);
}
}

@@ -1,2 +0,4 @@

export var wgs84 = {
var exports = {};
export {exports as default};
exports.wgs84 = {
towgs84: "0,0,0",

@@ -7,3 +9,3 @@ ellipse: "WGS84",

export var ch1903 = {
exports.ch1903 = {
towgs84: "674.374,15.056,405.346",

@@ -14,3 +16,3 @@ ellipse: "bessel",

export var ggrs87 = {
exports.ggrs87 = {
towgs84: "-199.87,74.79,246.62",

@@ -21,3 +23,3 @@ ellipse: "GRS80",

export var nad83 = {
exports.nad83 = {
towgs84: "0,0,0",

@@ -28,3 +30,3 @@ ellipse: "GRS80",

export var nad27 = {
exports.nad27 = {
nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",

@@ -35,3 +37,3 @@ ellipse: "clrk66",

export var potsdam = {
exports.potsdam = {
towgs84: "606.0,23.0,413.0",

@@ -42,3 +44,3 @@ ellipse: "bessel",

export var carthage = {
exports.carthage = {
towgs84: "-263.0,6.0,431.0",

@@ -49,3 +51,3 @@ ellipse: "clark80",

export var hermannskogel = {
exports.hermannskogel = {
towgs84: "653.0,-212.0,449.0",

@@ -56,3 +58,3 @@ ellipse: "bessel",

export var ire65 = {
exports.ire65 = {
towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",

@@ -63,3 +65,3 @@ ellipse: "mod_airy",

export var rassadiran = {
exports.rassadiran = {
towgs84: "-133.63,-157.5,-158.62",

@@ -70,3 +72,3 @@ ellipse: "intl",

export var nzgd49 = {
exports.nzgd49 = {
towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",

@@ -77,3 +79,3 @@ ellipse: "intl",

export var osgb36 = {
exports.osgb36 = {
towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",

@@ -84,3 +86,3 @@ ellipse: "airy",

export var s_jtsk = {
exports.s_jtsk = {
towgs84: "589,76,480",

@@ -91,3 +93,3 @@ ellipse: 'bessel',

export var beduaram = {
exports.beduaram = {
towgs84: '-106,-87,188',

@@ -98,3 +100,3 @@ ellipse: 'clrk80',

export var gunung_segara = {
exports.gunung_segara = {
towgs84: '-403,684,41',

@@ -105,6 +107,6 @@ ellipse: 'bessel',

export var rnb72 = {
exports.rnb72 = {
towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
ellipse: "intl",
datumName: "Reseau National Belge 1972"
};
};

@@ -1,2 +0,4 @@

export var MERIT = {
var exports = {};
export {exports as default};
exports.MERIT = {
a: 6378137.0,

@@ -7,3 +9,3 @@ rf: 298.257,

export var SGS85 = {
exports.SGS85 = {
a: 6378136.0,

@@ -14,3 +16,3 @@ rf: 298.257,

export var GRS80 = {
exports.GRS80 = {
a: 6378137.0,

@@ -21,3 +23,3 @@ rf: 298.257222101,

export var IAU76 = {
exports.IAU76 = {
a: 6378140.0,

@@ -28,3 +30,3 @@ rf: 298.257,

export var airy = {
exports.airy = {
a: 6377563.396,

@@ -35,3 +37,3 @@ b: 6356256.910,

export var APL4 = {
exports.APL4 = {
a: 6378137,

@@ -42,3 +44,3 @@ rf: 298.25,

export var NWL9D = {
exports.NWL9D = {
a: 6378145.0,

@@ -49,3 +51,3 @@ rf: 298.25,

export var mod_airy = {
exports.mod_airy = {
a: 6377340.189,

@@ -56,3 +58,3 @@ b: 6356034.446,

export var andrae = {
exports.andrae = {
a: 6377104.43,

@@ -63,3 +65,3 @@ rf: 300.0,

export var aust_SA = {
exports.aust_SA = {
a: 6378160.0,

@@ -70,3 +72,3 @@ rf: 298.25,

export var GRS67 = {
exports.GRS67 = {
a: 6378160.0,

@@ -77,3 +79,3 @@ rf: 298.2471674270,

export var bessel = {
exports.bessel = {
a: 6377397.155,

@@ -84,3 +86,3 @@ rf: 299.1528128,

export var bess_nam = {
exports.bess_nam = {
a: 6377483.865,

@@ -91,3 +93,3 @@ rf: 299.1528128,

export var clrk66 = {
exports.clrk66 = {
a: 6378206.4,

@@ -98,3 +100,3 @@ b: 6356583.8,

export var clrk80 = {
exports.clrk80 = {
a: 6378249.145,

@@ -105,3 +107,3 @@ rf: 293.4663,

export var clrk58 = {
exports.clrk58 = {
a: 6378293.645208759,

@@ -112,3 +114,3 @@ rf: 294.2606763692654,

export var CPM = {
exports.CPM = {
a: 6375738.7,

@@ -119,3 +121,3 @@ rf: 334.29,

export var delmbr = {
exports.delmbr = {
a: 6376428.0,

@@ -126,3 +128,3 @@ rf: 311.5,

export var engelis = {
exports.engelis = {
a: 6378136.05,

@@ -133,3 +135,3 @@ rf: 298.2566,

export var evrst30 = {
exports.evrst30 = {
a: 6377276.345,

@@ -140,3 +142,3 @@ rf: 300.8017,

export var evrst48 = {
exports.evrst48 = {
a: 6377304.063,

@@ -147,3 +149,3 @@ rf: 300.8017,

export var evrst56 = {
exports.evrst56 = {
a: 6377301.243,

@@ -154,3 +156,3 @@ rf: 300.8017,

export var evrst69 = {
exports.evrst69 = {
a: 6377295.664,

@@ -161,3 +163,3 @@ rf: 300.8017,

export var evrstSS = {
exports.evrstSS = {
a: 6377298.556,

@@ -168,3 +170,3 @@ rf: 300.8017,

export var fschr60 = {
exports.fschr60 = {
a: 6378166.0,

@@ -175,3 +177,3 @@ rf: 298.3,

export var fschr60m = {
exports.fschr60m = {
a: 6378155.0,

@@ -182,3 +184,3 @@ rf: 298.3,

export var fschr68 = {
exports.fschr68 = {
a: 6378150.0,

@@ -189,3 +191,3 @@ rf: 298.3,

export var helmert = {
exports.helmert = {
a: 6378200.0,

@@ -196,3 +198,3 @@ rf: 298.3,

export var hough = {
exports.hough = {
a: 6378270.0,

@@ -203,3 +205,3 @@ rf: 297.0,

export var intl = {
exports.intl = {
a: 6378388.0,

@@ -210,3 +212,3 @@ rf: 297.0,

export var kaula = {
exports.kaula = {
a: 6378163.0,

@@ -217,3 +219,3 @@ rf: 298.24,

export var lerch = {
exports.lerch = {
a: 6378139.0,

@@ -224,3 +226,3 @@ rf: 298.257,

export var mprts = {
exports.mprts = {
a: 6397300.0,

@@ -231,3 +233,3 @@ rf: 191.0,

export var new_intl = {
exports.new_intl = {
a: 6378157.5,

@@ -238,3 +240,3 @@ b: 6356772.2,

export var plessis = {
exports.plessis = {
a: 6376523.0,

@@ -245,3 +247,3 @@ rf: 6355863.0,

export var krass = {
exports.krass = {
a: 6378245.0,

@@ -252,3 +254,3 @@ rf: 298.3,

export var SEasia = {
exports.SEasia = {
a: 6378155.0,

@@ -259,3 +261,3 @@ b: 6356773.3205,

export var walbeck = {
exports.walbeck = {
a: 6376896.0,

@@ -266,3 +268,3 @@ b: 6355834.8467,

export var WGS60 = {
exports.WGS60 = {
a: 6378165.0,

@@ -273,3 +275,3 @@ rf: 298.3,

export var WGS66 = {
exports.WGS66 = {
a: 6378145.0,

@@ -280,3 +282,3 @@ rf: 298.25,

export var WGS7 = {
exports.WGS7 = {
a: 6378135.0,

@@ -287,3 +289,3 @@ rf: 298.26,

export var WGS84 = {
exports.WGS84 = {
a: 6378137.0,

@@ -294,6 +296,6 @@ rf: 298.257223563,

export var sphere = {
exports.sphere = {
a: 6370997.0,
b: 6370997.0,
ellipseName: "Normal Sphere (r=6370997)"
};
};

@@ -1,13 +0,16 @@

export var greenwich = 0.0; //"0dE",
export var lisbon = -9.131906111111; //"9d07'54.862\"W",
export var paris = 2.337229166667; //"2d20'14.025\"E",
export var bogota = -74.080916666667; //"74d04'51.3\"W",
export var madrid = -3.687938888889; //"3d41'16.58\"W",
export var rome = 12.452333333333; //"12d27'8.4\"E",
export var bern = 7.439583333333; //"7d26'22.5\"E",
export var jakarta = 106.807719444444; //"106d48'27.79\"E",
export var ferro = -17.666666666667; //"17d40'W",
export var brussels = 4.367975; //"4d22'4.71\"E",
export var stockholm = 18.058277777778; //"18d3'29.8\"E",
export var athens = 23.7163375; //"23d42'58.815\"E",
export var oslo = 10.722916666667; //"10d43'22.5\"E"
var exports = {};
export {exports as default};
exports.greenwich = 0.0; //"0dE",
exports.lisbon = -9.131906111111; //"9d07'54.862\"W",
exports.paris = 2.337229166667; //"2d20'14.025\"E",
exports.bogota = -74.080916666667; //"74d04'51.3\"W",
exports.madrid = -3.687938888889; //"3d41'16.58\"W",
exports.rome = 12.452333333333; //"12d27'8.4\"E",
exports.bern = 7.439583333333; //"7d26'22.5\"E",
exports.jakarta = 106.807719444444; //"106d48'27.79\"E",
exports.ferro = -17.666666666667; //"17d40'W",
exports.brussels = 4.367975; //"4d22'4.71\"E",
exports.stockholm = 18.058277777778; //"18d3'29.8\"E",
exports.athens = 23.7163375; //"23d42'58.815\"E",
exports.oslo = 10.722916666667; //"10d43'22.5\"E"

@@ -1,5 +0,4 @@

var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var PJD_NODATUM = 5; // WGS84 or equivalent
import * as datum from './datumUtils';
import {PJD_3PARAM, PJD_7PARAM, PJD_NODATUM} from './constants/values';
import {geodeticToGeocentric, geocentricToGeodetic, geocentricToWgs84, geocentricFromWgs84, compareDatums} from './datumUtils';
function checkParams(type) {

@@ -11,3 +10,3 @@ return (type === PJD_3PARAM || type === PJD_7PARAM);

// Short cut if the datums are identical.
if (datum.compareDatums(source, dest)) {
if (compareDatums(source, dest)) {
return point; // in this case, zero is sucess,

@@ -31,12 +30,12 @@ // whereas cs_compare_datums returns 1 to indicate TRUE

// Convert to geocentric coordinates.
point = datum.geodeticToGeocentric(point, source.es, source.a);
point = geodeticToGeocentric(point, source.es, source.a);
// Convert between datums
if (checkParams(source.datum_type)) {
point = datum.geocentricToWgs84(point, source.datum_type, source.datum_params);
point = geocentricToWgs84(point, source.datum_type, source.datum_params);
}
if (checkParams(dest.datum_type)) {
point = datum.geocentricFromWgs84(point, dest.datum_type, dest.datum_params);
point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params);
}
return datum.geocentricToGeodetic(point, dest.es, dest.a, dest.b);
return geocentricToGeodetic(point, dest.es, dest.a, dest.b);
}

@@ -1,12 +0,10 @@

var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var PJD_WGS84 = 4; // WGS84 or equivalent
var PJD_NODATUM = 5; // WGS84 or equivalent
var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
import {PJD_3PARAM, PJD_7PARAM, PJD_WGS84, PJD_NODATUM, SEC_TO_RAD} from './constants/values';
function datum(datumCode, datum_params, a, b, es, ep2) {
var out = {};
out.datum_type = PJD_WGS84; //default setting
if (datumCode && datumCode === 'none') {
if (datumCode === undefined || datumCode === 'none') {
out.datum_type = PJD_NODATUM;
} else {
out.datum_type = PJD_WGS84;
}

@@ -30,3 +28,2 @@

out.a = a; //datum object also uses these values

@@ -33,0 +30,0 @@ out.b = b;

'use strict';
var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
var HALF_PI = Math.PI/2;
import {PJD_3PARAM, PJD_7PARAM, HALF_PI} from './constants/values';
export function compareDatums(source, dest) {

@@ -7,0 +4,0 @@ if (source.datum_type !== dest.datum_type) {

@@ -1,9 +0,3 @@

// ellipoid pj_set_ell.c
var SIXTH = 0.1666666666666666667;
/* 1/6 */
var RA4 = 0.04722222222222222222;
/* 17/360 */
var RA6 = 0.02215608465608465608;
var EPSLN = 1.0e-10;
import * as Ellipsoid from './constants/Ellipsoid';
import {SIXTH, RA4, RA6, EPSLN} from './constants/values';
import Ellipsoid from './constants/Ellipsoid';
import match from './match';

@@ -10,0 +4,0 @@

@@ -7,3 +7,3 @@ import proj4 from './core';

import transform from "./transform";
import * as mgrs from "mgrs";
import mgrs from "mgrs";
import version from "./version";

@@ -10,0 +10,0 @@ import includedProjections from "../projs";

@@ -1,2 +0,2 @@

import * as mgrs from 'mgrs';
import {toPoint, forward} from 'mgrs';

@@ -29,7 +29,7 @@ function Point(x, y, z) {

Point.fromMGRS = function(mgrsStr) {
return new Point(mgrs.toPoint(mgrsStr));
return new Point(toPoint(mgrsStr));
};
Point.prototype.toMGRS = function(accuracy) {
return mgrs.forward([this.x, this.y], accuracy);
return forward([this.x, this.y], accuracy);
};
export default Point;
import parseCode from './parseCode';
import extend from './extend';
import * as projections from './projections';
import * as deriveConstants from './deriveConstants';
import * as Datum from './constants/Datum';
import projections from './projections';
import {sphere as dc_sphere, eccentricity as dc_eccentricity} from './deriveConstants';
import Datum from './constants/Datum';
import datum from './datum';

@@ -39,4 +39,4 @@ import match from './match';

var sphere_ = deriveConstants.sphere(json.a, json.b, json.rf, json.ellps, json.sphere);
var ecc = deriveConstants.eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);
var sphere_ = dc_sphere(json.a, json.b, json.rf, json.ellps, json.sphere);
var ecc = dc_eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);
var datumObj = json.datum || datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2);

@@ -43,0 +43,0 @@

@@ -35,1 +35,6 @@ import merc from "./projections/merc";

}
export default {
start: start,
add: add,
get: get
};

@@ -1,2 +0,1 @@

var EPSLN = 1.0e-10;
import msfnz from '../common/msfnz';

@@ -6,2 +5,3 @@ import qsfnz from '../common/qsfnz';

import asinz from '../common/asinz';
import {EPSLN} from '../constants/values';

@@ -8,0 +8,0 @@ export function init() {

import adjust_lon from '../common/adjust_lon';
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
import {HALF_PI, EPSLN} from '../constants/values';
import mlfn from '../common/mlfn';

@@ -5,0 +5,0 @@ import e0fn from '../common/e0fn';

@@ -10,4 +10,3 @@ import mlfn from '../common/mlfn';

import imlfn from '../common/imlfn';
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
import {HALF_PI, EPSLN} from '../constants/values';

@@ -14,0 +13,0 @@ export function init() {

@@ -10,3 +10,3 @@ import e0fn from '../common/e0fn';

import imlfn from '../common/imlfn';
var EPSLN = 1.0e-10;
import {EPSLN} from '../constants/values';

@@ -13,0 +13,0 @@ export function init() {

@@ -1,5 +0,4 @@

var FORTPI = Math.PI/4;
import srat from '../common/srat';
var HALF_PI = Math.PI/2;
var MAX_ITER = 20;
import {HALF_PI, FORTPI} from '../constants/values';

@@ -6,0 +5,0 @@ export function init() {

import adjust_lon from '../common/adjust_lon';
var EPSLN = 1.0e-10;
import asinz from '../common/asinz';
import {EPSLN} from '../constants/values';

@@ -5,0 +5,0 @@ /*

@@ -1,4 +0,4 @@

var HALF_PI = Math.PI/2;
var FORTPI = Math.PI/4;
var EPSLN = 1.0e-10;
import {HALF_PI, EPSLN, FORTPI} from '../constants/values';
import qsfnz from '../common/qsfnz';

@@ -5,0 +5,0 @@ import adjust_lon from '../common/adjust_lon';

@@ -1,9 +0,7 @@

var EPSLN = 1.0e-10;
import msfnz from '../common/msfnz';
import tsfnz from '../common/tsfnz';
var HALF_PI = Math.PI/2;
import sign from '../common/sign';
import adjust_lon from '../common/adjust_lon';
import phi2z from '../common/phi2z';
import {HALF_PI, EPSLN} from '../constants/values';
export function init() {

@@ -10,0 +8,0 @@

import msfnz from '../common/msfnz';
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
var R2D = 57.29577951308232088;
import adjust_lon from '../common/adjust_lon';
var FORTPI = Math.PI/4;
import tsfnz from '../common/tsfnz';
import phi2z from '../common/phi2z';
import {FORTPI, R2D, EPSLN, HALF_PI} from '../constants/values';
export function init() {

@@ -11,0 +8,0 @@ var con = this.b / this.a;

import adjust_lon from '../common/adjust_lon';
var EPSLN = 1.0e-10;
export function init() {}
import {EPSLN} from '../constants/values';
/* Mollweide forward equations--mapping lat,long to x,y

@@ -6,0 +5,0 @@ ----------------------------------------------------*/

@@ -1,2 +0,2 @@

var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
import {SEC_TO_RAD} from '../constants/values';

@@ -3,0 +3,0 @@ /*

import tsfnz from '../common/tsfnz';
import adjust_lon from '../common/adjust_lon';
import phi2z from '../common/phi2z';
var HALF_PI = Math.PI/2;
var FORTPI = Math.PI/4;
var EPSLN = 1.0e-10;
import {EPSLN, HALF_PI, FORTPI} from '../constants/values';

@@ -8,0 +6,0 @@ /* Initialize the Oblique Mercator projection

import adjust_lon from '../common/adjust_lon';
var EPSLN = 1.0e-10;
import asinz from '../common/asinz';
var HALF_PI = Math.PI/2;
import {EPSLN, HALF_PI} from '../constants/values';

@@ -6,0 +5,0 @@ export function init() {

@@ -8,3 +8,4 @@ import e0fn from '../common/e0fn';

import mlfn from '../common/mlfn';
var EPSLN = 1.0e-10;
import {EPSLN} from '../constants/values';
import gN from '../common/gN';

@@ -11,0 +12,0 @@ var MAX_ITER = 20;

@@ -7,6 +7,7 @@ import adjust_lon from '../common/adjust_lon';

import pj_inv_mlfn from '../common/pj_inv_mlfn';
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
import {EPSLN, HALF_PI} from '../constants/values';
import asinz from '../common/asinz';
export function init() {

@@ -13,0 +14,0 @@ /* Place parameters in static storage for common use

@@ -1,3 +0,3 @@

var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
import {EPSLN, HALF_PI} from '../constants/values';
import sign from '../common/sign';

@@ -4,0 +4,0 @@ import msfnz from '../common/msfnz';

@@ -1,2 +0,2 @@

import * as gauss from './gauss';
import gauss from './gauss';
import adjust_lon from '../common/adjust_lon';

@@ -3,0 +3,0 @@

@@ -8,4 +8,4 @@ // Heavily based on this tmerc projection implementation

import adjust_lon from '../common/adjust_lon';
var HALF_PI = Math.PI / 2;
var EPSLN = 1.0e-10;
import {EPSLN, HALF_PI} from '../constants/values';
import sign from '../common/sign';

@@ -12,0 +12,0 @@

import adjust_lon from '../common/adjust_lon';
var HALF_PI = Math.PI/2;
var EPSLN = 1.0e-10;
import {HALF_PI, EPSLN} from '../constants/values';
import asinz from '../common/asinz';

@@ -5,0 +6,0 @@

@@ -1,3 +0,3 @@

var D2R = 0.01745329251994329577;
import * as PrimeMeridian from './constants/PrimeMeridian';
import {D2R} from './constants/values';
import PrimeMeridian from './constants/PrimeMeridian';
import units from './constants/units';

@@ -4,0 +4,0 @@ import match from './match';

@@ -1,5 +0,2 @@

var D2R = 0.01745329251994329577;
var R2D = 57.29577951308232088;
var PJD_3PARAM = 1;
var PJD_7PARAM = 2;
import {D2R, R2D, PJD_3PARAM, PJD_7PARAM} from './constants/values';
import datum_transform from './datum_transform';

@@ -56,3 +53,3 @@ import adjust_axis from './adjust_axis';

point = {
x: point.x - dest.grom_greenwich,
x: point.x - dest.from_greenwich,
y: point.y

@@ -59,0 +56,0 @@ };

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

@@ -5,0 +5,0 @@ "main": "dist/proj4-src.js",

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

["EPSG:102018", "+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"],
["testmerc", "+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere +datum=none"],
["testmerc", "+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere"],
["testmerc2", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs"]

@@ -172,3 +172,3 @@ ]);

assert.equal(proj4.defs('testmerc'), proj4.defs['testmerc']);
proj4.defs('foo', '+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere +datum=none');
proj4.defs('foo', '+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere');
assert.typeOf(proj4.defs['foo'], 'object');

@@ -175,0 +175,0 @@ proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326'));

@@ -266,8 +266,9 @@ var testPoints = [

xy:[-8237642.318702244, 5012341.663847514]
},{
code:"+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +datum=none +no_defs",
xy: [ 736106.55, 5893331.11 ],
ll: [11.0, 53.0]
},
{
code: '+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs',
xy: [736106.55, 5893331.11],
ll: [11.0, 53.0]
},
{
code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],AUTHORITY["EPSG","31370"],AXIS["X",EAST],AXIS["Y",NORTH]]',

@@ -320,3 +321,3 @@ xy:[104588.196404, 193175.582367],

{
code: '+proj=tmerc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 +datum=none',
code: '+proj=tmerc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5',
ll: [2, 1],

@@ -392,2 +393,7 @@ xy: [223413.46640632232, 111769.14504059685]

xy: [500000.0000000014, 6651411.190362714]
},
{
code: '+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs',
ll: [1.4477496, 46.8692953],
xy: [532247.285, 2208091.8723]
}

@@ -394,0 +400,0 @@ ];

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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