Name | geosparqllib JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | A Python functions library for working with GeoSPARQL data |
upload_time | 2024-07-02 13:32:07 |
maintainer | None |
docs_url | None |
author | Nicholas Car |
requires_python | <4.0,>=3.11 |
license | BSD 3-clause |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](https://pypi.org/project/geosparqllib/) 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:
```python
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:
* <https://github.com/Kurrawong/geosparqllib/tree/main/tests>
## License
[BSD- 3-Clause](https://opensource.org/license/BSD-3-clause) (and [in RDF](https://purl.org/NET/rdflicense/BSD3.0)).
## Contact
Developer:
*Nicholas Car*
[KurrawongAI](https://kurrawong.ai)
<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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "geosparqllib",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Nicholas Car",
"author_email": "nick@kurrawong.ai",
"download_url": "https://files.pythonhosted.org/packages/d1/43/e55290976fe62c2726feafa964275f3b56b03257f5376b4d802074549e12/geosparqllib-0.1.4.tar.gz",
"platform": null,
"description": "# geosparqllib\n\nA Python functions library for working with GeoSPARQL data.\n\nProject home: <https://github.com/Kurrawong/geosparqllib/>\n\nThis Python library contains a series of functions for creating, using and otherwise working with GeoSPARQL RDF data.\n\nCommon tasks handled by this library are:\n\n* creating GeoSPARQL data from other spatial data\n* ...\n\n## Installation\n\nThis library is [available on PyPI](https://pypi.org/project/geosparqllib/) so can be installed using PIP:\n\n```\npip install geosparqllib\n```\n\nor Poetry:\n\n```\npoetry add geosparqllib\n```\n\n## Use\n\nHere's an example of using the `make_geometry()` function:\n\n```python\nfrom geosparqllib import make_geometry\n\nj = \"\"\"\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\", \n \"coordinates\": [\n [ \n [0, 0], \n [1, 0], \n [1, 1], \n [0, 1], \n [0, 0] \n ]\n ]\n }\n }\n \"\"\"\nf = \"http://example.com/f/1\"\ngeom, bn = make_geometry(f, j)\nprint(geom.serialize(format=\"longturtle\"))\n```\nreturns:\n```\nPREFIX geo: <http://www.opengis.net/ont/geosparql#>\n\n<http://example.com/f/1>\n geo:hasGeometry\n [\n a geo:Geometry ;\n geo:asWKT \"POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))\"^^geo:wktLiteral ;\n ] ;\n.\n```\n\nSee further examples of use in this module's tests in its source code:\n\n* <https://github.com/Kurrawong/geosparqllib/tree/main/tests>\n\n## License\n\n[BSD- 3-Clause](https://opensource.org/license/BSD-3-clause) (and [in RDF](https://purl.org/NET/rdflicense/BSD3.0)).\n\n\n## Contact\n\nDeveloper:\n\n*Nicholas Car* \n[KurrawongAI](https://kurrawong.ai) \n<nick@kurrawong.ai>\n\n\n## Admin\n\n### Useful build commands\n\n```\n~$ poetry run pytest\n# update version in pyproject.toml\n~$ git commit -am \"new version x.x.x\"\n~$ git tag x.x.x\n~$ git push --tags\n~$ poetry build\n~$ poetry publish\n```",
"bugtrack_url": null,
"license": "BSD 3-clause",
"summary": "A Python functions library for working with GeoSPARQL data",
"version": "0.1.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "102ec1f0deb09a08f0b3b4f634bbffd8e0642a638a1d4ffae92fec01caecf357",
"md5": "c9dac4e7b3fbee3e5c81e911398594bd",
"sha256": "037766c4a21ff3638c517689cb03741d30cdc64f45c81049eb0da5489d8fd8d8"
},
"downloads": -1,
"filename": "geosparqllib-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c9dac4e7b3fbee3e5c81e911398594bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 3799,
"upload_time": "2024-07-02T13:32:06",
"upload_time_iso_8601": "2024-07-02T13:32:06.479585Z",
"url": "https://files.pythonhosted.org/packages/10/2e/c1f0deb09a08f0b3b4f634bbffd8e0642a638a1d4ffae92fec01caecf357/geosparqllib-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d143e55290976fe62c2726feafa964275f3b56b03257f5376b4d802074549e12",
"md5": "55719fb63690b029a94e494649fff4b6",
"sha256": "2e33b42be0e43e4100d9364da407d4220c0d70b9530745e27d056c48a1d940b5"
},
"downloads": -1,
"filename": "geosparqllib-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "55719fb63690b029a94e494649fff4b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 3762,
"upload_time": "2024-07-02T13:32:07",
"upload_time_iso_8601": "2024-07-02T13:32:07.708909Z",
"url": "https://files.pythonhosted.org/packages/d1/43/e55290976fe62c2726feafa964275f3b56b03257f5376b4d802074549e12/geosparqllib-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-02 13:32:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "geosparqllib"
}