[Marble-devel] Review Request 114438: Added support for reading and writing gx:altitudeMode KML tags

Dennis Nienhüser earthwings at gentoo.org
Sat Dec 14 11:27:51 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114438/#review45672
-----------------------------------------------------------


Thanks, looks good.


src/lib/marble/geodata/handlers/kml/KmlGxAltitudeModeTagHandler.h
<http://git.reviewboard.kde.org/r/114438/#comment32631>

    We try to avoid this long header nowadays and use a shorter one. Can you please change it to the style used by MarbleWidget.h?



src/lib/marble/geodata/handlers/kml/KmlGxAltitudeModeTagHandler.cpp
<http://git.reviewboard.kde.org/r/114438/#comment32632>

    Can you insert another "else if" case that checks for a correctly set clampToGround value, and in case neither of the expected values is set, the else part complains to the shell? I.e. 
    
    ...
    else if( content == QString( "clampToGround" ) ) {
      mode = ClampToGround;
    } else {
      mDebug() << "Unknown altitude mode " << content << ", falling back to 'clampToGround'";
      mode = ClampToGround;
    }
    


- Dennis Nienhüser


On Dec. 13, 2013, 8:39 p.m., Sanjiban Bairagya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114438/
> -----------------------------------------------------------
> 
> (Updated Dec. 13, 2013, 8:39 p.m.)
> 
> 
> Review request for Marble.
> 
> 
> Bugs: 320009
>     http://bugs.kde.org/show_bug.cgi?id=320009
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> - Extended the AltitudeMode enum in src/lib/MarbleGlobal.h by the two additional values
> - Added a KmlGxAltitudeModeTagHandler that behaves like the existing KmlAltitudeModeTagHandler, but listens to the gx: namespace and parses the two additional values also
> - Added a writeAltitudeMode(...) function in KmlGroundOverlayWriter which can both write <altitudeMode> and <gx:altitudeMode> and have it switch between both based on the enum value to write
> - Changed KmlCameraTagWriter.cpp, KmlGroundOverlayWriter.cpp, KmlLatLonAltBoxWriter.cpp and KmlModelTagWriter.cpp to use the new writeAltitudeMode(...) function instead of writing altitudeMode manually
> - Add a test .kml file to tests/data/ which has various combinations of altitudeMode inside and outside the gx namespace with various values.
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/MarbleGlobal.h b130c0c 
>   src/lib/marble/geodata/CMakeLists.txt 1918472 
>   src/lib/marble/geodata/handlers/kml/KmlGxAltitudeModeTagHandler.h PRE-CREATION 
>   src/lib/marble/geodata/handlers/kml/KmlGxAltitudeModeTagHandler.cpp PRE-CREATION 
>   src/lib/marble/geodata/writers/kml/KmlCameraTagWriter.cpp a91f2cc 
>   src/lib/marble/geodata/writers/kml/KmlGroundOverlayWriter.h ebcf44e 
>   src/lib/marble/geodata/writers/kml/KmlGroundOverlayWriter.cpp 3fa0c0e 
>   src/lib/marble/geodata/writers/kml/KmlLatLonAltBoxWriter.cpp c955c91 
>   src/lib/marble/geodata/writers/kml/KmlModelTagWriter.cpp 14186f9 
>   tests/TestGeoDataWriter.cpp be2e5f4 
>   tests/data/AltitudeMode.kml PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/114438/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sanjiban Bairagya
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20131214/7a12457f/attachment-0001.html>


More information about the Marble-devel mailing list