Skip to main content

Convert shapefiles to GeoSPARQL

Project description

shape2geosparql

A library for converting shapefiles to GeoSPARQL.

Install

The GDAL library should already be installed on the system. On Fedora:

$ sudo yum install gdal-devel

On other systems:

You only need to install the core library, as the Python bindings will be installed with shape2geosparql.

Once GDAL is installed:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install shape2geosparql

Should there be any problems in installing the GDAL Python library, try to run this first:

$ pip install gdal==$(gdal-config --version)

or insert the GDAL version number in place of $(gdal-config --version).

Usage

Download and extract a shapefile, for example from:

Then, from python, IPython or Jupyter:

from shape2geosparql import convert

converter = convert('FILENAME.shp')
print(converter.write().decode()) 

You can also run the shape2geosparql command:

$ shape2geosparql FILENAME.shp

Project details


Download files

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

Files for shape2geosparql, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size shape2geosparql-0.1.1-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size shape2geosparql-0.1.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page