A FeatureServer/MapServer implementation based on FastAPI, Geopandas and ArcGIS API for Python. The name is an homage to KoopJS. KoopPy tries to achieve same functionality as KoopJS (sometime ... maybe).
Currently serves .geojson
, .shp
, .gdb
& .urltext
files inside ./data
and should support usage in MapViewer Classic and the new MapViewer. Styling for both FeatureServer and MapServer is implemented.
MapServer is only usable in MapViewer Classic
The API serves the data using the following routes:
- http://127.0.0.1:8000/
DATANAME
/FeatureServer - http://127.0.0.1:8000/
DATANAME
/FeatureServer/0 - http://127.0.0.1:8000/
DATANAME
/MapServer
For .gdb
every dataset inside the .gdb
will become its own service.
For .urltext
the filename will be the service name. Simply paste a url to a dataset (e.g. geojson) into the .urltext
file and KoopPy will also serve it.
For the example file inside the data folder ne_110m_admin_0_countries.shp
the routes would be:
- http://127.0.0.1:8000/
ne_110m_admin_0_countries
/FeatureServer - http://127.0.0.1:8000/
ne_110m_admin_0_countries
/FeatureServer/0 - http://127.0.0.1:8000/
ne_110m_admin_0_countries
/MapServer
To view all possible API endpoints refer to the following URL: http://127.0.0.1:8000/docs
- Clone this repository
- Create a new conda environment using the
environment.yml
(Windows) or use therequirements.txt
(Windows/Linux). - Run the conda environment
- Serve using
uvicorn
(e.g.uvicorn main:app
)
OR
- use the dockerfile.
- Properly implement renderers
- Implement PBF output
- Clean up code
- etc.