Documentation

Getting Started
Data
Maps
Interfaces
Workflows
Forms
Sharing & Collaboration
Projects & Management
Integrations

PostgreSQL

Connect to PostgreSQL and PostGIS databases to import spatial data

Connect to PostgreSQL databases with PostGIS to import spatial datasets directly from your database server. Query tables and views with geometry columns and sync data on demand.

What is PostgreSQL/PostGIS

PostgreSQL is an open-source relational database. PostGIS extends PostgreSQL with spatial data types and functions for storing and querying geographic features.

Prerequisites

Before connecting, ensure you have:

  • PostgreSQL database with PostGIS extension enabled
  • Network access to the database server (check firewall rules)
  • Database credentials (username and password)
  • Database name, host address, and port number

Connect to PostgreSQL

  1. Click Add layer in the Layers panel
  2. Go to the Connections tab
  3. Select Postgres
  4. Fill in the connection parameters
  5. Click Create Connection

Atlas connects to the database and lists tables with spatial data.

Connection Parameters

Connection Name (optional): Label for this connection in your project. Example: "Production Database" or "City GIS Server".

Database Name (required): The exact name of the PostgreSQL database. Case-sensitive.

Host (required): Server address. Use localhost for local servers, or domain/IP like db.example.com or 192.168.1.100.

Port (required): PostgreSQL port number. Default is 5432. Check with your database administrator if different.

Username (required): Database user account with read permissions on spatial tables.

Password (required): Database password. Click the eye icon to show/hide the password.

Working with Spatial Data

Atlas imports tables and views that contain PostGIS geometry columns. After connection:

  1. Browse available spatial tables and views
  2. Select the tables you want to import
  3. Click Add to Project

The data imports as vector layers with all attributes preserved. Supports points, lines, polygons, and multi-geometries.

Security Considerations

SSL Connections: Atlas connects over standard PostgreSQL connections. Use SSH tunnels or VPNs for additional security.

Firewall Rules: Ensure the database server allows connections from your IP address. Contact your network administrator.

User Permissions: Create a read-only database user for Atlas connections. Never use admin credentials.

Credentials Storage: Connection credentials are stored securely in your Atlas workspace.

Troubleshooting

Connection Refused: Verify the host and port. Check that the database server accepts external connections in postgresql.conf.

Authentication Failed: Confirm username and password. Check pg_hba.conf for authentication method requirements.

Database Does Not Exist: Verify the database name is correct and case-sensitive.

No Spatial Data Found: Ensure PostGIS is installed and tables contain geometry columns. Run SELECT * FROM geometry_columns; to list spatial tables.

Timeout Error: Check network connectivity. The database server may be behind a firewall or VPN.

Permission Denied: User account needs SELECT permissions on the spatial tables and geometry_columns view.

PreviousFeature ServerIntegrations