-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 07, 2026 at 07:10 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `webgis`
--

-- --------------------------------------------------------

--
-- Table structure for table `jalan`
--

CREATE TABLE `jalan` (
  `id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL COMMENT 'Nama ruas jalan',
  `status` varchar(100) NOT NULL COMMENT 'Status jalan (e.g. Nasional, Provinsi, Kabupaten, Desa)',
  `panjang` double NOT NULL DEFAULT 0 COMMENT 'Panjang jalan dalam meter',
  `geojson` longtext NOT NULL COMMENT 'Geometri jalan dalam format GeoJSON',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Data segmen jalan (polyline) dalam format GeoJSON';

--
-- Dumping data for table `jalan`
--

INSERT INTO `jalan` (`id`, `nama`, `status`, `panjang`, `geojson`, `created_at`) VALUES
(1, 'Jalan Sepakat 2', 'Kabupaten', 1784.791473379715, '{\"type\":\"Feature\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[109.35178399086,-0.0583629161931721],[109.35063600540163,-0.05999276433692213],[109.34970259666444,-0.06140815873824388],[109.3490481376648,-0.062394645723090975],[109.34783577919008,-0.06381004006026729],[109.34582948684694,-0.06598674491163233],[109.3437159061432,-0.06820159083180335],[109.34262156486513,-0.06938108597800444],[109.34150576591493,-0.07064203975056207],[109.34150576591493,-0.07064203975056207],[109.34150576591493,-0.07064203975056207]]},\"properties\":{}}', '2026-06-07 16:09:11');

-- --------------------------------------------------------

--
-- Table structure for table `parsil_tanah`
--

CREATE TABLE `parsil_tanah` (
  `id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL COMMENT 'Nama parsil / bidang tanah',
  `status` varchar(50) NOT NULL COMMENT 'Status hak (SHM | HGB | HGU | HP)',
  `luas` double NOT NULL DEFAULT 0 COMMENT 'Luas area dalam meter persegi',
  `geojson` longtext NOT NULL COMMENT 'Geometri parsil dalam format GeoJSON',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Data parsil tanah (polygon) dalam format GeoJSON';

--
-- Dumping data for table `parsil_tanah`
--

INSERT INTO `parsil_tanah` (`id`, `nama`, `status`, `luas`, `geojson`, `created_at`) VALUES
(1, 'Pengadilan Tinggi Negeri', 'HGB', 1312.2666173966293, '{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[109.35532987117769,-0.06302106891085976],[109.35539424419404,-0.06308540501714478],[109.35543715953828,-0.06303715293742466],[109.35552835464479,-0.06313365709682675],[109.35549080371857,-0.06317654783426951],[109.35555517673494,-0.06327841333559274],[109.35537278652193,-0.06346069896896436],[109.35512065887453,-0.06321407722949855],[109.3551367521286,-0.06319263186079624],[109.3551367521286,-0.06319263186079624],[109.35532987117769,-0.06302106891085976]]]},\"properties\":{}}', '2026-06-07 16:02:58'),
(2, 'Hutan Sylva UNTAN', 'HP', 31066.903716160716, '{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[109.34868872165681,-0.05657792397283722],[109.34927880764009,-0.05576299985790386],[109.3494075536728,-0.055827335972649154],[109.34962749481203,-0.055784445229494106],[109.35099005699159,-0.0574571841892975],[109.35042142868042,-0.05825066290960069],[109.34964895248415,-0.05740893210459027],[109.34938609600069,-0.057092612881665034],[109.34924125671388,-0.05700147005438797],[109.34868872165681,-0.05657792397283722]]]},\"properties\":{}}', '2026-06-07 17:07:13');

-- --------------------------------------------------------

--
-- Table structure for table `polygons`
--

CREATE TABLE `polygons` (
  `id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL COMMENT 'Nama polygon',
  `coordinates` longtext NOT NULL COMMENT 'Koordinat polygon (JSON string)',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Layer polygon generik (koordinat sebagai teks JSON)';

-- --------------------------------------------------------

--
-- Table structure for table `polylines`
--

CREATE TABLE `polylines` (
  `id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL COMMENT 'Nama polyline',
  `coordinates` longtext NOT NULL COMMENT 'Koordinat polyline (JSON string)',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Layer polyline generik (koordinat sebagai teks JSON)';

-- --------------------------------------------------------

--
-- Table structure for table `spbu`
--

CREATE TABLE `spbu` (
  `id` int(11) NOT NULL,
  `nama` varchar(255) NOT NULL COMMENT 'Nama SPBU',
  `nomor` varchar(100) NOT NULL COMMENT 'Nomor WhatsApp / kontak',
  `kategori` varchar(50) NOT NULL COMMENT '24_jam | tidak_24_jam',
  `latitude` decimal(10,8) DEFAULT NULL COMMENT 'Koordinat lintang',
  `longitude` decimal(11,8) DEFAULT NULL COMMENT 'Koordinat bujur',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Data titik lokasi SPBU';

--
-- Dumping data for table `spbu`
--

INSERT INTO `spbu` (`id`, `nama`, `nomor`, `kategori`, `latitude`, `longitude`, `created_at`) VALUES
(1, 'SPBU Parit Husein', '0824245345', 'tidak', -0.06431884, 109.35623646, '2026-06-07 16:02:20'),
(2, 'SPBU Kota Baru', '085154545', '24_jam', -0.04773790, 109.31863725, '2026-06-07 17:10:26');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `jalan`
--
ALTER TABLE `jalan`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_jalan_status` (`status`),
  ADD KEY `idx_jalan_created_at` (`created_at`);

--
-- Indexes for table `parsil_tanah`
--
ALTER TABLE `parsil_tanah`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_parsil_status` (`status`),
  ADD KEY `idx_parsil_created_at` (`created_at`);

--
-- Indexes for table `polygons`
--
ALTER TABLE `polygons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_polygons_created_at` (`created_at`);

--
-- Indexes for table `polylines`
--
ALTER TABLE `polylines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_polylines_created_at` (`created_at`);

--
-- Indexes for table `spbu`
--
ALTER TABLE `spbu`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_spbu_kategori` (`kategori`),
  ADD KEY `idx_spbu_created_at` (`created_at`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `jalan`
--
ALTER TABLE `jalan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `parsil_tanah`
--
ALTER TABLE `parsil_tanah`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `polygons`
--
ALTER TABLE `polygons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `polylines`
--
ALTER TABLE `polylines`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `spbu`
--
ALTER TABLE `spbu`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
