mapbox / geojsonio-cli

a cli for geojson.io
ISC License
168 stars 19 forks source link

if initial json parsing fails, assume each line is a feature #5

Closed blackmad closed 10 years ago

blackmad commented 10 years ago

this is nice because ogr2ogr json puts each feature on a separate line, so you can use grep to extract the features you want.

tmcw commented 10 years ago

Hm, but lines with ,s? If there were no ,s, we could use a pre-existing library like ldjson-stream

blackmad commented 10 years ago

ogr2ogr puts the commas on separate lines, which is nice, but most json prettifiers don't?

I also split this out as a separate module if you think it's too much for geojsonio-cli https://github.com/blackmad/geojsonify

tmcw commented 10 years ago

Sweet, yeah - if you can refactor this to use geojsonify instead. This module right now is only glue-code-only so just concerned about it containing logic.

blackmad commented 10 years ago

sounds good. uploaded to npm @ https://npmjs.org/package/geojsonify if you want to add it to geojsonio-cli examples. Might also wrap in some of the more loose parsing functionality of s2map and toss in a dependence on wellknown so it's a one-stop-pipe-shop.

On Wed, Feb 5, 2014 at 9:32 AM, Tom MacWright notifications@github.comwrote:

Sweet, yeah - if you can refactor this to use geojsonify instead. This module right now is only glue-code-only so just concerned about it containing logic.

Reply to this email directly or view it on GitHubhttps://github.com/mapbox/geojsonio-cli/pull/5#issuecomment-34178472 .