Hello, I am now having no idea how to retrieve data from PostGIS using APIs and after I retrieve that data, I want to create it as layers and register with WFS services and return its URL to frontend.
Is there any possible way to that with python APIs?
Thank you
We have a REST API you can use to configure geoserver, there is a python library “gsconfig” to help make these REST requests, but it unmaintained (although used by many applications).
For data access GeoServer supports a number of protocols - WFS is used to access vector data.
There are some WFS python clients - for example: https://geopython.github.io/OWSLib/
Most python programers use ogr library wrapper though (and that is what I would recommend).
Please note that the WFS protocol is not specific to geoserver, using a standard means your program will work with geoserver, mapserver, esri, etc…
References:
- https://pypi.org/project/gsconfig/
- https://geoserver.geo-solutions.it/edu/en/rest/python_gsconfig.html
- https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html
···
–
Jody Garnett
Hi Jody,
The python library gsconfig has been evolved and maintained by the GeoNode team under https://github.com/GeoNode/geoserver-restconfig. It should be now ready for python 3 too.
Best,
Francesco
···
–
Jody Garnett
That is great news! Thank you …
Can you add that to the OSGeo project list?
···
–
Jody Garnett