Skip to content

An Frictionless Framework extension to add GeoJSON read and write support.

License

Notifications You must be signed in to change notification settings

fjelltopp/frictionless-geojson

 
 

Repository files navigation

Build Coverage

Codebase

Frictionless GeoJSON

An extension to add GeoJSON read and write support in frictionless-py.

Based on https://github.com/cividi/frictionless-geojson and https://github.com/frictionlessdata/framework/tree/main/frictionless/formats/json.

Installation

Currently installation is only by cloning the repo and installing locally. We will add a pip package when the extension is more mature.

git clone [email protected]:fjelltopp/frictionless-geojson.git
python -m pip install frictionless-geojson

Dev version

python --version # should be > 3.8

# download project
git clone [email protected]:fjelltopp/frictionless-geojson.git
cd frictionless-geojson

# Load dynamic dev version
python -m pip install -e .

Example - load GeoJSON and convert to CSV

from frictionless import Resource
from pprint import pprint

# Load GeoJSON
data = Resource('<PATH-TO-GEOJSON>.geojson')

# Print out data
pprint(data.read_rows())

# Write CSV to disk - generates _geom column with WKT geometry
data.write('<PATH-TO-CSV>.csv')

About

An Frictionless Framework extension to add GeoJSON read and write support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.4%
  • Makefile 10.6%