https://github.com/ladybug-tools/ladybug-geojson
Interface to get ladybug tools geometries from GeoJSON Feature (RFC 7946)
https://github.com/ladybug-tools/ladybug-geojson
Last synced: 9 months ago
JSON representation
Interface to get ladybug tools geometries from GeoJSON Feature (RFC 7946)
- Host: GitHub
- URL: https://github.com/ladybug-tools/ladybug-geojson
- Owner: ladybug-tools
- License: agpl-3.0
- Created: 2022-02-23T14:26:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T13:49:00.000Z (over 2 years ago)
- Last Synced: 2025-08-30T18:38:34.284Z (10 months ago)
- Language: Python
- Size: 2.3 MB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ladybug-geojson
A library to convert geojson types into ladybug geometry types.
# docs
[API Documentation](https://www.ladybug.tools/ladybug_geojson/docs/)
# examples
### generate ladybug geometry from geojson string
```python
from ladybug_geojson.convert.geojson import from_geojson
geojson = '''
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
"properties": {"prop0": "value0"}
},
{ "type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
]
},
"properties": {
"prop0": "value0",
"prop1": 0.0
}
},
{ "type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
[100.0, 1.0], [100.0, 0.0] ]
]
},
"properties": {
"prop0": "value0",
"prop1": {"this": "that"}
}
}
]
}
'''
objs = from_geojson(geojson)
```
# make commands
- Generate docs: `make create-doc`
- Run tests: `make run-tests`
- Generate package manually: `make build`
## todo
- [ ] future release - add from_geometry and to_geojson