https://github.com/mo42/libabel
Label geographic regions by finding largest empty rectangles inside general polygons
https://github.com/mo42/libabel
cartography computational-geometry computational-geometry-algorithms geometry label labelling map-label
Last synced: about 2 months ago
JSON representation
Label geographic regions by finding largest empty rectangles inside general polygons
- Host: GitHub
- URL: https://github.com/mo42/libabel
- Owner: mo42
- License: mit
- Created: 2016-12-10T10:54:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-05-02T08:51:36.000Z (about 2 months ago)
- Last Synced: 2025-05-07T01:52:52.535Z (about 2 months ago)
- Topics: cartography, computational-geometry, computational-geometry-algorithms, geometry, label, labelling, map-label
- Language: C++
- Homepage:
- Size: 545 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Approximate Largest Empty Rectangles in Polygons
`libabel` is a library for approximating the largest empty rectangle inside
general polygons with holes. In practice, you can label geographic areas with
this.That's why it's called `libabel` so you can link to it using `-label`.
# Build
```sh
git clone https://github.com/mo42/libabel.git && cd libabel/src
make
````libabel.a` provides you the following functions:
```c
rot_square approx_max_axis_aligned(inner_outer& io, int scale);rot_square approx_max_rotated(inner_outer& io, double scale);
```where `io` is a tuple of inner polygons (the holes) and outer polygons (the
areas to be labelled). The parameter `scale` determines the aspect ratio of the
rectangle you wish to find (e.g., 3 mean the rectangle's width is 3 times
longer than its height).# Examples

# License
We distribute libabel under the MIT License.