mapbox / shp-write

create and write to shapefiles in pure javascript
BSD 3-Clause "New" or "Revised" License
290 stars 186 forks source link

0.2.7 fails when calling .zip() #37

Closed symbyte closed 7 years ago

symbyte commented 7 years ago

the call fails with the following stack trace:

writer.parts is not a function
    at write (node_modules/shp-write/shpwrite.js:12510:24)
    at eval (node_modules/shp-write/shpwrite.js:12570:13)
    at Array.forEach (native)
    at Module.module.exports (node_modules/shp-write/shpwrite.js:12568:10)
    at GeoConvert.toShapefile (dist/app/main/util/geo-convert.service.js:9:3495)
    at Object.it (spec-compiled/main/geo-convert.service.spec.js:61:44)
    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:332:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/dist/proxy.js:106:44)
    at ZoneDelegate.invoke (node_modules/zone.js/dist/zone.js:331:35)
    at Zone.run (node_modules/zone.js/dist/zone.js:225:44)
    at Object.<anonymous> (node_modules/zone.js/dist/jasmine-patch.js:123:51)
    at ZoneQueueRunner.jasmine.QueueRunner.ZoneQueueRunner.execute (node_modules/zone.js/dist/jasmine-patch.js:151:43)
    at ZoneQueueRunner.jasmine.QueueRunner.ZoneQueueRunner.execute (node_modules/zone.js/dist/jasmine-patch.js:151:43)
    at ZoneDelegate.invokeTask (node_modules/zone.js/dist/zone.js:365:38)
    at Zone.runTask (node_modules/zone.js/dist/zone.js:265:48)
    at drainMicroTaskQueue (node_modules/zone.js/dist/zone.js:497:36)
    at ZoneTask.invoke (node_modules/zone.js/dist/zone.js:437:26)
haoliangyu commented 7 years ago

This error is particularly related to POINT type because points.js doesn't have a parts() function.

tmcw commented 7 years ago

Fixed in #39