KOSMIndoorMap in kdereview

Rolf Eike Beer kde at opensource.sf-tec.de
Thu Oct 22 20:14:43 BST 2020


Am Donnerstag, 22. Oktober 2020, 17:25:32 CEST schrieb Volker Krause:
> Hi,
> 
> KOSMIndoorMap is a QML component for showing multi-floor OSM indoor maps (as
> its very creative name might suggest). It's using maps.kde.org as a data
> source (same as Marble), and has been created to show interactive maps of
> train stations for KDE Itinerary.
> 
> https://invent.kde.org/libraries/kosmindoormap
> 
> KOSMIndoorMap has been growing inside the KPublicTransport repo (due to some
> building blocks being available there alreay and me being lazy), and has
> now been split into its own repo. So technically this is coming out of a
> reviewed repo already rather than from playground, but better be on the
> safe side :)
> 
> The aim is having this (together with KPublicTransport and KDE Itinerary)
> join the release service for 20.12.

The const version of DataSet::way() returns Way*, but the non-const version 
returns OSM::Way*. I guess the extra qualification is not needed.

In OSM2go I use std::unordered_map to store the different types of objects 
which makes lookups much easier. YMMV depending if you want to optimize for 
lookup or memory size.

My recent work there is to get rid of the note, way, and relation prefixes or 
suffixes on function names and make a template from the remaining 
implementation so I don't have to implement the same things 3 times.

I have derived all 3 object types from a common base class, which allows me to 
simplify things like Element::url() by just calling obj->url() and let a 
virtual overload do the rest. Which is a good example: the final return in 
that function should be replaced by Q_UNREACHABLE(), too.

The nodes vectors in Element::outerPath() could benefit from a call to 
reserve().

The coding style for the remark-if in XmlParser::parse() is inconsistent. Or, 
if compared to the rest of the file, it's the only consistent one in that 
function.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20201022/cd5cc2cd/attachment.sig>


More information about the kde-core-devel mailing list