Bug 331467 - Complete KmlPhotoOverlayWriter
Summary: Complete KmlPhotoOverlayWriter
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.7 (KDE 4.12)
Platform: unspecified Linux
: NOR task
Target Milestone: ---
Assignee: Cruceru Calin-Cristian
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-02-24 18:50 UTC by Dennis Nienhüser
Modified: 2014-03-01 21:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2014-02-24 18:50:36 UTC
Extend KmlPhotoOverlayWriter.cpp to also write the following elements (and their children):
- rotation
- ViewVolume
- ImagePyramid
- shape

See https://developers.google.com/kml/documentation/kmlreference#photooverlay for the correct syntax. All tags and their children can be written in KmlPhotoOverlayWriter::writeMid(). There's no need to add new TagWriter classes because these elements are unique to PhotoOverlay.

Make sure to compile Marble with the following cmake options enabled: BUILD_MARBLE_TESTS=TRUE, BUILD_MARBLE_TOOLS=TRUE. To test your implementation, move the inline KML file defined in TestPhotoOverlay::simpleParseTest() to a new file tests/data/PhotoOverlayInFolder.kml. Add this file to TestGeoDataWriter. Execute tests/TestGeoDataWriter from the build folder to execute the unit test and make sure it finishes successfully. Use the tool kml2kml in the build folder to find errors in your implementation if the test fails. Once everything works, remove TestPhotoOverlay.

Add another .kml file PhotoOverlayAsRoot.kml where the PhotoOverlay tag is a direct child of the kml tag (not inside a folder). Add it to TestGeoDataWriter as well and make sure the test works as well.

Submit a review request at https://git.reviewboard.kde.org with the marble groups as reviewers.

Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
Comment 1 Cruceru Calin-Cristian 2014-02-25 00:54:11 UTC
Hi Dennis,

I tried to make a patch for this. I posted it on the reviewboard: https://git.reviewboard.kde.org/r/116036/ .

Sorry if I did wrong something which may seem easy, but I couldn't sleep until I made it ( or so I think ) and it got pretty late.
Also I mentioned on the reviewboard that I did not all those tests, but I will do them tomorrow.
Comment 2 Dennis Nienhüser 2014-03-01 21:36:33 UTC
Git commit 137f5d45661cb9524805a0fc336a74924afc812d by Dennis Nienhüser, on behalf of Cruceru Calin-Cristian.
Committed on 01/03/2014 at 20:53.
Pushed by nienhueser into branch 'master'.

Write more children elements of PhotoOverlay

REVIEW: 116059

M  +56   -1    src/lib/marble/geodata/writers/kml/KmlPhotoOverlayWriter.cpp
M  +0    -1    tests/CMakeLists.txt
M  +8    -0    tests/TestGeoDataWriter.cpp
D  +0    -94   tests/TestPhotoOverlay.cpp
A  +23   -0    tests/data/PhotoOverlayAsRoot.kml
A  +25   -0    tests/data/PhotoOverlayInFolder.kml

http://commits.kde.org/marble/137f5d45661cb9524805a0fc336a74924afc812d