Jump to content

Marble/Placemark: Difference between revisions

From KDE Community Wiki
Tgridel (talk | contribs)
No edit summary
Ochurlaud (talk | contribs)
m 7 revisions imported
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Overview of Placemarks in Marble ==
= Overview of Placemarks in Marble =


The {{class|PlaceMarkManager|kdeedu|4.2}} is handled by the {{class|MarbleModel|kdeedu|4.2}} and provides registration of KML data files for Marble (it should handle all data files in the future).
The {{class|GeoDataPlacemark|kdeedu|4.x}} is the class representing a placemark in Marble, with GeoData classes following kml specification. There are basically 2 kinds of Placemarks: Point Placemarks, and Placemarks containing a Geometry class inheriting {{class|GeoDataGeometry|kdeedu|4.x}}.


It uses a {{class|PlaceMarkLoader|kdeedu|4.2}} to perform the file reading thanks to a {{class|GeoDataParser|kdeedu|4.2}}.
== Registration and use in MarbleModel ==
The {{class|MarbleModel|kdeedu|4.x}} provides registration of Placemarks within a {{class|GeoDataTreeModel|kdeedu|4.x}}. The tree model stores multiple {{class|GeoDataDocument|kdeedu|4.x}} corresponding to the data they hold.


The PlaceMarkManager keeps some information related to the files and data that it read. It provides
It is used currently by 3 frameworks:


* a list of file names
=== File Management ===
* a {{class|FileViewModel|kdeedu|4.2}} which presents the list of files
 
* a {{class|MarblePlacemarkModel|kdeedu|4.2}} which presents the list of all placemarks of all files
The {{class|FileManager|kdeedu|4.x}} performs file reading and then signals that files have been added/removed. It registers its document in the tree model.
* a {{class|MarbleGeometryModel|kdeedu|4.2}} which represents the list of all files' in-memory representation as {{class|GeoDataDocument|kdeedu|4.2}}.
The role of the FileManager is:
 
* Centralise file parsing while relying on the {{class|MarbleRunnerManager|kdeedu|4.x}} to support various file formats thanks to Parsing plugins.
 
* use threading support with FileLoader loading the file asynchronously (should be deprecated since the runner manager handles this already).
 
* provide the results of those parsing to MarbleModel so that Marble can have easy access to the data.
 
=== Placemark Search runners ===
 
The {{class|MarbleRunnerManager|kdeedu|4.x}} is a framework to query external servers for placemarks thanks to Placemark search plugins. The user types the query in the search line of the ControlBox widget, and then the MarbleRunnerManager provides the resulting Placemarks in the tree model.
 
=== Position Provider ===
 
The {{class|PositionProvider|kdeedu|4.x}} class has a document to display the current position, as well as the track stored of past positions. That document belongs in the tree model.
 
 
== Display in the map ==
 
The Point placemarks are displayed thanks to the {{class|PlacemarkLayout|kdeedu|4.x}} which does layouting of the labels, and filtering of the important placemarks to render, based on a popularity ranking.
 
The Geometry placemarks are displayed thanks to the {{class|GeometryLayer|kdeedu|4.x}} which contains a {{class|GeoGraphicsScene|kdeedu|4.x}}.

Latest revision as of 08:05, 21 October 2016

Overview of Placemarks in Marble

The GeoDataPlacemark is the class representing a placemark in Marble, with GeoData classes following kml specification. There are basically 2 kinds of Placemarks: Point Placemarks, and Placemarks containing a Geometry class inheriting GeoDataGeometry.

Registration and use in MarbleModel

The MarbleModel provides registration of Placemarks within a GeoDataTreeModel. The tree model stores multiple GeoDataDocument corresponding to the data they hold.

It is used currently by 3 frameworks:

File Management

The FileManager performs file reading and then signals that files have been added/removed. It registers its document in the tree model. The role of the FileManager is:

  • Centralise file parsing while relying on the MarbleRunnerManager to support various file formats thanks to Parsing plugins.
  • use threading support with FileLoader loading the file asynchronously (should be deprecated since the runner manager handles this already).
  • provide the results of those parsing to MarbleModel so that Marble can have easy access to the data.

Placemark Search runners

The MarbleRunnerManager is a framework to query external servers for placemarks thanks to Placemark search plugins. The user types the query in the search line of the ControlBox widget, and then the MarbleRunnerManager provides the resulting Placemarks in the tree model.

Position Provider

The PositionProvider class has a document to display the current position, as well as the track stored of past positions. That document belongs in the tree model.


Display in the map

The Point placemarks are displayed thanks to the PlacemarkLayout which does layouting of the labels, and filtering of the important placemarks to render, based on a popularity ranking.

The Geometry placemarks are displayed thanks to the GeometryLayer which contains a GeoGraphicsScene.