Skip to content

tonkintaylor/geopins-python

Repository files navigation

geopins

PyPI Version uv Ruff usethis

The geopins package provides geospatial support for the Python pins package. The package publishes data, models, and other Python objects, making it easy to share them across projects and with your colleagues. With geopins, there is support for geospatial datatypes (e.g. geopandas.GeoDatFrame, and rastr.Raster) and filetypes (e.g. GeoPackage, and GeoTIFF), fully compatible with your existing pins boards.

Installation

# With uv
uv add geopins

# With pip
pip install geopins

Quick Start

from pins import board_local

# Patch pins to support geospatial data
import geopins
geopins.patch()

# Define any pins board as usual
b = board_local()

# Save a GeoDataFrame
import geopandas as gpd
gdf = b.pin_write(
    gpd.GeoDataFrame({"x": [1, 2, 3]}, geometry=gpd.points_from_xy([1, 2, 3], [4, 5, 6])),
    "gdf_example",
)

# Read it back
gdf = b.pin_read("gdf_example")

# Save a raster
from rastr.raster import Raster
b.pin_write(Raster.example(), "raster_example")

# Read it back
raster = b.pin_read("raster_example")

Contributing

See the CONTRIBUTING.md file.

About

Geospatial support for the Python pins package.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •