Skip to main content

A Python functions library for working with GeoSPARQL data

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geosparqllib-0.1.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

geosparqllib-0.1.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file geosparqllib-0.1.4.tar.gz.

File metadata

  • Download URL: geosparqllib-0.1.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0b5 Darwin/23.5.0

File hashes

Hashes for geosparqllib-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2e33b42be0e43e4100d9364da407d4220c0d70b9530745e27d056c48a1d940b5
MD5 55719fb63690b029a94e494649fff4b6
BLAKE2b-256 d143e55290976fe62c2726feafa964275f3b56b03257f5376b4d802074549e12

See more details on using hashes here.

File details

Details for the file geosparqllib-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: geosparqllib-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0b5 Darwin/23.5.0

File hashes

Hashes for geosparqllib-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 037766c4a21ff3638c517689cb03741d30cdc64f45c81049eb0da5489d8fd8d8
MD5 c9dac4e7b3fbee3e5c81e911398594bd
BLAKE2b-256 102ec1f0deb09a08f0b3b4f634bbffd8e0642a638a1d4ffae92fec01caecf357

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page