# Projects/Marble/GeoPainter

< Projects‎ | Marble
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

# Notes about GeoPainter

## Concepts

Horizon is a spherical projection concept to decide if a point is on the viewer's side or the other.

```   It is NOT dependent on viewport visibility
```

Dateline is a repeatX issue, so that a line crossing the dateline does not lead to a tear the whole map wide

Pole is an issue for projections which cannot draw it as a point (or even not at all)

Projection Drawing depends on tessellation Tessellation is a geodetic issue, determining how to connect points. Options:

```       NoTessellation: straight screen coordinates lines between projected points
Tessellate: great circle line between projected points
needs horizon and dateline check
FollowLatitude: special case when latitude is same, walk on the latitude circle
```
```       do we need rhumb line (line of constant compass course)??
```

Need to keep in mind that tessellating must keep polygons that still allow fill.

## Current code

- systematically looks for poles and datelines, splitting the polyline into ones which don't cross idl or pole

- looking for datelines is a recursive calculus to identify latitude at which the idl is crossed

- iterates all points, determines

```       - if horizon is crossed
- if and which tessellation is needed
- adds points to one QVector<QPointF>
```

## Complications

- looking for dateline is not necessary for Spherical, very hard for NoTessellation (screen vs Geo space)

- because of repeatX we calculate all possible points depending on viewport radius, then let painter frame down to visible viewport

This page was last modified on 1 March 2012, at 21:56. This page has been accessed 1,920 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal