GSoC – Progress after the first two weeks

Hi again! In this post I will make a short presentation of my progress in my Google Summer of Code project.

So, after two weeks from the official and much awaited coding period start I am glad to say that I have entirely respected the previously designed timeline, even though this start has occurred simultaneously with the beginning of my exam period.

Even before the official start, I proceeded with resurrecting the annotate plugin with focus on adapting the Ground Overlays editing mode implemented during the previous GSoC edition (and which has not been branched to master). It came straight forward to me to do this, since I had already talked to the guy who worked on it last year, so I was pretty knowledgeable about the implementation (here is his blog). However, there were a couple of adjustments to be made (some unavoidable segmentation faults as well as few unpleasant UI aspects), but finally it reached its desired shape.

Ground Overlay SS 1
Ground Overlay SS 2

Next, my mentors and me decided that the work on the User Interface for the Ground Overlays/Polygons editing mode should be postponed until we find a way of keeping it as a plugin but also offer a friendly user interaction.

The first thing I implemented (and which is directly related to my project) is the polygon moving feature, which added more dynamism. Next, I started working on per-node properties and node interaction in general, since only adding and moving were available until then. I added the possibility of selecting (marking as selected) nodes as well as deleting nodes.


Having available these two options on each node seemed pretty good so far, but we also need options on the entire polygon and this is what I continued working on. The following options are available so far when right-clicking a polygon: Deselect All Nodes which provides a faster way of deselecting the nodes than clicking on each of them, Delete All Selected Nodes which streamlines the restructuring of an already drawn polygon and Remove Polygon.


The last feature I implemented is the possibility of drawing holes within an already drawn polygon, or, in other words, adding inner boundaries to a polygon. This was the most time consuming feature since the existing implementation did not take at all into consideration a polygon’s inner boundaries. However, I managed after a couple of days to have it fully working. These images will show it better:


In the last screenshot you can see that I also handled the situation in which after the deletion of a node from the polygon’s outer boundary, the polygon would not be valid anymore, since one of its inner boundaries would cross its outer boundary, so a warning will pop-up.

To sum up, these have been two great weeks of coding, although I could not work on the project as much as I wanted due to my end of semester exams. However, I only have two more exams and afterwards I will be much more active. I hope that this post put some light into what I am actually doing for my GSoC project and I am very excited of what is following.

Călin Cruceru

5 thoughts on “GSoC – Progress after the first two weeks

  1. Michael says:

    Hey, fantastic! This is great, thank you 🙂

    A thought came to mind when I saw the last screenshot. The dialog says “Cannot delete the selected nodes.” If I were to see that in my use of Marble, then I wouldn’t understand why I was being denied the ability to delete my selected nodes. I would have to figure it out on my own, or find this blog post.

    I think it would add clarity to include this snippet in the dialog message from your post: “… The deletion of a node from the polygon’s outer boundary would not make the the polygon valid anymore, since one of its inner boundaries would cross its outer boundary. Move some nodes and then try again.”

  2. Richard says:

    Thanks, this is interesting stuff!

    Would it with this code also be possible to select and highlight blocks/streets/etc. from an Openstreetmap?

    Also I don’t understand the error in the last picture. From a geometrical point of view, the resulting area would still be a valid polygon (shaped like an “U”). So why not allow this action?

    • Firstly, thank you for your interest!

      Secondly, regarding your first question, yes, it will be possible to do that.

      As far as the error from the last picture is concerned, here is a picture showing what would happen after removing that node (I couldn’t reproduce that same polygon, but you get the idea): Ignore that selected node, imagine that one was deleted.

      I think that you expected the inner boundary to automatically adjust to the new shape of the outer boundary. Indeed, this would be nice and possibly a feature I will work on in the future.

      • richard says:

        No, I don’t expect anything to happen here – to me these two polygons are perfectly fine. But even if not: I can still just move the nodes around to change them to my liking.

        – Whis is unless you implement error messages and Auto-“Correct” features, these can really disrupt the user experience. Especially (like in this case) when it is not clear at all, why it is an error and has to be corrected.

        So if there isn’t really a good reason program-wise these polygons aren’t allowed, just let them be! 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s