slsimp

Reads streaming lines, and either removes all segments smaller than a given threshold (-length) or removes all "bumps" (i.e. a chain of two segments) whose area is smaller than a given threshold (-area).

The program assumes that all vertices are either used by one or by two line segments but not more. Handling more than two segments may be implemented when it becomes necessary.

Another annoyance of the program is that the simplification happens using the x and the y coordinate exclusively. This is because I wrote the tool to simplify terrain data. One should add the -xyz [0..2] option for specifying which direction is up. Right now we have a hard-coded -xyz 2.

The simplification method implemented here is very simplistic and does not provide any guarantees (e.g. setting the threshold too high will make self-intersecting polygons very likely). This is essentially just a quick hack that we will (may) improve in the future.

Is meant to be used in piping mode (e.g. -islb -olsb).


Example usage:

slsimp -i ../data/lidar_band10.slb -o ../data/lidar_band10_simp.slb

Removes all "bumps" whose area is smaller than 1 unit.

slsimp -i ../data/lidar_band10.slb -area 0.5 -o ../data/lidar_band10_simp.slb

Removes all "bumps" whose area is smaller than 0.5 units.

slsimp -i ../data/lidar_band10.slb -length 0.7 -o ../data/lidar_band10_simp.slb

Removes all segments whose length is smaller than 0.7 units.

Also try:

slsimp -i ../data/armadillo40.slb -length 0.1 -oslb | sl_viewer.exe -islb
slsimp -i ../data/armadillo40.slb -length 1 -oslb | sl_viewer.exe -islb
slsimp -i ../data/lidar_band10.slb -area 0.5 -oslb | sl_viewer.exe -islb
slsimp -i ../data/lidar_band10.slb -area 1 -oslb | sl_viewer.exe -islb
slsimp -i ../data/lidar_band10.slb -area 2 -oslb | sl_viewer.exe -islb
slsimp -i ../data/gilmer_e500_n4310.slb -area 1 -oslb | slclean -islb -length 10 -oslb | sl_viewer.exe -islb
slsimp -i ../data/gilmer_e500_n4310.slb -area 3 -oslb | slclean -islb -length 10 -oslb | sl_viewer.exe -islb
For more info:

slsimp -h
Usage:
slsimp -i in.slb -o out.slb
slsimp -islb -oslb -area 0.8 < in.slb > out.slb
slsimp -islb -osla -length 0.5 < in.slb > out.slb
slsimp -compact -length 2.0 < in.slb > out.slb
The defaults are: -area=1.0 and -length=0.0


if you find bugs let me (isenburg@cs.unc.edu) know.

All information copied directly from http://www.cs.unc.edu/~isenburg/googleearth/tools/slsimp_README.txt

-- ChristianStith - 17 Jun 2008

Revision: r1.1 - 17 Jun 2008 - 15:42 - Main.guest
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback