Submitted:
30 July 2024
Posted:
31 July 2024
You are already at the latest version
Abstract

Keywords:
1. Introduction
2. Development and Design Philosophy
- GDAL (Geospatial Data Abstraction Library): Used for handling raster data, including loading, processing, and exporting various raster formats.
- PyQt5: A set of Python bindings for Qt libraries, used to create the graphical user interface.
- Shapely: A library for geometric operations, used for handling and analyzing spatial data.
- numpy: A library for numerical operations, used for processing raster data.
- pyproj: A library for cartographic projections and coordinate transformations.
- cryptography: A library for encryption and decryption, used for managing license keys.
- zipfile: A standard library module for handling ZIP files, used for extracting raster data.
- tempfile: A standard library module for creating temporary files and directories.
3. Key Features and Functionalities
3.1. Loading Raster Data
- File Selection: Users select a raster file from their filesystem using a file dialog.
- Data Extraction: If the selected file is a zip archive, the application extracts its contents to a temporary directory.
- Raster Processing: GDAL is used to open the raster file, read its data, and obtain metadata such as geotransform and projection information.
- Display: The raster data is rendered on the map canvas, with the application handling coordinate transformations and scaling as needed.
3.2. Hillshade Visualization
- Parameter Input: Users input values for azimuth, altitude, and vertical exaggeration through the control panel.
- Temporary Storage: The loaded raster data is saved to a temporary file in GeoTIFF format.
- Hillshade Calculation: GDAL’s DEMProcessing function is used to create a hillshade image based on the specified parameters.
- Normalization: The resulting hillshade data is normalized to an 8-bit grayscale image for display.
- Rendering: The hillshade image is rendered on the map canvas, replacing any previous visualization.
3.3. Measurement Tools
- Tool Activation: Users activate the measurement tool from the toolbar.
- Point Selection: Users click on the map to add measurement points. For distance measurements, consecutive points define line segments. For area measurements, consecutive points define polygon vertices.
- Calculation: The application calculates distances and areas based on the selected points. For distance measurements, the Euclidean distance between points is computed. For area measurements, the area of the defined polygon is calculated.
- Display: The results are displayed in the measurement dialog, showing distances in meters and feet, and areas in square meters and hectares.
3.4. Digitizing Points
- Tool Activation: Users activate the digitizing tool from the toolbar.
- Point Addition: Users click on the map to add points. Each point is represented by a red marker and labeled with a unique identifier.
- Coordinate Transformation: The pixel coordinates of each point are transformed to planar coordinates using the raster’s geotransform, and then to WGS84 coordinates using a transformer object.
- Display: The points and their labels are displayed on the map canvas. Information about each point, including planar and WGS84 coordinates, is shown in the digitize dialog.
- Export: Users can export the digitized points to text files or KML for further analysis or sharing.
3.5. Exporting Images and Georeferenced Data
- Image Export: Users can save the current map view as a PNG file, preserving the visual details and annotations.
- Screenshoots: Users can save the the map extent to an image with a scale bar and north arrow – image ready for publication.
- Google Earth Export: Users can export the map view to KML format, allowing the data to be viewed and explored in Google Earth with accurate georeferencing.
4. User Interface and Experience
4.1. Control Panel
- Load Raster Button: Opens a file dialog for selecting raster files.
- Export Image Button: Opens a save dialog for exporting the current map view as a PNG image.
- Azimuth Input: Allows users to set the azimuth angle for hillshade visualization.
- Altitude Input: Allows users to set the altitude angle for hillshade visualization.
- Vertical Exaggeration Input: Allows users to set the vertical exaggeration for hillshade visualization.
4.2. Map Canvas
4.3. Toolbar
- Measurement Tool Icon: Activates the measurement tool.
- Digitizing Tool Icon: Activates the digitizing tool.
- Full Extent Button: Resets the view to the full extent of the raster data.
5. Applications and Few Use Cases
5.1. Archaeology
5.2. Environmental Science
5.3. Urban Planning
5.4. Forestry
5.5. Engineering
5.6. Topography
6. Technical Implementation
6.1. Data Handling
- Loading Rasters: GDAL’s Open function is used to read raster files, regardless of their format. This function extracts metadata, geotransform, and projection information necessary for rendering the raster data.
- Hillshade Generation: GDAL’s DEMProcessing function is used to generate hillshade images from Digital Elevation Models (DEMs). This function takes parameters such as azimuth, altitude, and vertical exaggeration to create realistic shadow effects that highlight terrain features.
- Coordinate Transformation: The Transformer class from the PyProj library is used to convert coordinates between different spatial reference systems. This is essential for ensuring that digitized points and measurements are accurately represented in both planar and geographic coordinate systems.
6.2. User Interface Design
- Main Window: The main window of the application is a QMainWindow that houses the map canvas, control panel, and toolbar. The layout is managed using QVBoxLayout and QHBoxLayout to ensure a clean and organized presentation.
- Map Canvas: The map canvas is implemented using QGraphicsView and QGraphicsScene. This setup allows for efficient rendering of raster data and interactive elements such as measurement lines and digitized points. The ZoomPanGraphicsView subclass enhances the base QGraphicsView with custom zoom and pan functionality.
- Control Panel: The control panel on the right side of the main window uses a combination of QLabel, QLineEdit, QPushButton, and QFormLayout to provide a user-friendly interface for inputting parameters and executing actions.
- Dialogs: Custom dialogs such as the DigitizeDialog and MeasurementDialog are used to provide additional functionality and display results. These dialogs are designed to stay on top of the main window, ensuring that they are always accessible to the user.
6.3. Performance Optimization
- Lazy Loading: Raster data is loaded and processed on demand, minimizing the initial load time and memory usage. This approach ensures that the application remains responsive, even when handling large datasets.
- Efficient Rendering: The use of QGraphicsView and QGraphicsScene allows for efficient rendering of large images and interactive elements. These classes leverage hardware acceleration and optimized painting routines to deliver high performance.
- Asynchronous Processing: Time-consuming tasks such as raster loading and hillshade generation are performed in separate threads using QThread. This ensures that the main user interface remains responsive while background tasks are executed.
8. Conclusion
Table of Contents
- Installation
- Main Interface Overview
- Step-by-Step Guide
- Loading Raster Data
- Viewing and Adjusting Hillshade
- Exporting Images
- Using the Measurement Tool
- Using the Digitizing Tool
- Navigating the Map
- Additional Features
- Credits
Installation
- 1. Download the Installer:
- o Obtain the GeoQuickView installer from the official website or the provided download link.
- 2. Run the Installer:
- o Right-click on the installer file and select Run as administrator.
- o Follow the on-screen instructions to complete the installation.
- 3. Launch GeoQuickView:
- o After installation, locate the GeoQuickView icon on your desktop or in the Start menu. Double click on the icon and the application should start.
- o If by any chance you did not run the installer with administration permision right-click the icon and select Run as administrator to ensure the application has the necessary permissions to strat. You should now add the license key.
Main Interface Overview
1. Loading Raster Data
- Load Raster Button:
- o Click this button to open a file dialog.
- o Select your raster file (e.g., .tif, .tiff, .ecw, .zip).
- o GeoQuickView supports LiDAR-derived DTMs and other raster formats.
- o Once loaded, the progress bar will show the loading status.
2. Viewing and Adjusting Hillshade
- Azimuth Input:
- o Enter a value between 0-360 degrees to set the direction of the light source.
- o Default is 315 degrees.
- Altitude Input:
- o Enter a value between 0-90 degrees to set the angle of the light source.
- o Default is 45 degrees.
- Vertical Exaggeration Input:
- o Enter a value to set the vertical exaggeration for the hillshade.
- o Default is 3 meters.
- Update Hillshade:
- o Changes to the above inputs will automatically update the hillshade display.
3. Exporting Images
- Export Image Button:
- o Click this button to open a save dialog.
- o Choose where to save the current map view as a PNG image.
4. Using the Measurement Tool
- Measurement Tool Icon:
- o Click this icon in the toolbar to activate the measurement tool.
- o When activated, click on the map to start measuring distances.
- o Click multiple points to measure cumulative distances or draw a polygon for area measurement.
- Measurement Dialog:
- o Shows the results of your measurements in meters, feet, square meters, and hectares.
- o Measure Distance Button: Click to start a new distance measurement.
- o Measure Area Button: Click to start a new area measurement.
- o Clear Measurement Button: Clears current measurements.
- o Close Measurement Tool Button: Deactivates the measurement tool.
5. Using the Digitizing Tool
- Digitizing Tool Icon:
- o Click this icon in the toolbar to activate the digitizing tool.
- o When activated, click on the map to add digitized points.
- Digitize Dialog:
- o Create New Points Button: Clears current points and starts a new digitizing session.
- o Pause Digitization Button: Temporarily stops adding new points.
- o Resume Digitization Button: Resumes adding new points.
- o Delete Points Button: Deletes all digitized points.
- o Export to Text Button: Saves digitized points to a text file.
- o Export to KML Button: Saves digitized points to a KML file for Google Earth.
- o Export to Shapefile Button: Saves digitized points to a shapefile for GIS software.
- o Close Digitize Tool Button: Deactivates the digitizing tool.
Additional Features
- Progress Bar: Displays the loading status of raster files.
- Scale Bar: Automatically updates to show the scale of the map in meters or kilometers.
Credits






References
- Open Source Geospatial Foundation. (2024). GDAL: Geospatial Data Abstraction Library. Retrieved from https://gdal.org/.
- PyQt Documentation. (2024). PyQt5 Reference Guide. Retrieved from https://www.riverbankcomputing.com/static/Docs/PyQt5/.
- Shapely Documentation. (2024). Shapely: Geospatial Geometric Operations. Retrieved from https://shapely.readthedocs.io/en/stable/.
- numpy Documentation. (2024). NumPy Reference. Retrieved from https://numpy.org/doc/stable/.
- pyproj Documentation. (2024). pyproj: Python interface to PROJ. Retrieved from https://pyproj4.github.io/pyproj/stable/.
- cryptography Documentation. (2024). Cryptography: Python Library for Encryption and Decryption. Retrieved from https://cryptography.io/en/latest/.
- Python Standard Library Documentation. (2024). zipfile — Work with ZIP archives. Retrieved from https://docs.python.org/3/library/zipfile.html.
- Python Standard Library Documentation. (2024). tempfile — Generate temporary files and directories. Retrieved from https://docs.python.org/3/library/tempfile.html.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).