GeoTerrain Analyzer is a commercial-grade, fully offline desktop GIS application built for land surveyors, geographers, and civil engineers. It provides a robust suite of tools to create and manage land boundary coordinate vertices, construct valid GIS polygons, perform accurate surface area and perimeter calculations, import/export spatial datasets, and generate professional PDF analysis reports.
- Project Management: Group survey boundaries into projects. Supports search, sort-by-recency, autosave triggers, and cascading deletions.
- Coordinate Vertex Control: Enter, edit, and reorder GPS coordinates. Features a complete local transactional Undo/Redo stack.
- GIS Validation Engine: Real-time validation checks for coordinate ranges, point density, self-intersection (bowtie boundaries), and closed-ring geometry.
- Calculation Engine:
- Calculates boundary surface area in Square Meters, Square Kilometers, Hectares, and Acres.
- Measures boundary perimeter in Meters and Kilometers.
- Locates the geometric Centroid (lat/lon) and Bounding Box limits.
- Projection Engine: Projects decimal degree coordinates (EPSG:4326 Datum) to local UTM space (Universal Transverse Mercator) to ensure Euclidean calculation accuracy.
- Data Exchange Engine: Import and export GIS data via:
- GeoJSON Polygons
- CSV Coordinate Lists
- JSON GeoTerrain Project Archive
- PDF Report Generator: Generates professional, multi-page print-ready PDF reports with SVG boundary visualizations, centroid metrics, and coordinate tables.
- Visual Controls: Dark, Light, and System themes; grid overlay; vertex labels; and north indicator target.
- Shell Runtime: Electron
- Frontend: React (18), TailwindCSS, TypeScript
- Database: SQLite (via
better-sqlite3) - GIS Utilities: Turf.js (geospatial operations), Proj4 (coordinate projections)
- Report Utility: jsPDF (PDF document generation)
- Build System: Vite (Renderer), tsc (Main process)
The application adopts clean architecture principles, separating the system into a backend service layer and a reactive user interface:
graph TD
subgraph Electron Main Process
DB[(SQLite DB)] --> Repo[Repositories]
Repo --> Serv[Service Layer]
Serv --> Engine[Projection / Measurement Engine]
Serv --> Handlers[IPC Handlers]
end
subgraph Preload Bridge
Handlers <--> Bridge[Context Bridge]
end
subgraph React Renderer
Bridge <--> Hook[Custom Hooks / Context Providers]
Hook <--> UI[React Components]
end
electron/— Electron Main Processdatabase/— Connection health-check and SQL migrations schemaipc/— Strongly-typed IPC main handlersrepositories/— SQLite database access layer (Projects, Coordinates, Results, Settings)services/— Business logic (Geometry validation, Projection scaling, Measurements)utils/— Engines (Import, Export, Projection, Measurement, PDF Reporting)
src/— React Renderer Processcomponents/— Modals, settings dialog, map canvases, tables, and buttonscontext/— State providers for projects, coordinates, measurements, theme settings, and import/export operationshooks/— Custom React hooks wrapping the application contextstyles/— Global styling and custom Tailwind tokens
- Node.js (v18 or higher recommended)
- NPM (comes packaged with Node.js)
- Clone the repository:
git clone https://github.com/deoxyforge/GeoTerrain.git cd GeoTerrain - Install dependencies:
npm install
- If SQLite native binaries fail to load on your platform, rebuild them for Electron:
npm run rebuild:sqlite
To start the Vite dev server and launch the Electron application in development mode:
npm run devThe linter and TypeScript compiler check can be run using:
npm run lint
npm run build:electronTo build, compile, and package the production binaries:
npm run buildThis will compile the renderer and main process scripts and invoke electron-builder to generate target distributions in the release/ directory:
GeoTerrain Analyzer Setup 1.0.0.exe: Standard Windows installer (NSIS)GeoTerrain Analyzer 1.0.0.exe: Standalone portable Windows executable
- Create Project: Click the
+button in the sidebar and assign a name and description to your project. - Add Coordinates: Click the
+ Add Coordinatebutton in the toolbar. Enter your vertex locations in Decimal Degrees (WGS84). At least 3 points are required. - Analyze Boundary: Once you have entered 3 or more points and the real-time validator displays
✓ Valid Boundary Polygon, clickAnalyze Polygonto calculate centroid, perimeter, bounding limits, and areas. - Generate PDF: Click
Generate Reportto preview and print a PDF format survey document. - Import/Export: Use the dropdown menus to load coordinates from CSV or export project boundaries to GeoJSON.
- Coordinate System Upgrades: Support Degrees Minutes Seconds (DMS) and Degrees Decimal Minutes (DDM) input with auto-detection.
- Map Controls: Centroid centering, boundary bounds fitting, and interactive vertex drag-and-drop.
- Productivity Tools: Excel/Spreadsheet copy-paste coordinates buffer parsing, bulk coordinates csv import.
- Layout Enhancements: Collapsible and resizable sidebars, custom layout state persistence, and full-screen focus modes.
This project is licensed under the MIT License. See the LICENSE file for details.