As of v0.1.1, geojson2csv doesn't work with polygons. Trying to figure out the best way to represent polygons in a CSV in the first place and ran into this issue.
Last active
August 29, 2015 14:10
-
-
Save ungoldman/05603d639276b0c1f69d to your computer and use it in GitHub Desktop.
geojson2csv w/ polygons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geojson2csv = require('geojson2csv') | |
console.log('hello') | |
geojson2csv('./polygon.geojson', './output.csv', function(err){ | |
if (err) throw err | |
console.log('hi') | |
}) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 13. in line 1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lat,lon | |
43.2421875,56.17002298293205,55.54687499999999,46.07323062540838,86.484375,56.559482483762245,61.17187499999999,63.074865690586634,48.8671875,61.438767493682825,43.2421875,56.17002298293205,undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "geojson2csv-polygons", | |
"main": "index.js", | |
"dependencies": { | |
"geojson2csv": "^0.1.1" | |
}, | |
"license": "ISC" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment