An application developed for the Geographic Information Systems (GIS) course. This project uses QGIS, pgAdmin, GeoServer, Docker, and Leaflet to efficiently manage and visualize geospatial data.
- Geospatial Layer Management: Publication and visualization of layers such as trails, roads, beaches, points of interest, and entities.
- Interactive Visualization: Includes base maps such as roads, satellite, and heatmap.
- Geometric Calculation: Tools for calculating areas and distances directly on the map.
- WMS Layers: Integration with GeoServer for WMS layer visualization.
- Buffer: Calculation and visualization of buffer for any geometry.
- Search: Dynamic search by names of all features.
- Backend API: Communication with a Node.js API for CRUD operations on spatial databases.
git clone https://github.com/t2ne/geo-docker.git-
Navigate to the project directory:
cd geo-docker -
Install the dependencies:
npm install
-
Install
nodemonglobally:npm install -g nodemon
-
Run the API server with
nodemon:nodemon server.js
Part of the data (such as type name and coordinates) comes from the API, so it's important that at minimum both the geoserver and the API are running for everything to work.
One of the ways, and the one that was used to view index.html, was to install the Live Server extension in VS Code and open a server from it.
- Configure styles and publish layers (see Configuration section).
- Restore the
sig28837.sqlfile in pgAdmin (see How to insert database section). - Open the frontend in the browser (if applicable).
-
Copy contents of the sig28837-plain.sql file
-
Paste in the Query Tool of pgadmin4.
-
Open pgAdmin.
-
Create the database:
- Right-click on "Databases" -> Create -> Database.
- Name it
sig28837.
-
Copy the
sig28837.sqlfile -
Go to the location:
\\wsl.localhost\docker-desktop\mnt\docker-desktop-disk\data\docker\overlay2\one_of_the_folders\merged\tmp...where "one_of_the_folders" is the one that contains the pgadmin files, and place the sql file there. -
Restore the database:
- Right-click on
sig28837-> Restore. - Select the
sig28837.sqlfile in thetmpfolder.
- Right-click on
-
Access GeoServer.
-
Create the styles:
- Go to "Styles" -> "Add New Style".
- Copy and paste the corresponding XML code.
- Apply the style to the desired layer.
-
Publish the layers:
- Configure the
stores,layersand link the created styles.
- Configure the
-
Access the GeoServer container in Docker.
-
Edit the
web.xmlfile in/usr/local/tomcat/webapps/geoserver/WEB-INF. -
Enable CORS (uncomment lines 165 to 201).
-
Restart the container:
su cd /usr/local/tomcat/bin ./shutdown.sh cd /usr/local/tomcat/bin ./startup.sh
Tested on:
- Chrome
- Firefox
- Edge
- @t2ne
This project was developed as part of a university assignment, integrating spatial databases, map servers, and interactive frontend.