[Marble-devel] Review Request 111499: GroundOverlay Rendering

Konrad Enzensberger e.konrad at mpegcode.com
Wed Jul 24 12:23:02 UTC 2013


Hi Adrian,

another issue.
If the image file referenced by ground overlay kml file is not present,
we are ending up in a high time consuming loop in MergedLayerDecorator::Priivate::renderGroundOverlays(...)

I made this modification:
case GeoSceneTiled::Mercator:
    latTop = gd( ( radius - tileId.y() ) / radius * M_PI ) * RAD2DEG; 
    latBot = gd( ( radius - tileId.y() - 1 ) / radius * M_PI ) * RAD2DEG; 
break;
}

/*enz - collect valid overlays in temp list */
QList<const GeoDataGroundOverlay *> groundOverlays;
for ( int i = m_groundOverlays.size() - 1; i >= 0; --i ) {
    const GeoDataGroundOverlay* overlay = m_groundOverlays.at( i );

    if(overlay!=NULL)
    {
        /*if the image file is not present, this values became 0
        const int overlayHeight = overlay->icon().height();
        const int overlayWidth = overlay->icon().width();

        if(overlayHeight != 0 || overlayWidth != 0)
        {
            groundOverlays.append(overlay);    
        }
    }
}

if(groundOverlays.size()<1)return;

/****for the following loop use temp groundOverlays list ******************/

br, konrad

  ----- Original Message ----- 
  From: Adrian Draghici 
  To: Thibaut Gridel ; Torsten Rahn ; Bernhard Beschow ; Dennis Nienhüser 
  Cc: Marble 
  Sent: Tuesday, July 23, 2013 11:41 AM
  Subject: Re: [Marble-devel] Review Request 111499: GroundOverlay Rendering


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

        Review request for Marble, Bernhard Beschow, Dennis Nienhüser, Torsten Rahn, and Thibaut Gridel.
        By Adrian Draghici.
        Updated July 23, 2013, 9:41 a.m.

        Changes
Prevents rendering of GroundOverlays on post-colorized map themes in TextureLayer rather than MergedLayerDecorator. Adds a MacLaurin approximation for the Gudermannian function to be used for rendering in Mercator Projection. 

        Description 
This patch adds support for rendering GroundOverlays. A model with filtered GroundOverlays is saved in MarbleModel and used in TextureLayer, where the cache of GroundOverlays is handled. The actual rendering takes place in MergedLayerDecorator. 

        Testing 
Tested with multiple overlapping overlays, different rotation angles. 

        Diffs (updated)
          a.. src/lib/MarbleMap.cpp (102ed0d) 
          b.. src/lib/MarbleMath.h (aeaadea) 
          c.. src/lib/MarbleModel.h (44a5f61) 
          d.. src/lib/MarbleModel.cpp (3c44f9d) 
          e.. src/lib/MergedLayerDecorator.h (2823cfc) 
          f.. src/lib/MergedLayerDecorator.cpp (6363d8e) 
          g.. src/lib/layers/GeometryLayer.cpp (20fd6a7) 
          h.. src/lib/layers/TextureLayer.h (1dbd114) 
          i.. src/lib/layers/TextureLayer.cpp (5b9e9c9) 
        View Diff
       



------------------------------------------------------------------------------


  _______________________________________________
  Marble-devel mailing list
  Marble-devel at kde.org
  https://mail.kde.org/mailman/listinfo/marble-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20130724/b1d367d7/attachment.html>


More information about the Marble-devel mailing list