KDE 4.3 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

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)
 __init__ (self, Marble.GeoDataPlacemark placemark)
 __init__ (self, Marble.GeoDataFeature feature)
 __init__ (self, QString name)
float area (self)
Marble.GeoDataCoordinates coordinate (self)
 coordinate (self, float longitude, float latitude, float altitude)
QString countryCode (self)
Marble.GeoDataGeometry geometry (self)
bool isPlacemark (self)
bool operator == (self, Marble.GeoDataPlacemark other)
 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 )

Create a new placemark.

__init__ (  self,
Marble.GeoDataPlacemark  placemark
)

Create a new placemark from existing placemark placemark

__init__ (  self,
Marble.GeoDataFeature  feature
)

Create a new placemark from existing feature feature

__init__ (  self,
QString  name
)

Create a new placemark with the given name.

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 GeoDataCoordinates

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.

Marble.GeoDataGeometry geometry (   self )

Return a pointer to the current Geometry object

bool isPlacemark (   self )
bool operator == (  self,
Marble.GeoDataPlacemark  other
)

comparison operator is implemented slightly different than one would expect. Only Placemarks that are copies of each other are assumed to be equal.

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
)
  • Full Index

Modules

  • marble
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal