[Digikam-devel] [Bug 153070] search for image by geo location

tackat at kde.org tackat at kde.org
Wed Jun 4 21:48:32 BST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=153070         




------- Additional Comments From tackat kde org  2008-06-04 22:48 -------
Nice start, but the code in question doesn't work as advertized and can't get committed to SVN like this and needs some improvement before it gets applied:

1.) Most obvious problem is that the method

void MarbleWidget::setSelection(const QRect& region)

completely ignores the current projection when defining the "corners" of the
bounding box. The suggested method works fine for the example Iceland. But if you select a larger area closer to the poles in globe projection you might realize that the suggested way to create a latLonBoundingBox doesn't work.

The correct solution would make use of 

virtual GeoDataLatLonAltBox AbstractProjection::latLonAltBox( const QRect& screenRect, const ViewportParams *viewport );

Please have a look at the implementation of 

GeoDataLatLonAltBox ViewportParams::viewLatLonAltBox() const

as an example. The viewLatLonAltBox returns a GeoDataLatLonBox for the current view.

This is an important issue that needs to get fixed before this patch can be committed to SVN.

2.) I'm not sure whether it's a good solution to make a Rubberband the property of a MarbleWidgetInputHandler. Shouldn't this be a property of the view?
I also have concerns about the performance of the painting of the rubberband. Does it work well for you? IIRC due to technical/conceptual limits Marble needs to repaint the whole screen at least for some backends even if there's just a dirtyRect changed ( e.g. due to the calculation of labels not overlapping which needs to take into account the whole screen ) .

3.) I'm not sure whether the introduction of a boolean for the selectionMode is a good solution. I guess in the future we'll have many different "input modes" and I wonder whether having a boolean for each of them would be a proper solution.

I like the screenshot :-)

Torsten



More information about the Digikam-devel mailing list