de353833423863172c404a2d7427bda1bd5ad262
WebGIS SIG Project (Geographic Information System)
This repository contains WebGIS applications built for university assignments / learning sessions (Pertemuan 1 to 4).
🚀 Setup & Installation
Follow these steps to set up and run the applications on your local machine.
1. Database Setup (MySQL)
We have provided a database dump file (database.sql) containing the schema and the pre-configured markers for Pertemuan 1.
Method A: Importing via MySQL Workbench (Recommended)
- Open MySQL Workbench and connect to your local MySQL server.
- In the top menu, go to Server -> Data Import.
- Choose Import from Self-Contained File.
- Click the
...button and select the database.sql file located inpertemuan 1_stable/webgis_gasstation/database.sql. - Under Default Schema to be Imported To, you can leave it blank or click New... to create a database named
spbu_gis. - Click the Start Import button at the bottom right.
- Once finished, refresh your schemas list to see the
spbu_gisdatabase and itslocationstable populated with the markers.
Method B: Importing via Command Line
If you prefer the command line, run the following command (enter your MySQL root password when prompted):
mysql -u root -p < "pertemuan 1_stable/webgis_gasstation/database.sql"
2. Configure Environment Variables
Before starting the server, you need to configure your database credentials:
- Navigate to the project folder (e.g.,
pertemuan 1_stable/webgis_gasstation). - Duplicate the
.env.examplefile and rename it to.env. - Open
.envand fill in your local MySQL password and connection details:DB_HOST=localhost DB_PORT=3306 DB_USER=root # Your MySQL username DB_PASSWORD=your_password # Your MySQL password DB_NAME=spbu_gis # Database name PORT=3000 # App server port
(Note: The .env file is excluded from git commits using .gitignore to keep your local password secure.)
3. Run the Application
Once your database is running and credentials are set:
- Open your terminal and navigate to the project directory:
cd "pertemuan 1_stable/webgis_gasstation" - Install the required Node.js dependencies:
npm install - Start the server:
node server.js - Open your web browser and navigate to: http://localhost:3000
📁 Repository Structure
- pertemuan 1_stable: WebGIS Gas Station (includes Leaflet.js client, Express.js backend, and the MySQL database seed file
database.sql). - pertemuan 2_stable: Intermediate mapping configurations.
- pertemuan 3 (cloropleth & layer)_stable: Chloropleth map with regional boundary layers (JSON layers for Kecamatan boundary and polygon mapping).
- pertemuan 4: Advanced map and backend service setup.
Description
Languages
HTML
57.8%
JavaScript
36.8%
CSS
5.4%