Skip to content

Comparing the performance of two Grid to TIN conversion algorithms

Notifications You must be signed in to change notification settings

ermel272/grid-to-tin-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid to TIN Conversion

This project implements two known Raster (grid) to Triangle Irregular Network (TIN) conversion algorithms. The goal of the project is to compare the speed and error performance of both algorithms. The results of the experimentation can be seen here. The project was written with Python 2.7.

Installation

In the project root directory, run the following command:

python -m pip install -r requirements.txt

Running the code

The project contains an interactive script for testing out and visualizing the conversion algorithms. From the project root directory, run

python -i main.py

then you can demo the conversion by calling

convert(sidelength=30, algorithm='fjallstrom', error=0.3)
  • The sidelength parameter controls the sidelength of the randomly generated raster image.
  • The algorithm parameter controls the algorithm used to perform the conversion. Acceptable inputs are 'fjallstrom' and 'lee'.
  • The error parameter controls the maximum error for interpolation on the generated TIN. As this value approaches zero, the runtime of the conversion approaches infinity.

Examples

Here is an example of a 30 x 30 Raster Image converted at 40% Maximum Error using the Fjallstrom Algorithm:

original converted

About

Comparing the performance of two Grid to TIN conversion algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages