Package: tipg
Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.Documentation:https://developmentseed.org/tipg/Source Code:https://github.com/developmentseed/tipgtipg, pronouncedT[ee]pg, is aPythonpackage that helps create lightweight OGCFeaturesandTilesAPI with a PostGIS Database backend. The API has been designed forOGC FeaturesandOGC Tilesspecifications.NoteThis project is the result of the merge betweentifeaturesandtimvt.Install$python-mpipinstallpip-U
$python-mpipinstalltipg# or from source$gitclonehttps://github.com/developmentseed/tipg.git
$cdtipg
$python-mpipinstall-e.OGC SpecificationsSpecificationStatuslinkOGC Common Part 1: Core✅https://docs.ogc.org/DRAFTS/19-072.htmlOGC Common Part 2: Geospatial Data✅http://docs.ogc.org/DRAFTS/20-024.htmlOGC Features Part 1: Core✅https://docs.ogc.org/is/17-069r4/17-069r4.htmlOGC Features Part 2: CRS by Reference❌https://docs.ogc.org/is/18-058r1/18-058r1.htmlOGC Features Part 3: Filtering / CQL2✅https://docs.ogc.org/DRAFTS/19-079r1.htmlOGC Tiles Part 1: Core✅https://docs.ogc.org/is/20-057/20-057.htmlNotes:We chose to avoid implementing the second part of the specification to prevent the introduction of CRS-based GeoJSON. We may review this decision in the future.While we tried to follow OGC specifications to the letter, some API endpoints might have more capabilities (e.g., geometry column selection).PostGIS/PostgreSQLtipgrelies greatly on PostGIS'ST_*functions. PostGIS must be installed on your PostgreSQL database.SELECTname,default_version,installed_versionFROMpg_available_extensionsWHEREnameLIKE'postgis%'ornameLIKE'address%';CREATEEXTENSIONpostgis;ConfigurationTo be able to work, the application will need access to the database.tipgusesStarlette's configuration pattern, which makes use of environment variables or a.envfile to pass variables to the application.An example of a.envfile can be found in.env.example# you need to define the DATABASE_URL directly
DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgisMore info about configuration options athttps://developmentseed.org/tipg/user_guide/configuration/Launch$pipinstalluvicorn# Set your PostGIS database instance URL in the environment$exportDATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis
$uvicorntipg.main:app# or using Docker$docker-composeupappDocker imagesWe are publishing two different docker images ontagand on every commit tomainbranch:GunicornUvicornmain commitghcr.io/developmentseed/tipg:latestghcr.io/developmentseed/tipg:uvicorn-latesttagsghcr.io/developmentseed/tipg:0.0.0ghcr.io/developmentseed/tipg:uvicorn-0.0.0dockerfile/dockerfiles/Dockerfile.gunicorn/dockerfiles/Dockerfile.uvicornSee all version athttps://github.com/developmentseed/tipg/pkgs/container/tipg# Gunicorn image
$ docker run \
    -p 8081:8081 \
    -e PORT=8081 \
    -e DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis \
    ghcr.io/developmentseed/tipg:latest

# or Uvicorn image
$ docker run \
    -p 8081:8081 \
    -e PORT=8081 \
    -e DATABASE_URL=postgresql://username:password@0.0.0.0:5432/postgis \
    ghcr.io/developmentseed/tipg:uvicorn-latestNote: If you are planning to use the docker image in a kubernetes deployment you may want to use theuvicornimage (ref:https://fastapi.tiangolo.com/deployment/server-workers/).Contribution & DevelopmentSeeCONTRIBUTING.mdLicenseSeeLICENSEAuthorsCreated byDevelopment SeedChangesSeeCHANGES.md.