Skip to main content

Towards more pythonic use of GeoDatabases

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Conda - Version Conda - Downloads PyPI - Version PyPI - Downloads PyPI - Python Version License: MIT

Dynamic JSON Badge GitHub Actions Workflow Status: Black GitHub Actions Workflow Status: Pylint Read the Docs GitHub Actions Workflow Status: Linux GitHub Actions Workflow Status: macOS GitHub Actions Workflow Status: Windows

ouroboros

Introduction

ouroboros is a Python module that provides helpful functions and classes for manipulating spatial data stored in a File GeoDatabase.

The data (.gdb) are read from disk into memory as FeatureClass objects, using GeoPandas under the hood for efficient analysis and easy conversion to other spatial data formats. FeatureClass objects can exist on their own, or they can be grouped into FeatureDataset and GeoDatabase objects which can be accessed like dictionaries. For example:

>>> import ouroboros as ob

# Explore an existing dataset

>>> gdb_file = "spam_and_eggs.gdb"
>>> ob.list_datasets(gdb_file)
{'egg_dataset': ['eggs_fc', 'bad_eggs_fc'],
{'spam_dataset': ['spam_fc'],
 None: ['ham_fc']}

# Load a feature class and convert to GeoPandas

>>> fc = ob.FeatureClass("spam_and_eggs.gdb/egg_dataset/eggs_fc")
>>> gdf = fc.to_geodataframe()
>>> type(gdf)
<class 'geopandas.geodataframe.GeoDataFrame'>

# Assemble a new geodatabase in memory

>>> gdb = ob.GeoDatabase()
>>> gdb['good_egg_dataset'] = ob.FeatureDataset()
>>> gdb['good_egg_dataset']['eggs_fc'] = ob.FeatureClass("spam_and_eggs.gdb/eggs_fc")

# Save geodatabase to disk

>>> gdb.save("good_eggs.gdb")
>>> ob.list_datasets("good_eggs.gdb")
{'good_egg_dataset': ['eggs_fc'], None: []}

Getting Started

Installation

User Guide

About

ouroboros is released under a permissive open source license, it builds on mature open source GIS projects like GDAL, and importantly it does not use Esri's arcpy. Therefore, ouroboros does not require any paid licenses and it runs on macOS and Linux as well as Windows.

The main goal of this project is to allow traditional GIS users working primarily in the Esri/ArcGIS ecosystem to take advantage of the features and speed offered by modern data science tools. Second, it will provide a no-cost and user-friendly way to convert geodatabases to open data formats. And along the way, this project aims to develop a suite of tools that align with pythonic design principles, and also bring a little more joy and beauty to the task of wrangling spatial data.

This project is under active development and beta releases will be provided for the time being. Feedback, suggestions, and questions are welcomed in the Issues section.

Notes

Tested on Python 3.10, 3.11, 3.12, and 3.13 on the latest Windows, Linux, and macOS (version info here).

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

ouroboros_gis-1.0.1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ouroboros_gis-1.0.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file ouroboros_gis-1.0.1.tar.gz.

File metadata

  • Download URL: ouroboros_gis-1.0.1.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ouroboros_gis-1.0.1.tar.gz
Algorithm Hash digest
SHA256 17c70e15ceb4d12956ef585fb15024ada98be7854fcdc9d84357bbdce1a00415
MD5 cbc29863a8d4fdc2bfd1b3a87e5c7290
BLAKE2b-256 c15078d4fc360125f05f4b755c219bae70a3b9f6c358d9b5a5a162f468013b30

See more details on using hashes here.

Provenance

The following attestation bundles were made for ouroboros_gis-1.0.1.tar.gz:

Publisher: pypi-publish.yml on corbel-spatial/ouroboros

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ouroboros_gis-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ouroboros_gis-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ouroboros_gis-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62d4bad8da46bf813153e9270c41b91718e552bd7332f64056cad4d0ea822dfc
MD5 29c8a4bbac8838cfc46e3c6c66723422
BLAKE2b-256 0abda6c3afe4a17e1e216502b715ab4f3974d6ed75b718e2c95ba71e1507f9cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ouroboros_gis-1.0.1-py3-none-any.whl:

Publisher: pypi-publish.yml on corbel-spatial/ouroboros

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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