Socket
Socket
Sign inDemoInstall

@skycatch/geo-util

Package Overview
Dependencies
Maintainers
21
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skycatch/geo-util - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

3

CHANGELOG.md

@@ -7,2 +7,5 @@ # Changelog

## [v1.1.5]
- fix(utm_util): utm zones less than 10 would return incorrect EPSG code
## [v1.1.4]

@@ -9,0 +12,0 @@ - feature(GeographicTilingScheme): add `degreesToMeters` static method

34

doc/coverage.md
# Code Quality Report
Thu Sep 19 2019 16:54:00 GMT-0700 (PDT)
Tue Oct 01 2019 18:25:20 GMT-0700 (PDT)

@@ -9,3 +9,3 @@ ## Tests

**GeoUtil#getCenter**
✔ 1) returns the center (3 ms)
✔ 1) returns the center (2 ms)

@@ -18,3 +18,3 @@ **GeographicTilingScheme**

**metersToDegrees**
✔ 3) should convert meters to decimal degrees (0 ms)
✔ 3) should convert meters to decimal degrees (1 ms)
✔ 4) DEPRECATED: should convert meters to decimal degrees (0 ms)

@@ -26,8 +26,8 @@

**getLevelMaximumGeometricError**
✔ 6) should calculate the maximum geometric error at the given level (0 ms)
✔ 6) should calculate the maximum geometric error at the given level (1 ms)
**positionToTileXY**
✔ 7) [XYZ format] should calculate the tile origin for lat=37.8238667 lon=-122.3681195 level=14} (1 ms)
✔ 7) [XYZ format] should calculate the tile origin for lat=37.8238667 lon=-122.3681195 level=14} (0 ms)
✔ 8) [XYZ format] should calculate the tile origin for { lat: 37.8247935561, lon: -122.3671948879, level: 16 } (0 ms)
✔ 9) [TMS format] should calculate the tile origin for { lat: 37.8247935561, lon: -122.3671948879, level: 16 } (1 ms)
✔ 9) [TMS format] should calculate the tile origin for { lat: 37.8247935561, lon: -122.3671948879, level: 16 } (0 ms)

@@ -37,7 +37,7 @@ **tileXYToRectangle**

✔ 11) [TMS format | x=5245 y=11634] should calculate the tile rectangle for the tile (0 ms)
✔ 12) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (0 ms)
✔ 12) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (1 ms)
**tileXYToNativeRectangle**
✔ 13) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (1 ms)
✔ 14) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (0 ms)
✔ 13) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (0 ms)
✔ 14) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile (1 ms)
✔ 15) [TMS format | x=83935 y=186155] should calculate the tile rectangle for the tile even if xy are strings (0 ms)

@@ -53,5 +53,5 @@

**nativeRectangleForPositionsAtLevel**
✔ 19) [XYZ format] TI - should calculate the bounding rectangle in degrees for a set of positions with NO buffer (1 ms)
✔ 19) [XYZ format] TI - should calculate the bounding rectangle in degrees for a set of positions with NO buffer (0 ms)
✔ 20) [XYZ format] TI - should calculate the bounding rectangle in degrees for a set of positions with a buffer applied (0 ms)
✔ 21) [XYZ format] Koriyama - should calculate the bounding rectangle in degrees for a set of positions with NO buffer (0 ms)
✔ 21) [XYZ format] Koriyama - should calculate the bounding rectangle in degrees for a set of positions with NO buffer (1 ms)

@@ -62,3 +62,3 @@ **tilePixelToPosition**

**tilePixelToNativePosition**
✔ 23) should return the geographic x,y in latlon for the given pixel of a 256x256 tile (1 ms)
✔ 23) should return the geographic x,y in latlon for the given pixel of a 256x256 tile (0 ms)

@@ -71,3 +71,3 @@ **StereaUtil**

**StereaUtil#getCoord**
✔ 25) returns the projected coordinate (2 ms)
✔ 25) returns the projected coordinate (8 ms)

@@ -80,3 +80,3 @@ **StereaUtil#getLatLon**

**UtmUtil#getZone**
✔ 27) returns the UTM zone from lat/lon (0 ms)
✔ 27) returns the UTM zone from lat/lon (1 ms)
✔ 28) throws an error on invalid lat/lon (0 ms)

@@ -99,3 +99,3 @@

**UtmUtil#getEPSGCode**
✔ 35) returns ESPG code for any given lat/lon (0 ms)
✔ 35) returns ESPG code for any given lat/lon (1 ms)

@@ -107,3 +107,3 @@

Test duration: 47 ms
Test duration: 51 ms

@@ -117,3 +117,3 @@

Threshold: 0%
Coverage: 95.14% (16/329)
Coverage: 94.63% (18/335)

@@ -116,10 +116,9 @@ 'use strict'

const zone = this.getZone(lat, lon)
const zoneNum = zone.replace('N', '').replace('S', '')
const zoneNum = +zone.replace('N', '').replace('S', '')
if (zone.indexOf('S') !== -1) {
return `epsg:327${zoneNum}`
return `epsg:${32700 + zoneNum}`
}
return `epsg:326${zoneNum}`
return `epsg:${32600 + zoneNum}`
}
}
{
"name": "@skycatch/geo-util",
"version": "1.1.4",
"version": "1.1.5",
"description": "coordinates & projections utility",

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

@@ -17,3 +17,4 @@ 'use strict'

{ lat: 3, lon: 4, zone: '31N' },
{ lat: -34.5, lon: 34, zone: '36S' }
{ lat: -34.5, lon: 34, zone: '36S' },
{ lat: 68.048, lon: -162.879, zone: '3N' }
]

@@ -219,3 +220,4 @@

{ lat: -38, lon: -122, epsg: 'epsg:32710' },
{ lat: 38, lon: -100, epsg: 'epsg:32614' }
{ lat: 38, lon: -100, epsg: 'epsg:32614' },
{ lat: 68.048, lon: -162.879, epsg: 'epsg:32603' }
]

@@ -222,0 +224,0 @@

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