Marble.GeoDataPlacemark

KDE 4.2 PyKDE API Reference for Marble

- KDE's Python API

# GeoDataPlacemark Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDataFeature → Marble.GeoDataObject → Marble.GeoNode
Namespace: Marble

## Detailed Description

a class representing a point of interest on the map

This class represents a point of interest, e.g. a city or a mountain. It is filled with data by the KML or GPX loader and the PlacemarkModel makes use of it.

This is more or less only a GeoDataFeature with a geographic position and a country code attached to it. The country code is not provided in a KML file.

## Methods
| __init__ (self, Marble.GeoDataObject parent=0)
| __init__ (self, QString name, Marble.GeoDataObject parent=0)
| __init__ (self, Marble.GeoDataPlacemark a0)
float | area (self)
Marble.GeoDataCoordinates | coordinate (self)
| coordinate (self, float longitude, float latitude, float altitude)
QString | countryCode (self)
EnumFeatureId | featureId (self)
Marble.GeoDataGeometry | geometry (self)
bool | isPlacemark (self)
| pack (self, QDataStream stream)
long | population (self)
| setArea (self, float area)
| setCoordinate (self, float longitude, float latitude, float altitude=0)
| setCoordinate (self, Marble.GeoDataPoint point)
| setCountryCode (self, QString code)
| setGeometry (self, Marble.GeoDataPoint entry)
| setGeometry (self, Marble.GeoDataLineString entry)
| setGeometry (self, Marble.GeoDataLinearRing entry)
| setGeometry (self, Marble.GeoDataMultiGeometry entry)
| setGeometry (self, Marble.GeoDataPolygon entry)
| setPopulation (self, long population)
| unpack (self, QDataStream stream)

## Method Documentation

__init__ | ( | self, |
|  | Marble.GeoDataObject | parent=0
| ) |  |  |

Create a new placemark.

__init__ | ( | self, |
|  | QString | name,
|  | Marble.GeoDataObject | parent=0
| ) |  |  |

Create a new placemark with the given name.

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

float area | ( |  | self ) |

Return the area size of the feature in square km.

FIXME: Once we make Marble more area-aware we need to move this into the GeoDataArea class which will get inherited from GeoDataPlaceMark (or GeoDataFeature).

Marble.GeoDataCoordinates coordinate | ( |  | self ) |

Return the coordinate of the placemark as a GeoDataPoint

coordinate | ( | self, |
|  | float | longitude,
|  | float | latitude,
|  | float | altitude
| ) |  |  |

Return the coordinate of the placemark as longitude and latitude.

QString countryCode | ( |  | self ) |

Return the country code of the placemark.

EnumFeatureId featureId | ( |  | self ) |

Marble.GeoDataGeometry geometry | ( |  | self ) |

Return a pointer to the current Geometry object

bool isPlacemark | ( |  | self ) |

pack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

long population | ( |  | self ) |

Return the population of the placemark.

setArea | ( | self, |
|  | float | area
| ) |  |  |

Set the area size of the feature in square km.

setCoordinate | ( | self, |
|  | float | longitude,
|  | float | latitude,
|  | float | altitude=0
| ) |  |  |

Set the coordinate of the placemark in longitude and latitude.

setCoordinate | ( | self, |
|  | Marble.GeoDataPoint | point
| ) |  |  |

Set the coordinate of the placemark with an GeoDataPoint.

setCountryCode | ( | self, |
|  | QString | code
| ) |  |  |

Set the country code of the placemark.

setGeometry | ( | self, |
|  | Marble.GeoDataPoint | entry
| ) |  |  |

Set any kind of GeoDataGeometry like GeoDataPoint , GeoDataLineString , GeoDataLinearRing , GeoDataMultiGeometry

setGeometry | ( | self, |
|  | Marble.GeoDataLineString | entry
| ) |  |  |

setGeometry | ( | self, |
|  | Marble.GeoDataLinearRing | entry
| ) |  |  |

setGeometry | ( | self, |
|  | Marble.GeoDataMultiGeometry | entry
| ) |  |  |

setGeometry | ( | self, |
|  | Marble.GeoDataPolygon | entry
| ) |  |  |

setPopulation | ( | self, |
|  | long | population
| ) |  |  |

Sets the population of the placemark.

Parameters:

  |  | population the new population value

unpack | ( | self, |
|  | QDataStream | stream
| ) |  |  |