@koopjs/winnow
Advanced tools
Comparing version 4.0.4 to 4.0.5
{ | ||
"name": "@koopjs/winnow", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Apply sql-like filters to GeoJSON", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -6,10 +6,17 @@ const _ = require('lodash'); | ||
const collectionCrs = _.get(collection, 'crs.properties.name'); | ||
if (!collectionCrs) return; | ||
if (!collectionCrs) { | ||
return; | ||
} | ||
const crs = collectionCrs.toLowerCase().replace(/urn:ogc:def:crs:/, ''); | ||
if (crs === OGC_WGS84) return; | ||
if (crs === OGC_WGS84) { | ||
return; | ||
} | ||
const crsRegex = /(?<authority>[a-z]+)(::|:)(?<srid>.+)/; | ||
const crsRegex = /(?<authority>epsg|esri|sr-org|iau2000)(::|:)(?<srid>.+)/; | ||
const result = crsRegex.exec(crs); | ||
if (!result) return; | ||
if (!result) { | ||
return; | ||
} | ||
const { groups: { srid } } = result; | ||
@@ -16,0 +23,0 @@ return srid; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95282
1974