Configuring Workspaces and Datastores
Before you can connect database tables or upload Shapefiles/GeoPackages to create layers, you must define Workspaces (to organize your assets) and Datastores (to link database connections).
1. Create a Workspace
Workspaces act as namespaces to group your datasets, layers, and maps logically.
- Navigate to Workspaces in the sidebar menu.
- Click the Create New Workspace button.
- In the modal dialog:
- Workspace Name: Provide a unique namespace (spaces are automatically converted to underscores, and special characters are removed).
- Description: Add a brief description of what this workspace represents (e.g.,
production_workspace).
- Click Create Workspace to save.
2. Register a Datastore
A Datastore holds connection properties to a geospatial database (such as a PostGIS-enabled PostgreSQL instance) where layer tables are stored.
- Navigate to Datastores in the sidebar menu.
- Click the Create New Datastore button.
- In the dialog:
- Name: A descriptive name for the datastore (e.g.,
Main GIS DB). - Description: Details about the database server.
- Workspace: Assign the Datastore to one of your created Workspaces.
- Enabled: Ensure the switch is enabled so it is active for layer creation.
- Name: A descriptive name for the datastore (e.g.,
- Click Create to initialize the datastore profile.
3. Configure the PostGIS Connection
Once the datastore profile is created, you must specify the actual database server credentials:
- Locate your new datastore in the Datastore List.
- Click the Config or PostGIS Configuration action button next to it.
- Fill in the connection credentials:
- Host: The database server hostname or IP address (e.g.,
localhostor12.34.56.78). - Port: Database port (default is
5432for PostgreSQL). - Database Name: The name of your database (e.g.,
osmap_spatial). - Schema Name: The database schema (defaults to
public). - Username: Database user role.
- Password: Password for the database user.
- SSL Mode: Connection SSL protocol (options:
disable,require,verify-ca,verify-full).
- Host: The database server hostname or IP address (e.g.,
- Click Create Configuration (or Update Configuration).
- The system will test the connection. If successful, you can now reference this datastore when creating or importing layers.