📐 geojson-bbox
Simple Python module for calculating bounding box (bbox) from given GeoJSON object.
Currently following GeoJSON objects are supported (RFC 7946):
Installation
$ pip install gbbox
Usage
>>> from gbbox import LineString
>>>
>>> linestring_geojson = {
>>> "type": "LineString",
>>> "coordinates": [
>>> [1.0, 2.0],
>>> [3.0, 4.0]
>>> ]
>>> }
>>>
>>> linestring = LineString(**linestring_geojson)
>>> linestring_bbox = linestring.bbox()
>>> print(linestring_bbox)
>>> [1.0, 2.0, 3.0, 4.0]
>>> print(linestring.min_lon)
>>> 1.0
Development
$ docker compose up -d
# Start bash within container and enter it
$ docker exec -it gbbox bash
Project will be automatically installed within docker container in an editable mode and any code changes will be immediately reflected. Keep in mind that if you have python shell running then you have to restart it.
You can also use make lint and make test as shortcuts to run linters and tests.
Contributing
I am open to, and grateful for, any contributions made by the community.
Metadata
Release files for gbbox 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gbbox-0.1.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gbbox-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / gbbox-0.1.1.tar.gz
| Download URL | gbbox-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c337468c63b344ee3bcc0718e76f3c5c4ec6d2e57bb39bece40d630837df125
|
|
BLAKE2b-256 checksum How to use checksums |
150cdd9108d593ecc49bbced0acf8dae75a22220519dd702b57c6649e5454a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.13 Linux/5.15.0-1014-azure
|
Release files / gbbox-0.1.1-py3-none-any.whl
| Download URL | gbbox-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c2c24bc0f746027ff5e9a32274bebd7afe7c6bc59897b3fbdd4624de2dde657
|
|
BLAKE2b-256 checksum How to use checksums |
ae42c43fe263299bab579d4b3fcd17f83581ec09c3ec2005c70d96886ba3f56e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.13 Linux/5.15.0-1014-azure
|