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
Create a new placemark with the given name.
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).
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.
Return the country code of the placemark.
EnumFeatureId featureId |
( |
|
self ) |
|
Return a pointer to the current Geometry object
bool isPlacemark |
( |
|
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.
Set the coordinate of the placemark with an GeoDataPoint.
setCountryCode |
( |
self, |
|
|
|
QString |
code |
|
) |
|
|
|
Set the country code of the placemark.
Set any kind of GeoDataGeometry like GeoDataPoint ,
GeoDataLineString , GeoDataLinearRing , GeoDataMultiGeometry
setPopulation |
( |
self, |
|
|
|
long |
population |
|
) |
|
|
|
Sets the population of the placemark.
- Parameters:
-
| | population the new population value
|