We are using Vertica for geospatial data analysis. We need to integrate Vertica database with GeoServer so that we can fetch and use Vertica's data in GeoServer.
How do I create an UI for the datastore (created using https://docs.geotools.org/latest/userguide/tutorial/datastore/index.html) where I can ask for username, password or other required fields for connection? (Just like the fields that are displayed when we add a new PostGIS connection)
1 Answer 1
GeoServer creates the GUI automatically for you, provided the datastore:
- Is in the classpath
- It's properly registered in SPI (see
META-INF/services/DataStoreFactorySpi
) - Declares the parameters it needs in the DataStoreFactory API.
-
Thanks for the reply, Andrea. I tried with the above approach but still, my datastore doesn't show up in the Vector Data Sources. Do we need any changes in the GeoServer code for this? I added the datastore jar and the driver jar but still no luck. Am I missing anything?RONAK SHAH– RONAK SHAH2022年02月04日 14:45:42 +00:00Commented Feb 4, 2022 at 14:45
-
No changes to the GeoServer code are needed, if the store is properly implemented, and available in the GeoServer classpath (along with whatever dependency it needs).Andrea Aime– Andrea Aime2022年02月04日 14:49:26 +00:00Commented Feb 4, 2022 at 14:49
-
1Thanks Andrea Aime, I was finally able to do this.RONAK SHAH– RONAK SHAH2022年02月07日 17:42:21 +00:00Commented Feb 7, 2022 at 17:42