Skip to main content

GeoPandas-Postgis

Utilities oriented to using PostGIS features.

Install

pip install geopandas-postgis

Requirements

  • GeoPandas
  • GeoAlchemy2
  • SQLAlchemy
  • psycopg2

Usage

Currently, the postgis accessor only features a to_postgis method.

import geopandas as gpd
from sqlalchemy import create_engine

from geopandas_postgis import PostGIS

engine = create_engine("postgresql+psycopg2://postgres:postgres/localhost:test")
my_gdf = geopandas.read_file("my_shp.shp")
my_gdf.postgis.to_postgis(con=engine, table_name='test', geometry='Polygon')

The to_postgis method will accept any keyword argument in the to_sql method in pandas

Testing

Postgres needs to be running on your local machine with a postgres user (that has write access.) This will be moved to Docker over time.

License

MIT License

Copyright (c) 2018 Aaron Burgess

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for geopandas-postgis 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geopandas-postgis 0.2.1
File Size Uploaded Provenance Actions
geopandas-postgis-0.2.1.tar.gz 4.1 kB Without provenance Details for geopandas-postgis-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geopandas-postgis 0.2.1
File Interpreter ABI Platform Actions
geopandas_postgis-0.2.1-py3-none-any.whl Python 3 none any Details for geopandas_postgis-0.2.1-py3-none-any.whl

Total release size: 10.1 kB

Release files / geopandas-postgis-0.2.1.tar.gz

Download URL geopandas-postgis-0.2.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9b1ce429dcba29c3e1bacd72244fb80e0213ca26eb471d4e05935e0589f8989d
BLAKE2b-256 checksum
How to use checksums
ef26b275cc14c26cbf5622cfc8a1f461ffd3db2cb44c8b23412615f1027ec963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / geopandas_postgis-0.2.1-py3-none-any.whl

Download URL geopandas_postgis-0.2.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89085bb89bd488c4af3a0f0769049e9e612b95b7c43a967ce7cf03cc492713c0
BLAKE2b-256 checksum
How to use checksums
c5942056561e8c87705b1c191aeab0b66d6fb69b59456d36620e6a2f10da8a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Security for geopandas-postgis 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page