Skip to content
HansvBugPublic

About

A lightweight (GIS) viewer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BUG Viewer

Bridging Unified Geodata / Beheer Uniforme Gegevens – a lightweight (GIS) viewer built with Free Pascal / Lazarus.

Overview

BUG Viewer is a desktop application for viewing and interacting with geospatial data. It supports WMS background layers (e.g. OpenStreetMap) and GeoJSON vector layers. The application is built using the MVP (Model‑View‑Presenter) pattern with an observer‑based communication system.

The MVP framework, observer pattern implementation, and various utility units originate from the mvp-setup project by Benny Christensen a.k.a. cdbc. The map engine, GeoJSON/WMS support, and all application‑specific logic are original work by the author of this project.

This is an early version (0.1.0.0) and serves as a foundation for further development.

Features

  • Map rendering with pan, zoom, and viewport management.
  • WMS support – load tiled background maps from a URL template (e.g. https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png).
  • GeoJSON import – load vector data from .geojson or .json files.
  • Layer management – reorder, delete, toggle visibility, and change styles of layers.
  • Attribute grid – view feature attributes in a table.
  • Hit testing – click on the map to select features.
  • Project save/load – store and restore the map state (layers, styles, visibility) as JSON.
  • Spatial indexing – quadtree for fast viewport queries.
  • Asynchronous loading – GeoJSON files are parsed in a background thread; WMS tiles are downloaded asynchronously with disk and memory caching.

Requirements

  • Free Pascal Compiler (FPC) 3.2.2 or later.
  • Lazarus IDE (for building the GUI).
  • BGRABitmap package – for high‑quality rendering.
  • OpenSSL – required for HTTPS connections (WMS tiles).
  • fphttpclient (comes with FPC) and opensslsockets.

Building

  1. Clone the repository.
  2. Open the Lazarus project file (e.g. bugviewer.lpi or similar) in Lazarus.
  3. Ensure the required packages (BGRABitmap, etc.) are installed via the Lazarus Package Manager.
  4. Place main_text.en in the project folder. (This is a necessary file).
  5. Compile and run.

Note: The project is only Windows/Linux compatible.

Usage

  • Load a GeoJSON file: File → Open or Layer → Add Layer.
  • Add a WMS background: Layer → Add WMS.
  • Interact with the map:
    • Drag to pan.
    • Use the mouse wheel to zoom.
    • Click a feature to select it and see its attributes.
  • Manage layers: Use the layer list panel to toggle visibility, reorder, delete, or change styles.
  • Save/Load project: File → Save Project / Load Project to store the current map state.

Credits

This project builds upon the mvp-setup framework created by Benny Christensen a.k.a. cdbc. His work provides the MVP boiler‑plate, the observer pattern implementation, transaction management, string list interfaces, and other foundational units. Without his generous contributions, this project would not have been possible.

License

This project is composed of two parts with separate licenses:

1. Application code (by Hans van Buggenum)
All application‑specific code, including the map engine, GeoJSON and WMS support, the view components, and all other logic not part of the MVP framework, is licensed under the MIT License.

This means you are free to use, modify, and distribute the application code, including for commercial purposes, as long as the copyright notice and the MIT license text are included.

2. MVP‑framework (by Benny Christensen a.k.a. cdbc)
The files belonging to the MVP framework (including but not limited to obs.prosu.pas, cdbc.istrlist.pas, model.base.pas, model.decl.pas, presenter.trax.pas, and related units) are licensed under the BSD 3‑Clause License. The copyright notice and license text are included in the header of each respective file. The copyright of Benny Christensen a.k.a. cdbc must be retained.

For the MVP‑framework files, the terms of the BSD 3‑Clause License remain in effect.


Copyright © 2026 Hans van Buggenum (application code)
Copyright © 2023–2026 Benny Christensen a.k.a. cdbc (MVP‑framework)
Licensed under MIT (application code) and BSD 3‑Clause (MVP‑framework).

About

A lightweight (GIS) viewer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages