Interactive GIS Map using Spring Boot, GeoServer, PostGIS, and Leaflet.js
-
Install dependencies:
./install.sh
-
Start the application:
./start.sh
-
Access the application:
- Map Interface: http://localhost:8081/map
- GeoServer Admin: http://localhost:8080/geoserver (admin/admin)
-
Stop the application:
./stop.sh
-
Install prerequisites:
- Java 17+
- Maven 3.6+
- Docker & Docker Compose
-
Start the infrastructure:
docker-compose up -d
-
Build and run the application:
mvn spring-boot:run
-
Access the application:
- Map Interface: http://localhost:8081/map
- GeoServer Admin: http://localhost:8080/geoserver (admin/admin)
- Access GeoServer at http://localhost:8080/geoserver
- Login with admin/admin
- Create workspace:
gisproject - Add PostGIS store:
- Host:
db - Port:
5432 - Database:
gisdb - User:
gisuser - Password:
gispassword
- Host:
# Import shapefile to PostGIS
shp2pgsql -I -s 4326 path/to/your_data.shp public.your_layer | psql -h localhost -U gisuser -d gisdbGET /api/geo/config- Get GeoServer configurationGET /api/geo/layers- List available layers
The application follows standard Spring Boot structure:
- Controllers:
src/main/java/ge/devspace/gismap/controller/ - Services:
src/main/java/ge/devspace/gismap/service/ - Configuration:
src/main/java/ge/devspace/gismap/config/ - Templates:
src/main/resources/templates/
Installs all required dependencies and sets up the development environment:
- Docker & Docker Compose
- Java 17
- Maven
- Creates necessary directories
./install.shStarts all services in the correct order:
- PostgreSQL/PostGIS database
- GeoServer
- Spring Boot application
- Verifies all services are ready
./start.shGracefully stops all services:
- Spring Boot application
- Docker containers
- Cleans up log files
./stop.sh # Graceful stop
./stop.sh --force # Force stop all processesThe application includes sample data for Tbilisi, Georgia:
- 8 Factories: Various industries (wine, steel, textile, automotive, pharmaceutical)
- 6 Major Roads: Including Rustaveli Ave, Agmashenebeli Ave, Vazha-Pshavela Ave
- 4 Forest Areas: Mtatsminda Park, Vake Park, Turtle Lake, Lisi Lake
Archil Odishelidze - Head of IT at DevSpace
Contact: achi@devspace.ge