geosparqllib
A Python functions library for working with GeoSPARQL data.
Project home: https://github.com/Kurrawong/geosparqllib/
This Python library contains a series of functions for creating, using and otherwise working with GeoSPARQL RDF data.
Common tasks handled by this library are:
- creating GeoSPARQL data from other spatial data
- ...
Installation
This library is available on PyPI so can be installed using PIP:
pip install geosparqllib
or Poetry:
poetry add geosparqllib
Use
Here's an example of using the make_geometry() function:
from geosparqllib import make_geometry
j = """
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[0, 0],
[1, 0],
[1, 1],
[0, 1],
[0, 0]
]
]
}
}
"""
f = "http://example.com/f/1"
geom, bn = make_geometry(f, j)
print(geom.serialize(format="longturtle"))
returns:
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
<http://example.com/f/1>
geo:hasGeometry
[
a geo:Geometry ;
geo:asWKT "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))"^^geo:wktLiteral ;
] ;
.
See further examples of use in this module's tests in its source code:
License
BSD- 3-Clause (and in RDF).
Contact
Developer:
Nicholas Car
KurrawongAI
nick@kurrawong.ai
Admin
Useful build commands
~$ poetry run pytest
# update version in pyproject.toml
~$ git commit -am "new version x.x.x"
~$ git tag x.x.x
~$ git push --tags
~$ poetry build
~$ poetry publish
Release files for geosparqllib 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| geosparqllib-0.1.4.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geosparqllib-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / geosparqllib-0.1.4.tar.gz
| Download URL | geosparqllib-0.1.4.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e33b42be0e43e4100d9364da407d4220c0d70b9530745e27d056c48a1d940b5
|
|
BLAKE2b-256 checksum How to use checksums |
d143e55290976fe62c2726feafa964275f3b56b03257f5376b4d802074549e12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0b5 Darwin/23.5.0
|
Release files / geosparqllib-0.1.4-py3-none-any.whl
| Download URL | geosparqllib-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
037766c4a21ff3638c517689cb03741d30cdc64f45c81049eb0da5489d8fd8d8
|
|
BLAKE2b-256 checksum How to use checksums |
102ec1f0deb09a08f0b3b4f634bbffd8e0642a638a1d4ffae92fec01caecf357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0b5 Darwin/23.5.0
|