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.2.tar.gz
(2.3 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.2.tar.gz.
File metadata
- Download URL: geojsonformat-0.0.2.tar.gz
- Upload date:
- Size: 2.3 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 |
9913f2c4b72d1aca692c4029e883a1f65750e6baba1006bb09bf891dcf81de9d
|
|
| MD5 |
6cc5bdc0b18e8cfd0ce1de1086b5d025
|
|
| BLAKE2b-256 |
1c4f4fb585b9cf0c3428b911ba39d8d28f2b62942fd20f78de03b0fef6d91a38
|
File details
Details for the file geojsonformat-0.0.2-py3-none-any.whl.
File metadata
- Download URL: geojsonformat-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 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 |
f248f6ee59dfea3acc0ede8ef5cf8db57743bb6794c25549e5cce171769b42f1
|
|
| MD5 |
721103b35184a1837f895a951387ddef
|
|
| BLAKE2b-256 |
5ce1a84a12432d02b07712e1e257d77a36f9639313dc9c7716fe75c82615f160
|