Project Progress – End of GSoC

Hello again,

As the title says, this is my last report regarding my project during the Google Summer of Code program. I’m saying during GSoC because this is certainly not my last contribution to the plugin I’ve been working on all summer. In fact not only that I will give my best during the next days to get it to a deployable shape for the next KDE release, but I’m also planning to continue contributing to Marble in the long term. But first, I will make a presentation about the changes the plugin has undergone since my last post.

Because I polished many features and added a couple of other new ones as well, I’ll only discuss a little bit about each of the most important ones. The first new thingies I implemented are the Cut/Copy/Paste actions on graphic items (polygons, placemarks, polylines) which allow an easier duplication, in case one wants to set a style to a placemark and then to use it for others and only change the description, for instance. They also increase consistency since they can be performed on all available graphic items. The second new feature I added is the possibility of drawing and customizing paths (polylines) which used to be a real hole in our Editing Mode in Marble. Now one could easily go to osm.org and export an .osm file and load it in Marble. The actions available on polylines are identical to those for polygons since, obviously, these paths are the same thing as polygons except they are not closed. Last, but maybe one of the most important changes is the introduction of the ‘Focus Item’ concept to our Editing Mode. This means that there is only one item at a time with which the user interacts. This approach is much more intuitive for them and also makes the code easier to understand (so developers benefit from this too). It also allowed to easily adjust (enable and disable) the available actions depending on the Focus Item. My work has also included fixing bugs and making some optimizations especially when interacting with polygons and paths since the data they store can become really huge as the number of nodes increases. I tried to cover in the following screencast all these new features.

I also tried through this screencast to give you a hint about how the Annotate Plugin feels like overall and what you can do so far using its available features. The plugin still needs a lot of effort to be put in until I’ll be completely satisfied with it, but until then, this is most of what I managed to do during this summer, Google’s SUMMER of code.

I can say without doubts that it has been a great summer during which I learnt a lot from some of the best programmers and community people I’ve ever met. I want to thank everyone who made it possible, but especially to: Google who came out with this program, KDE for their friendliness and the passionate people I had the chance to meet, Torsten Rahn and Dennis Nienhüser, my mentors, who were always up to help and guide us and who deeply influenced my way of thinking, my GSoC colleagues, Sanjiban and Abhinav for making me feel more competitive and last, but not least, all Marble developers for contributing to the development of such a great application.

My journey with Marble and KDE has just started.

Călin Cruceru

Randa Meetings 2014 – Impressions

Hi!

Although a couple of days have passed since I returned from Randa, Switzerland, I had in mind long before to make a small blog post about my experience there.

For those who don’t know, the Randa Meetings are yearly events where KDE developers gather together to hack on their projects under the same roof and surrounded by the wonderful Swiss Alps.

Randa-2014

This was my first time at Randa and I can say that it was the greatest week in this summer. I met a bunch of awesome folks who are not only great programmers but also wonderful people to spend the time with. I had a great time coding on Marble alongside my GSoC mentors, Torsten Rahn and Dennis Nienhüser, my GSoC colleague Sanjiban and other KDEdu guys. I also enjoyed talking to developers from other KDE departments which were present at Randa, such as KDE Books, KDE SDK, KDE Frameworks 5 Port, etc.

eu_randa

Other cool things? There were A LOT and I’m sure I will miss something, but I’ll mention some of them: the daily walks which gave us the opportunity to admire the amazing view, the table football, the internet connection (haha, oh, it’s fine, we use git 🙂 ), the food (oh, yeah!), the beer (FreeBeer is one of the greatest beers I have ever drunk) and, of course, the Swiss chocolate.

eu_randa2

randa3

I want to thank very much to Mario Fux who organizes these meetings since 2009 and contributed a lot to my participation since I heard about this year’s meeting after the registrations had closed and he still offered to organize the accommodation for me. So, thanks once again Mario. I’d also want to thank everyone present at Randa this year for this great experience. This was my first participation in a KDE event but not the last one for sure :).

Best Regards,
Călin Cruceru

GSoC Project Progress – Visual Effects and Placemarks

Hello everyone!

I think it’s time to talk again about my progress with my Google Summer of Code project.

But first, since there always are people who read a blog post of mine for the first time, it is important to make a short introduction about the intent of my project. This is also a way of reminding the others about what I’m working on. The application to which I contribute is Marble, a virtual globe and a world atlas. What I’m specifically working on is an Annotate Plugin which deals with controlling and rendering on Earth’s surface a bunch of graphic items. These graphic items are either placemarks, image overlays or polygons. Also, I recently started working on adding polylines, a new graphic element, which will allow the users to draw paths, but this will be the subject of a further blog post, hopefully the next one.

So, what have I been working on since my last blog post? Well, there are two main things: improving user experience for the whole editing mode and adding customization option for placemarks.

The first one, regarding the user experience improvements, includes two new features: node highlighting and a small animation when merging nodes. My mentors and me decided that node highlighting is an important visual effect when editing polygons, since it would give the user a clue about the fact that clicking the nodes actually does something: marks them as selected if left-clicked and opens a RMB (right mouse button) menu if right-clicked. This has been also the purpose of managing cursor shape in certain situations. You can watch these effects in action in the screencast below (Watch in HD – much higher quality).

I will also add some screenshots for those who want a quicker impression of the features (Click on photos for higher resolution!).

Note node highlighting and cursor shape

Note node highlighting and cursor shape

As far as the second visual effect which improves user experience is concerned, the merging nodes animation, it was entirely my idea and what made me think of it was the not very intuitive way nodes merging was being performed before. I thought that we need something which shows explicitly what happens when merging two nodes. You can see this animation in the following screencast:

I think it is pretty nice, what do you think? 🙂

The next major feature I worked on is adding customization options for placemarks. This part of the annotate plugin was totally new to me, since I hadn’t made any changes to placemarks before. As you may recall, the first thing I started my work with on this plugin was adapting an old implementation of ground overlays editing mode and then I continued with polygons editing, but I haven’t dealt with the text annotations implementation. However, my experience with the other two graphic elements and the similarities between them led to a faster development. Watch the video which highlights the placemark customization flow right below.

I will also add some screenshots for those who want a quicker impression of the features:

Note unavailable fields in the dialog

Note unavailable fields in the dialog


blogpost4_v1

As you can see in both the screencast and these two screenshots, the edit dialog for placemarks has a couple of fields which are unavailable at the moment (label scale, ion color/scale). This is because Marble is designed in a way so that the data (such as coordinates, name, description, label/icon scale, etc) is kept apart from the objects which deal with the rendering and these objects don’t have an implementation for the unavailable options I mentioned above. However, they will be implemented soon. Also, I’m planning to implement another way of managing icons in the near future.

I hope you all like the new way to mark and describe particular places as well as the enhanced visual effects. Stay tuned for more new features to come!

Călin Cruceru

Editing Mode for Polygons – GSoC Project Progress

Hello everyone!

There are a couple of weeks from the last time I’ve talked about my progress with my Google Summer of Code project. Thus, the plugin I’m working on has undergone major changes, but most of them are code-related and were intended to increase the internal quality, which will hopefully lead to an increase in the productivity on the plugin. I’ll present these changes briefly, but I won’t insist too much on them since I don’t want this post to become too technical (at least not for now). Also, I’ve added two important new features to the plugin which make it much more interactive. I’ll talk about them more into detail in the next paragraphs.

But first I find important to remind you (and possibly make aware the people who did not read my previous posts) about the intent of my project – what is all about and who can use it. The application to which I contribute is Marble, a virtual globe and a world atlas, which hides under this short introduction many useful and even fun features as well as a dedicated team which works on it. What I’m specifically working on is a plugin, named Annotate Plugin, which allows people to add placemarks and ground overlays onto the map, as well as draw polygons on the Earth’s surface (or even Pluto’s if you have a map for it 🙂 ). Why would you need this? Well, maybe you lead a presentation about human migration and you know that visual effects have a great impact on participants, so you decide to mark particular regions from which many people migrate to other countries. You can even use different colors to give people an insight into their number. Or maybe you are a student and since you love technology, you can make the assessment at that boring subject a little bit more interesting for both you and your teacher.

Hoping that what I’m spending my time on this summer is a little bit clearer, I will proceed with presenting my progress during the last weeks. As I mentioned in the beginning of this post, a great percentage of my work involved re-writing from scratch an important part of the plugin because of its bad design which caused its extending to become very time-consuming. The idea for the code refactoring was that the whole Editing Mode should be organized on states. That is, Add Polygon, Add Polygon Hole, Add Placemark, etc are all independent states which means they could not exist at the same time (or if they could, they should not, since it would cause redundancy). This idea, alongside other improvements, took me almost one week and a half to implement, but now it is fully functional and the code looks much better.

Excepting the code refactoring, I also added two new features which make the editing of a polygon much more interactive and let the users draw any shape. The first one I implemented is Merging Nodes. The flow is as it follows: enter the Merging Nodes state and then start clicking the nodes you want to merge, in pairs of two. Be aware that it is not possible to merge two nodes from two different polygons, or two nodes from two different inner boundaries of the same polygon, or a node from a polygon’s outer boundary with a node from one of its inner boundaries.

nodes1_v1
nodes2_v1

The second feature I implemented is Adding Nodes, which introduces something totally new to the Editing Mode: the possibility of adding new nodes to an already drawn polygon. The flow here is: enter the Adding Nodes state and then you will see when hovering the middle of each polygon’s line that a virtual node will appear and will disappear when moving the cursor from above it. To make it become a real node simply click it and immediately after that you will be adjusting the new node. After clicking it one more time, it will stick to that position and the process can be repeated.

nodes3_v1
nodes4_v1

Since both features are hard to be illustrated in screenshots, I made a screencast which shows it best. You can find it here (it looks much better in full screen mode).

Ok, so this is it. I hope you enjoyed it and made you curious enough to give it a try :).

Later Edit: The patch including these two features has not been merged to master yet (I only submitted a review request this morning) so if you are eager to test it already, you can find the patch here.

See you,
Călin Cruceru

Randa Meetings 2014 – KDE

Hi everyone.

Did you know that for the 5th year, KDE is planning a Developer Sprint which is going to be held in Randa, Switzerland from the 9th to 15th of August this year?

Let me tell you a few words about it if you don’t know what is all about. These sprints are mostly the only times when KDE developers gather under the same roof to work on specific parts of our beloved open-source organization. These sprints are a great opportunity to plan and design new features as well as to hack on them. If you are interested, you can find more about previous sprints here.

A picture from 2010 Randa Meetings

A picture from 2010 Randa Meetings

But things cannot be as accessible as we might want. As you have probably guessed already, KDE needs money in order to make possible these meetings, since it is a non-profit organization which gained its popularity (and raises it day by day) owing to its great contributors and its great users. These contributors donate their time to help improve the software you love, so if you are a dedicated KDE user or if you are simply enthusiastic about free and open-source software you can support the Randa Meetings by making a donation here. Thank you! 🙂

Remember that wonderful ‘bird out of cage’ feeling FOSS gives you.

Călin Cruceru

GSoC – “Properties” option on polygons

Hello everyone!

Even though I have been a little bit less active during the last week due to my end of semester exams, I have managed to implement a new option on drawn polygons – Properties. This makes possible the customization of a polygon by setting any color for both polygon lines and its inner surface, as well as adjusting their opacity and, in the case of lines, its width.

This is how the option and its associated edit dialog are shown:

pict1_v1
pict2_v1

I think its usability is pretty intuitive so I will let these pictures speak for me:

pic4_v1
pict4_v1

Pretty sweet, huh? 🙂
I am waiting suggestions for possible improvements or other completely new features regarding polygon customization.

EDIT:
At the suggestion of richard I added a screenshot from the OSM. It will offer much more accessibility when I will finish implementing the possibility of adding nodes to an already drawn polygon as well as other features which I am planning to work on in the near future.

pict5_v1

Călin Cruceru

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.

linux3_v1
linux4_v1

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.

linux5_v1

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:

linux6_v1
linux7_v1

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

‘Let’s rock this summer’ they said

And this is certainly what we are going to do.

I am proud to say that I have been accepted to Google Summer of Code under KDE, Marble project. Surprised? Yes, a little bit. That is, I belived in my chances but, at the same time, had dozens of emotions as the accepted students announcement approached. I think I had a pretty good proposal and I had also proven my acquaintance with the codebase through the 13 patches I had sent even before the student application period ended, but you never know what brilliant idea one may have.

Marble is a virtual globe and a world atlas. My project, named ‘Editing mode for Polygons inside Marble’, deals with the implementation of a new and fresh feature to Marble, called Polygons Editing. In plain English that is a set of tools which will allow the user to draw new polygons onto the map as well as managing and customizing (adding, removing, moving nodes) already drawn ones.

Why is such a feature highly needed within an exploring software? Well, I will show you a picture to give you a quick insight into what its purpose may be.
forblog_v1
This is an existing feature of Marble which shows the eclipses from a particular date. Imagine how many similar shapes one could draw using the the Polygons Editing feature. The people to which this is addresed are researchers who could use it in presentations as an overview of their studies, students who may find it useful for their school assessments and many others who want to mark some specific places onto the earth for any reasons.

My work will also involve polishing the whole Editing Mode from Marble, including the Ground Overlays Editing. This is a feature implemented during Google Summer of Code 2013 and which have not been branched to master, although it was very close to look as a fresh and fully working feature. In fact, this is the task I have been working on lately and all I can say is that it is very close to the full functionality I was speaking above. I will not give any more details, but I will come back with another post where I will present my work done so far and this feature will certainly be included.

I am very excited to get it started officially and, hopefully, every line of code written by me will be accepted upstream.

Regards,
Călin Cruceru