- Supports OGC Features and STAC APIs
- Allows authorized data access based on access policies
- Enables metered data access
- Updated with latest software and client libraries
- Enhanced Software Testing
- Make a config file based on the template in example-config/config-example.json
- Set up the database using Flyway
- Set up AWS S3 for serving tiles and STAC assets
Flyway is used to manage the database schema and handle migrations. The migration files are located at src/main/resources/db/migrations. The following pre-requisites are needed before running flyway
:
- An admin user - a database user who has create schema/table privileges for the database. It can be the super user.
- A normal user - this is the database user that will be configured to make queries from the server
(e.g.
CREATE USER ogc WITH PASSWORD 'randompassword';
)
flyway.conf must be updated with the required data.
flyway.url
- the database connection URLflyway.user
- the username of the admin userflyway.password
- the password of the admin userflyway.schemas
- the name of the schema under which the tables are createdflyway.placeholders.ogcUser
- the username of the server user
Please refer here for more information about Flyway config parameters.
After this, the info
command can be run to test the config. Then, the migrate
command can be run to set up the database. At the /ogc-resource-server
directory, run
mvn flyway:info -Dflyway.configFiles=flyway.conf
mvn flyway:migrate -Dflyway.configFiles=flyway.conf
The database details should then be added to the server config.
AWS S3 is used to serve map tiles as well as STAC asset files. An S3 bucket can be set up by following the S3 documentation, after which the S3 bucket name, region name, access key and secret key can be added to the config.
- Install Java 11 and maven
- Set Environment variables
export LOG_LEVEL=INFO
- Use the maven exec plugin based starter to start the server
mvn clean compile exec:java@ogc-resource-server
- The server will be up on port 8080. To change the port, add
httpPort:<desired_port_number>
to the config in theApiServerVerticle
module. See configs/config-example.json for an example.
- Install Java 11 and maven
- Set Environment variables
export LOG_LEVEL=INFO
- Use maven to package the application as a JAR
mvn clean package -Dmaven.test.skip=true
- 2 JAR files would be generated in the
target/
directoryogc-resource-server-dev-0.0.1-SNAPSHOT-fat.jar
- non-clustered vert.x and does not contain micrometer metrics
A client SDK generated using OpenAPI Generator is located at client-sdk. To generate a version of the SDK derived from the latest version of the OpenAPI spec at https://geoserver.dx.ugix.org.in, download the OpenAPI Generator JAR file and run:
java -jar openapi-generator-cli.jar generate -i <URL> -g python --additional-properties removeOperationIdPrefix=true,removeOperationIdPrefixDelimiter=-,removeOperationIdPrefixCount=6 -o client-sdk --global-property models,modelTests=false,apis,apiTests=false,supportingFiles=README.md:requirements.txt:setup.py:setup.cfg:openapi_client:api_client.py:api_response.py:exceptions.py:__init__.py:configuration.py:py.types:rest.py
where <URL>
can be:
https://geoserver.dx.ugix.org.in/api
for OGC APIshttps://geoserver.dx.ugix.org.in/stac/api
for STAC APIshttps://geoserver.dx.ugix.org.in/metering/api
for metering/auditing APIs