State of the GeoDataState of the GeoData
T GridelT Gridel
06-07.11.2010 | Marble Sprint06-07.11.2010 | Marble Sprint
T Gridel edu.kde.org/marble/ 2
Agenda
● Design Goals
● Tour of the Classes
● Serialisation
● Model/View
● Uses
● Todo
T Gridel edu.kde.org/marble/ 3
GeoData Classes
● Modelled after KML spec
http://code.google.com/intl/de/apis/kml/documenta...
T Gridel edu.kde.org/marble/ 4
Class Hierarchy
T Gridel edu.kde.org/marble/ 5
Features
● Common Properties
● Name
● Description
● Visibility
● Style...
● Placemarks add:...
T Gridel edu.kde.org/marble/ 6
Geometries
● Live through a Placemark
● Rendered with GeometryLayer
● Recursive parsing of ...
T Gridel edu.kde.org/marble/ 7
Styles
● Limited equivalent of Qt styling
● Needs marble extensions?
T Gridel edu.kde.org/marble/ 8
Serialisation
● GeoDataParser API
GeoDataParser parser( GeoData_UNKNOWN );
QFile file( file...
T Gridel edu.kde.org/marble/ 9
Model/View
● GeoDataTreeModel
● Encapsulates a GeoDataDocument
● Provides the Tree model fo...
T Gridel edu.kde.org/marble/ 10
Uses (I): FileManager
● Write parsing code
● Serialise into a GeoDataDocument
● Append to ...
T Gridel edu.kde.org/marble/ 11
Uses (II): PositionProvider
● Write Position Providers
● Enable Position Tracking
● Store ...
T Gridel edu.kde.org/marble/ 12
Uses (III): Routing
● Write Routing query backend
● Store result in a GeoDataDocument
● Wr...
T Gridel edu.kde.org/marble/ 13
Todo
● Use for Vector maps (Pnt files) and clean
VectorMap and GeoPolygon
● Full Potential...
T Gridel edu.kde.org/marble/ 14
Thanks!
techbase.kde.org/Projects/Marble/GeoData
Upcoming SlideShare
Loading in …5
×

State of the Geodata

499 views
459 views

Published on

Presentation made at Marble Sprint 2010

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
499
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

State of the Geodata

  1. 1. State of the GeoDataState of the GeoData T GridelT Gridel 06-07.11.2010 | Marble Sprint06-07.11.2010 | Marble Sprint
  2. 2. T Gridel edu.kde.org/marble/ 2 Agenda ● Design Goals ● Tour of the Classes ● Serialisation ● Model/View ● Uses ● Todo
  3. 3. T Gridel edu.kde.org/marble/ 3 GeoData Classes ● Modelled after KML spec http://code.google.com/intl/de/apis/kml/documentation/kmlreference.html ● Copy-on-write features (shared data) ● Data in Private D-Pointer ● Copy Ctor copies Private D-Pointer ● Setters trigger a deep copy of the Private ● Tree features ● Document – Folder ● Feature First topic – Current topic – Third Topic
  4. 4. T Gridel edu.kde.org/marble/ 4 Class Hierarchy
  5. 5. T Gridel edu.kde.org/marble/ 5 Features ● Common Properties ● Name ● Description ● Visibility ● Style... ● Placemarks add: ● Geometry ● Coordinates ● Containers add: ● List of Features
  6. 6. T Gridel edu.kde.org/marble/ 6 Geometries ● Live through a Placemark ● Rendered with GeometryLayer ● Recursive parsing of GeoDatadocument ● Rendering with GeoPainter
  7. 7. T Gridel edu.kde.org/marble/ 7 Styles ● Limited equivalent of Qt styling ● Needs marble extensions?
  8. 8. T Gridel edu.kde.org/marble/ 8 Serialisation ● GeoDataParser API GeoDataParser parser( GeoData_UNKNOWN ); QFile file( filename ); file.open( QIODevice::ReadOnly ); GeoDocument* document = parser.releaseDocument(); ● GeoDataParser Internals ● GeoTagHandler and GeoStackItem GeoTagHandler::QualifiedName qName( name().toString(), namespaceUri().toString() ); GeoStackItem stackItem( qName, 0 ); if ( const GeoTagHandler* handler = GeoTagHandler::recognizes( qName )) { stackItem.assignNode( handler->parse( *this )); }
  9. 9. T Gridel edu.kde.org/marble/ 9 Model/View ● GeoDataTreeModel ● Encapsulates a GeoDataDocument ● Provides the Tree model for interested views ● Proxies for filtered Lists (todo) ● Limited use outside generic views – Model/View is signals/slots for update notification – View inherits widget, we need Layers or custom observers (PlacemarkLayout...) – Model::data() and ModelIndex suffer leaking interface syndrome
  10. 10. T Gridel edu.kde.org/marble/ 10 Uses (I): FileManager ● Write parsing code ● Serialise into a GeoDataDocument ● Append to list of files ● Show in a List ● Enjoy ;)
  11. 11. T Gridel edu.kde.org/marble/ 11 Uses (II): PositionProvider ● Write Position Providers ● Enable Position Tracking ● Store positions in a geometry ● Display with GeometryLayer ● Enjoy ;)
  12. 12. T Gridel edu.kde.org/marble/ 12 Uses (III): Routing ● Write Routing query backend ● Store result in a GeoDataDocument ● Wrap into Routing Layer ● Enjoy ;)
  13. 13. T Gridel edu.kde.org/marble/ 13 Todo ● Use for Vector maps (Pnt files) and clean VectorMap and GeoPolygon ● Full Potential of GeoPainter ● Use a ProxyModel to clean the PlacemarkModel ● Cure the Model diarrhea ● UI for files/placemarks/visibility ● Improve GeometryLayer performance ● 2D culling filter ● Federate file loading (route restore/casual file) ● Use GeoData in your pet Use Case
  14. 14. T Gridel edu.kde.org/marble/ 14 Thanks! techbase.kde.org/Projects/Marble/GeoData

×