format geojson
Project description
GeoJSON format
Formatting geojson with each feature on its own line
Requirements
- Python: >=3.5
Installation
python -m pip install geojsonformat
Usage example
Input:
{"type":"FeatureCollection","name":"ne_50m_admin_0_countries_lakes","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"featurecla":"Admin-0 country","scalerank":1},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375, 56.78884524518923],[25.521240234375, 56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375, 56.78884524518923]]]}},{"type":"Feature","properties":{"featurecla":"Admin-0 country"},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375, 56.78884524518923],[25.521240234375, 56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375, 56.78884524518923]]]}}]}
Formatting:
geojsonformat input.geojson out.geojson
Output:
{"type": "FeatureCollection", "name": "ne_50m_admin_0_countries_lakes", "crs": {"type": "name", "properties": {"name": "urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[
{"type": "Feature", "properties": {"featurecla": "Admin-0 country", "scalerank": 1}, "geometry": {"type": "Polygon", "coordinates": [[[26.1474609375, 56.78884524518923], [25.521240234375, 56.24334992410525], [26.54296875, 55.979945357882315], [27.158203125, 56.52919914018469], [27.290039062499996, 56.90900226702048], [26.1474609375, 56.78884524518923]]]}},
{"type": "Feature", "properties": {"featurecla": "Admin-0 country"}, "geometry": {"type": "Polygon", "coordinates": [[[26.1474609375, 56.78884524518923], [25.521240234375, 56.24334992410525], [26.54296875, 55.979945357882315], [27.158203125, 56.52919914018469], [27.290039062499996, 56.90900226702048], [26.1474609375, 56.78884524518923]]]}}
]}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geojsonformat-0.0.3.tar.gz
(2.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geojsonformat-0.0.3.tar.gz.
File metadata
- Download URL: geojsonformat-0.0.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99152daee7acc71a378d405797aabb1c00e03da6857df4c4e39a9a74724c2ca
|
|
| MD5 |
ce15d0554581747900ea9210e6398e46
|
|
| BLAKE2b-256 |
5550a7f6f7e3cfc34e3fe9d745db82faff030df6efd192e2d9e83510bb43cf6f
|
File details
Details for the file geojsonformat-0.0.3-py3-none-any.whl.
File metadata
- Download URL: geojsonformat-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bef4674e5c7bc5ef64d4baa718d094a8699ff3d5b23fb0106e5fb275feae0bf8
|
|
| MD5 |
13195ae755dfda476017cec47bfe805a
|
|
| BLAKE2b-256 |
836a01a340ac405de604afbca155eb87ee8c52a8d6c97cdc540c0c6edb4acd05
|