@loaders.gl/gis
Advanced tools
Comparing version 2.3.12 to 2.3.13
@@ -23,3 +23,3 @@ "use strict"; | ||
return secondPass(features, firstPassData, { | ||
coordLength: options.coordLength || firstPassData.coordLength, | ||
coordLength: options.coordLength || firstPassData.coordLength || 2, | ||
numericPropKeys: options.numericPropKeys || firstPassData.numericPropKeys, | ||
@@ -219,3 +219,3 @@ PositionDataType: options.PositionDataType || Float32Array | ||
lineFeaturesCount: lineFeaturesCount, | ||
coordLength: Math.max.apply(Math, (0, _toConsumableArray2["default"])(coordLengths)), | ||
coordLength: coordLengths.size > 0 && Math.max.apply(Math, (0, _toConsumableArray2["default"])(coordLengths)), | ||
polygonPositionsCount: polygonPositionsCount, | ||
@@ -222,0 +222,0 @@ polygonObjectsCount: polygonObjectsCount, |
export function geojsonToBinary(features, options = {}) { | ||
const firstPassData = firstPass(features); | ||
return secondPass(features, firstPassData, { | ||
coordLength: options.coordLength || firstPassData.coordLength, | ||
coordLength: options.coordLength || firstPassData.coordLength || 2, | ||
numericPropKeys: options.numericPropKeys || firstPassData.numericPropKeys, | ||
@@ -117,3 +117,3 @@ PositionDataType: options.PositionDataType || Float32Array | ||
lineFeaturesCount, | ||
coordLength: Math.max(...coordLengths), | ||
coordLength: coordLengths.size > 0 && Math.max(...coordLengths), | ||
polygonPositionsCount, | ||
@@ -120,0 +120,0 @@ polygonObjectsCount, |
@@ -13,3 +13,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
return secondPass(features, firstPassData, { | ||
coordLength: options.coordLength || firstPassData.coordLength, | ||
coordLength: options.coordLength || firstPassData.coordLength || 2, | ||
numericPropKeys: options.numericPropKeys || firstPassData.numericPropKeys, | ||
@@ -207,3 +207,3 @@ PositionDataType: options.PositionDataType || Float32Array | ||
lineFeaturesCount: lineFeaturesCount, | ||
coordLength: Math.max.apply(Math, _toConsumableArray(coordLengths)), | ||
coordLength: coordLengths.size > 0 && Math.max.apply(Math, _toConsumableArray(coordLengths)), | ||
polygonPositionsCount: polygonPositionsCount, | ||
@@ -210,0 +210,0 @@ polygonObjectsCount: polygonObjectsCount, |
{ | ||
"name": "@loaders.gl/gis", | ||
"description": "Helpers for GIS category data", | ||
"version": "2.3.12", | ||
"version": "2.3.13", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "publishConfig": { | ||
"dependencies": { | ||
"@loaders.gl/loader-utils": "2.3.12", | ||
"@loaders.gl/loader-utils": "2.3.13", | ||
"@mapbox/vector-tile": "^1.3.1", | ||
@@ -36,3 +36,3 @@ "pbf": "^3.2.1" | ||
}, | ||
"gitHead": "3d843e067364744ab2ff9ee2ea172bf16fac13ac" | ||
"gitHead": "d5fbc8f8871c900a7d99d1e0145f47e6d857ebc1" | ||
} |
@@ -7,3 +7,3 @@ // Convert GeoJSON features to flat binary arrays | ||
return secondPass(features, firstPassData, { | ||
coordLength: options.coordLength || firstPassData.coordLength, | ||
coordLength: options.coordLength || firstPassData.coordLength || 2, | ||
numericPropKeys: options.numericPropKeys || firstPassData.numericPropKeys, | ||
@@ -121,3 +121,3 @@ PositionDataType: options.PositionDataType || Float32Array | ||
lineFeaturesCount, | ||
coordLength: Math.max(...coordLengths), | ||
coordLength: coordLengths.size > 0 && Math.max(...coordLengths), | ||
polygonPositionsCount, | ||
@@ -124,0 +124,0 @@ polygonObjectsCount, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
269113
+ Added@loaders.gl/loader-utils@2.3.13(transitive)
- Removed@loaders.gl/loader-utils@2.3.12(transitive)