🤖 This README was written by GPT-4. 🤖
- moved from python 3.11 to python 3.13
- added an mcp server with
fastmcp - agent.ipynb shows the use of
deepagentswith the mcp server TODO: remove asyncpg dependency and use psycopg3
govgis_nov2023-slim-spatial-server is a Dockerized project combining PostGIS and pgvector extensions to process and serve a comprehensive geospatial dataset, govgis_nov2023. This project aims to provide a robust framework for efficient handling and querying of geospatial data along with high-dimensional vector similarity search capabilities, leveraging the power of PostgreSQL.
- https://huggingface.co/datasets/joshuasundance/govgis_nov2023
- https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial
PostGIS: An extension of PostgreSQL, enabling it to store and manipulate spatial data.pgvector: A PostgreSQL extension for efficient similarity searches in high-dimensional vector spaces.govgis_nov2023: A rich dataset encapsulating metadata from various government GIS servers as of November 2023.
The docker-compose.yml file in this project defines multiple services:
- postgres: Utilizes the
joshuasundance/postgis_pgvector:1.0.0image, incorporating both PostGIS and pgvector. - postgres-init: A service to initialize the database with data from the
govgis_nov2023dataset. - pgadmin: Provides a web interface for database management using
dpage/pgadmin4:7.8.
- Setup: Clone the repository and navigate to the directory containing the
docker-compose.ymlfile. - Configuration: Adjust the
.envfile to set necessary environment variables. - Build and Run: Execute
docker compose upto build and start the services. - Access pgAdmin: Open
http://localhost:80in a web browser for database management.
The postgres-init service is responsible for loading data into the database. It processes the govgis_nov2023 dataset, transforming it into a suitable format for PostgreSQL, and then populates the database.
Download the dataset and
place it in ./govgis-nov2023 (according to the docker-compose.yml volume mapping).
- Environment Variables: Modify the
.envfile to set values likePOSTGRES_PASSWORD,POSTGRES_USER, etc. - Data Source: You can change the source of the
govgis_nov2023dataset by modifying theload_data.pyscript.
- Docker and Docker Compose are prerequisites.
- The project is intended for development and testing purposes.
- Secure your database and pgAdmin for production use.
Contributions to enhance the project are welcome. Please use the standard fork and pull request workflow for contributions.
govgis_nov2023-slim-spatial-server is licensed under the MIT License.