melalj / topojson-map-generator

Script that generates TopoJSON maps with one script
MIT License
35 stars 8 forks source link

Fail to generate map #2

Open floribon opened 8 years ago

floribon commented 8 years ago

Am I missing something? I get this exception when running ./generate.sh -r 110m

Note that I also had an error using this repo https://github.com/mbostock/world-atlas so may be related.

I am using node v4.1.0

bookmac:topojson-map-generator florian$ ./generate.sh -r 110m
Downloading Basemap
######################################################################## 100.0%
Warning 1: Value 1338612970 of field pop_est of feature 29 not successfully written. Possibly due to too larger number with respect to field width
Warning 1: Value 1166079220 of field pop_est of feature 72 not successfully written. Possibly due to too larger number with respect to field width
bounds: -180 -90 180 83.64513000000001 (spherical)
pre-quantization: 400m (0.00360°) 193m (0.00174°)
topology: 599 arcs, 8247 points
prune: retained 599 / 599 arcs (100%)
/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/rw/lib/rw/write-file-sync.js:26
        throw error;
        ^

Error: EAGAIN: resource temporarily unavailable, write
    at Error (native)
    at Object.fs.writeSync (fs.js:663:20)
    at Object.module.exports [as writeFileSync] (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/rw/lib/rw/write-file-sync.js:22:28)
    at output (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/bin/topojson:313:6)
    at notify (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/queue-async/queue.js:47:18)
    at /Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/queue-async/queue.js:39:16
    at inputJson (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/bin/topojson:255:3)
    at pop (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/queue-async/queue.js:24:14)
    at /Users/florian/repos-other/topojson-map-generator/node_modules/topojson/node_modules/queue-async/queue.js:38:39
    at /Users/florian/repos-other/topojson-map-generator/node_modules/topojson/bin/topojson:238:5
undefined:1
{"type":"Topology","objects":{"countries":{"type":"GeometryCollection","bbox":[-179.99999999999997,-90.00000000000003,180.00000000000014,83.64513000000001],"geometries":[{"type":"Polygon","properties":{"iso_a2":"AF","iso_a3":"AFG","continent":"Asia","name":"Afghanistan"},"id":"AF","arcs":[[0,1,2,3,4,5]]},{"type":"MultiPolygon","properties":{"iso_a2":"AO","iso_a3":"AGO","continent":"Africa","name":"Angola"},"id":"AO","arcs":[[[6,7,8,9]],[[10,11,12]]]},{"type":"Polygon","properties":{"iso_a2":"AL","iso_a3":"ALB","continent":"Europe","name":"Albania"},"id":"AL","arcs":[[13,14,15,16,17]]},{"type":"Polygon","properties":{"iso_a2":"AE","iso_a3":"ARE","continent":"Asia","name":"United Arab Emirates"},"id":"AE","arcs":[[18,19,20,21,22]]},{"type":"MultiPolygon","properties":{"iso_a2":"AR","iso_a3":"ARG","continent":"South America","name":"Argentina"},"id":"AR","arcs":[[[23,24]],[[25,26,27,28,29,30]]]},{"type":"Polygon","properties":{"iso_a2":"AM","iso_a3":"ARM","continent":"Asia","name":"Armenia"},"id":"

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Object.<anonymous> (/Users/florian/repos-other/topojson-map-generator/node_modules/topojson/bin/topojson-merge:60:21)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3
jbilcke commented 8 years ago

I have a similar problem, with the same error message.. Did you find a solution?

melalj commented 8 years ago

I tried on my computer and it worked. Try to set full permissions (777) for assets and maps. Let me know if that works.

I just updated the repo and added generated world maps.