Write or parse GeoJSON as YAML

Related tags

Maps geoyaml
Overview

geoyaml

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

Technical details

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.

Usage

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

But why

There might be some real reasons why you might want to write GeoJSON as YAML.

  • You want some features of YAML you can't have in JSON, like comments or header metadata
  • You want small amounts of data to be more human-readable or human-editable than JSON
  • You want to have multiple documents in one file, something that can be achieved with Newline Delimited JSON or JSONL (but is inherently less human-readable)
  • You want to have multiple formats of documents in one file, e.g. geo data in YAML and description in Markdown, which cannot be parsed as valid JSON without embedding into string values
You might also like...

Reproject GeoJSON. Works Offline.

reproject-geojson Reproject GeoJSON features Works Offline Pure JavaScript Cross-Platform (NodeJS or Browser) install npm install reproject-geojson us

Jul 22, 2022

Dashboards-maps is a frontend plugin that helps you in uploading custom GeoJSON to OpenSearch and communicates with the geospatial backend plugin for the same.

Welcome! Project Resources Code of Conduct License Copyright Dashboards-Maps Dashboards-maps is a frontend plugin that helps you in uploading custom G

Dec 28, 2022

A memory-efficient GeoJSON representation.

memory-geojson (experimental ๐Ÿงช ) A memory-efficient GeoJSON representation. This is not a new format. It's not meant to be serialized, and it doesn't

Nov 29, 2022

modern parser & stringifier for WKT, EWKT, and GeoJSON

betterknown betterknown development is supported by ๐ŸŒŽ placemark.io I wrote wellknown, a WKT parser and stringifier, eons ago. It's still sort of popu

Sep 3, 2022

Reference for How to Write an Open Source JavaScript Library - https://egghead.io/series/how-to-write-an-open-source-javascript-library

Reference for How to Write an Open Source JavaScript Library The purpose of this document is to serve as a reference for: How to Write an Open Source

Dec 24, 2022

Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test and also deploy.

GraphQL Blog graphqlblog.com Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test an

Aug 17, 2022

Validate properties and well known annotations in your Backstage catalog-info.yaml files.

Backstage entity validator This package can be used as a GitHub action or a standalone node.js module GitHub action Inputs path Optional Path to the c

Dec 26, 2022

An open-source, self-hosted, low-code framework to build internal tools, web apps, admin panels, BI dashboards, workflows, and CRUD apps with YAML or JSON.

An open-source, self-hosted, low-code framework to build internal tools, web apps, admin panels, BI dashboards, workflows, and CRUD apps with YAML or JSON.

An open-source, self-hosted, low-code framework to build internal tools, web apps, admin panels, BI dashboards, workflows, and CRUD apps with YAML or JSON.

Jan 4, 2023

An Obsidian plugin to grab all yaml fields from all files into a dataframe

Metadataframe Metadataframe allows you to get all metadata from your vault into CSV file. With CSV in-hand, you can do any data analysis you want with

Sep 15, 2022

Add linked data to the YAML of your Obsidian notes.

Obsidian Linked Data Vocabularies Plugin This plugin adds YAML keys for the selected heading, url (optional), and broader, narrower and related headin

Oct 13, 2022

A custom action for setting GitHub Workflow environment variables with YAML configuration files.

yaml-env-action - A custom action for setting GitHub Workflow environment variables with YAML configuration files. Introduction yaml-env-action is a c

Dec 13, 2022

โšก It is a simplified database module with multiple functions that you can use simultaneously with sqlite, yaml, firebase and json.

Prisma Database Developed with ๐Ÿ’™ by Roxza โšก An easy, open source database ๐Ÿ“ฆ Installation npm i prisma.db --save yarn add prisma.db ๐Ÿ”ฎ Importing impo

Jan 3, 2023

Deduplication tool for pnpm-lock.yaml files

pnpm-deduplicate Remove duplicate dependencies from pnpm-lock.yaml. This project is simple and not have many features. I see it as a temporary solutio

Jan 3, 2023

Visualize and download JSON / YAML content

Visualize and download JSON / YAML content

Graphize ๐Ÿš€ Visualize and download JSON / YAML content in your browser Demo Key Features Preview your JSON / YAML documents instantly Pinch / Scroll Z

Dec 26, 2022

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)

openapi-zod-client Generates a zodios (typescript http client with zod validation) from a (json/yaml) OpenAPI spec (or just use the generated schemas/

Jan 4, 2023

A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YAML support designed to be easy to set up and use

A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YAML support designed to be easy to set up and use

About A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YML

Dec 28, 2022

Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.

vite-plugin-i18next-loader yarn add -D vite-plugin-i18next-loader Vite plugin to client bundle i18next locales composited from one to many json/yaml f

Nov 30, 2022

Parse, validate, manipulate, and display dates in javascript.

Moment.js A JavaScript date library for parsing, validating, manipulating, and formatting dates. Project Status Moment.js is a legacy project, now in

Jan 2, 2023

Parse and stringify URL query strings

query-string Parse and stringify URL query strings My open source work is supported by the community Special thanks to: All your environment variables

Jan 9, 2023
Owner
Lou Huang
Protagonist of an open world.
Lou Huang
Geokit - is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions and operations of geojson files.

Geokit Geokit is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions

Development Seed 31 Nov 17, 2022
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files

Mapshaper Introduction Mapshaper is software for editing Shapefile, GeoJSON, TopoJSON, CSV and several other data formats, written in JavaScript. Maps

Matthew Bloch 3.2k Jan 2, 2023
Reproject GeoJSON. Works Offline.

reproject-geojson Reproject GeoJSON features Works Offline Pure JavaScript Cross-Platform (NodeJS or Browser) install npm install reproject-geojson us

Daniel J. Dufour 8 Jul 22, 2022
Dashboards-maps is a frontend plugin that helps you in uploading custom GeoJSON to OpenSearch and communicates with the geospatial backend plugin for the same.

Welcome! Project Resources Code of Conduct License Copyright Dashboards-Maps Dashboards-maps is a frontend plugin that helps you in uploading custom G

null 9 Dec 28, 2022
A memory-efficient GeoJSON representation.

memory-geojson (experimental ?? ) A memory-efficient GeoJSON representation. This is not a new format. It's not meant to be serialized, and it doesn't

Tom MacWright 19 Nov 29, 2022
modern parser & stringifier for WKT, EWKT, and GeoJSON

betterknown betterknown development is supported by ?? placemark.io I wrote wellknown, a WKT parser and stringifier, eons ago. It's still sort of popu

Placemark 32 Sep 3, 2022
geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.

geotiff.js Read (geospatial) metadata and raw array data from a wide variety of different (Geo)TIFF files types. Features Currently available function

geotiff.js 649 Dec 21, 2022
Converts geojson to svg string given svg viewport size and maps extent.

geojson2svg Converts geojson to svg string given svg viewport size and maps extent. Check world map, SVG scaled map and color coded map examples to de

Gagan Bansal 163 Dec 17, 2022
Geokit - is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions and operations of geojson files.

Geokit Geokit is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions

Development Seed 31 Nov 17, 2022
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files

Mapshaper Introduction Mapshaper is software for editing Shapefile, GeoJSON, TopoJSON, CSV and several other data formats, written in JavaScript. Maps

Matthew Bloch 3.2k Jan 2, 2023