Write or parse GeoJSON as YAML
APACHE-2.0 License
Write or parse GeoJSON as YAML. Like this:
type: FeatureCollection
features:
- geometry:
type: Point
coordinates:
- 37.96875
- 37.71859032558816
properties:
name: Hello World
Wow, so neat and so clean. No brackets or commas or quotation marks. ugh punctuation is the worst
This is mostly just a wrapper around the js-yaml library with the added step of running geojsonhint so you know if the output isn't valid GeoJSON. This is not exactly great dependency hygiene but I'll be damned if anyone else occupies this package namespace.
In a JavaScript module:
import geoyaml from 'geoyaml'
// `doc` is a string that is the contents of a YAML file
const geojson = geoyaml.load(doc)
From the command line:
TODO
There might be some real reasons why you might want to write GeoJSON as YAML.