KDE 4.3 PyKDE API Reference

- KDE's Python API

# AbstractProjection Class Reference

`from PyKDE4.marble import *`

Namespace: Marble

## Detailed Description

Abstract class:
  This class can be used as a base class for new classes, but can not be instantiated directly.

A base class for all projections in Marble.

## Enumerations

PreservationType | { NoPreservation, Conformal, EqualArea }
SurfaceType | { Cylindrical, Pseudocylindrical, Hybrid, Conical, Pseudoconical, Azimuthal }

## Methods

| __init__ (self)
| __init__ (self, Marble.AbstractProjection a0)
bool | exceedsLatitudeRange (self, Marble.GeoDataCoordinates coords)
bool | exceedsLatitudeRange (self, Marble.GeoDataLineString lineString)
bool | geoCoordinates (self, int x, int y, Marble.ViewportParams viewport, float lon, float lat, Marble.GeoDataCoordinates.Unit unit=Marble.GeoDataCoordinates.Degree)
| horizonToPolygon (self, Marble.ViewportParams viewport, Marble.GeoDataCoordinates disappearCoords, Marble.GeoDataCoordinates reappearCoords, QPolygonF a0)
bool | isOrientedNormal (self)
Marble.GeoDataLatLonAltBox | latLonAltBox (self, QRect screenRect, Marble.ViewportParams viewport)
bool | lineStringToPolygon (self, Marble.GeoDataLineString lineString, Marble.ViewportParams viewport, QVector<QPolygonF polygons)
bool | mapCoversViewport (self, Marble.ViewportParams viewport)
QRegion | mapRegion (self, Marble.ViewportParams viewport)
QPainterPath | mapShape (self, Marble.ViewportParams viewport)
float | maxLat (self)
float | maxValidLat (self)
float | minLat (self)
float | minValidLat (self)
Marble.AbstractProjection.PreservationType | preservationType (self)
bool | repeatX (self)
bool | repeatableX (self)
bool | screenCoordinates (self, float lon, float lat, Marble.ViewportParams viewport, float x, float y)
bool | screenCoordinates (self, Marble.GeoDataCoordinates geopoint, Marble.ViewportParams viewport, float x, float y, bool globeHidesPoint)
bool | screenCoordinates (self, Marble.GeoDataCoordinates geopoint, Marble.ViewportParams viewport, float x, float y)
bool | screenCoordinates (self, Marble.GeoDataCoordinates coordinates, Marble.ViewportParams viewport, float x, float y, int pointRepeatNum, bool globeHidesPoint)
bool | screenCoordinates (self, Marble.GeoDataCoordinates coordinates, Marble.ViewportParams viewport, float x, float y, int pointRepeatNum, QSizeF size, bool globeHidesPoint)
bool | screenCoordinates (self, Marble.GeoDataLineString lineString, Marble.ViewportParams viewport, QVector<QPolygonF polygons)
bool | screenCoordinates (self, float lon, float lat, Marble.ViewportParams viewport, int x, int y)
bool | screenCoordinates (self, Marble.GeoDataCoordinates geopoint, Marble.ViewportParams viewport, int x, int y, bool globeHidesPoint)
| setMaxLat (self, float maxLat)
| setMinLat (self, float minLat)
| setRepeatX (self, bool repeatX)
Marble.AbstractProjection.SurfaceType | surfaceType (self)
| tessellateLineSegment (self, Marble.GeoDataCoordinates aCoords, float ax, float ay, Marble.GeoDataCoordinates bCoords, float bx, float by, QPolygonF polygon, Marble.ViewportParams viewport, Marble.TessellationFlags f=0)
bool | traversableDateLine (self)
bool | traversablePoles (self)

## Method Documentation

__init__ | ( |  | self ) |

Construct a new AbstractProjection.

__init__ | ( | self, |
|  | Marble.AbstractProjection | a0
| ) |  |  |

bool exceedsLatitudeRange | ( | self, |
|  | Marble.GeoDataCoordinates | coords
| ) |  |  |

bool exceedsLatitudeRange | ( | self, |
|  | Marble.GeoDataLineString | lineString
| ) |  |  |

bool geoCoordinates | ( | self, |
|  | int | x,
|  | int | y,
|  | Marble.ViewportParams | viewport,
|  | float | lon,
|  | float | lat,
|  | Marble.GeoDataCoordinates.Unit | unit=Marble.GeoDataCoordinates.Degree
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Get the earth coordinates corresponding to a pixel in the map.

Parameters:

  | x | the x coordinate of the pixel
  | y | the y coordinate of the pixel
  | viewport | the viewport parameters
  | lon | the longitude angle is returned through this parameter
  | lat | the latitude angle is returned through this parameter
  | unit | the unit of the angles for lon and lat.

Returns:
  true if the pixel (x, y) is within the globe

false if the pixel (x, y) is outside the globe, i.e. in space.

horizonToPolygon | ( | self, |
|  | Marble.ViewportParams | viewport,
|  | Marble.GeoDataCoordinates | disappearCoords,
|  | Marble.GeoDataCoordinates | reappearCoords,
|  | QPolygonF | a0
| ) |  |  |

bool isOrientedNormal | ( |  | self ) |

Marble.GeoDataLatLonAltBox latLonAltBox | ( | self, |
|  | QRect | screenRect,
|  | Marble.ViewportParams | viewport
| ) |  |  |

bool lineStringToPolygon | ( | self, |
|  | Marble.GeoDataLineString | lineString,
|  | Marble.ViewportParams | viewport,
|  | QVector<QPolygonF | polygons
| ) |  |  |

bool mapCoversViewport | ( | self, |
|  | Marble.ViewportParams | viewport
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

QRegion mapRegion | ( | self, |
|  | Marble.ViewportParams | viewport
| ) |  |  |

QPainterPath mapShape | ( | self, |
|  | Marble.ViewportParams | viewport
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

float maxLat | ( |  | self ) |

float maxValidLat | ( |  | self ) |

float minLat | ( |  | self ) |

float minValidLat | ( |  | self ) |

Marble.AbstractProjection.PreservationType preservationType | ( |  | self ) |

bool repeatX | ( |  | self ) |

bool repeatableX | ( |  | self ) |

bool screenCoordinates | ( | self, |
|  | float | lon,
|  | float | lat,
|  | Marble.ViewportParams | viewport,
|  | float | x,
|  | float | y
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Get the screen coordinates corresponding to geographical coordinates in the map.

Parameters:

  | lon | the lon coordinate of the requested pixel position in radians
  | lat | the lat coordinate of the requested pixel position in radians
  | viewport | the viewport parameters
  | x | the x coordinate of the pixel is returned through this parameter
  | y | the y coordinate of the pixel is returned through this parameter

Returns:
  true if the geographical coordinates are visible on the screen

false if the geographical coordinates are not visible on the screen

See also:
  ViewportParams

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataCoordinates | geopoint,
|  | Marble.ViewportParams | viewport,
|  | float | x,
|  | float | y,
|  | bool | globeHidesPoint
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Get the screen coordinates corresponding to geographical coordinates in the map.

Parameters:

  | geopoint | the point on earth, including altitude, that we want the coordinates for.
  | viewport | the viewport parameters
  | x | the x coordinate of the pixel is returned through this parameter
  | y | the y coordinate of the pixel is returned through this parameter
  | globeHidesPoint | whether the point gets hidden on the far side of the earth

Returns:
  true if the geographical coordinates are visible on the screen

false if the geographical coordinates are not visible on the screen

See also:
  ViewportParams

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataCoordinates | geopoint,
|  | Marble.ViewportParams | viewport,
|  | float | x,
|  | float | y
| ) |  |  |

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataCoordinates | coordinates,
|  | Marble.ViewportParams | viewport,
|  | float | x,
|  | float | y,
|  | int | pointRepeatNum,
|  | bool | globeHidesPoint
| ) |  |  |

Get the coordinates of screen points for geographical coordinates in the map.

Parameters:

  | coordinates | the point on earth, including altitude, that we want the coordinates for.
  | viewport | the viewport parameters
  | x | the x coordinates of the pixels are returned through this parameter
  | y | the y coordinate of the pixel is returned through this parameter
  | pointRepeatNum | the amount of times that a single geographical point gets represented on the map
  | globeHidesPoint | whether the point gets hidden on the far side of the earth

Returns:
  true if the geographical coordinates are visible on the screen

false if the geographical coordinates are not visible on the screen

See also:
  ViewportParams

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataCoordinates | coordinates,
|  | Marble.ViewportParams | viewport,
|  | float | x,
|  | float | y,
|  | int | pointRepeatNum,
|  | QSizeF | size,
|  | bool | globeHidesPoint
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataLineString | lineString,
|  | Marble.ViewportParams | viewport,
|  | QVector<QPolygonF | polygons
| ) |  |  |

bool screenCoordinates | ( | self, |
|  | float | lon,
|  | float | lat,
|  | Marble.ViewportParams | viewport,
|  | int | x,
|  | int | y
| ) |  |  |

bool screenCoordinates | ( | self, |
|  | Marble.GeoDataCoordinates | geopoint,
|  | Marble.ViewportParams | viewport,
|  | int | x,
|  | int | y,
|  | bool | globeHidesPoint
| ) |  |  |

setMaxLat | ( | self, |
|  | float | maxLat
| ) |  |  |

setMinLat | ( | self, |
|  | float | minLat
| ) |  |  |

setRepeatX | ( | self, |
|  | bool | repeatX
| ) |  |  |

Marble.AbstractProjection.SurfaceType surfaceType | ( |  | self ) |

Abstract method:
  This method is abstract and can be overridden but not called directly.

tessellateLineSegment | ( | self, |
|  | Marble.GeoDataCoordinates | aCoords,
|  | float | ax,
|  | float | ay,
|  | Marble.GeoDataCoordinates | bCoords,
|  | float | bx,
|  | float | by,
|  | QPolygonF | polygon,
|  | Marble.ViewportParams | viewport,
|  | Marble.TessellationFlags | f=0
| ) |  |  |

bool traversableDateLine | ( |  | self ) |

bool traversablePoles | ( |  | self ) |

## Enumeration Documentation

PreservationType

Enumerator:

  NoPreservation |
  Conformal |
  EqualArea |

SurfaceType

Enumerator:

  Cylindrical |
  Pseudocylindrical |
  Hybrid |
  Conical |
  Pseudoconical |
  Azimuthal |