1.4.0 • Published 9 months ago

shape-sync v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

shape-sync

read shapefile on electron.

const { Shapefile } = require('./shapefile')

const shp = new Shapefile('file.shp')

console.log("feature_count: ", shp.feature_count)
console.log("wkt: ", shp.wkt)
console.log("bbox: ", shp.bbox)
console.log("bbox: ", shp.fieldDef())

for (let i = 0; i < shp.feature_count; i++) {
    const feature = shp.get(i)
    const geometry = feature.geometry
    console.log("geometry: ", geometry.coordinates)
    const properties = feature.properties
    console.log("properties: ", properties)
}

shp.close()
1.4.0

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.2

10 months ago

1.2.1

10 months ago

1.2.0

10 months ago