JOSM/Plugins/Mapillary/Development

From OpenStreetMap Wiki
< JOSM‎ | Plugins‎ | Mapillary
Jump to navigation Jump to search

Over the course of the Google Summer of Code 2015, the JOSM plugin for Mapillary was developed. On this page the progress of this project is documented.

I'm creating this page in order to start and keep track of a Mapillary plugin for JOSM. Feel free to comment anything. You can find more information about me here and about the project here. A Trello board has been set up in order to organize myself [1] (out of date atm). The latest development jar files can be found here.

Blog

Before week 1

At the moment I'm getting used to JOSM code and Java AWT, as I've never worked with it before.

Week 1: 25.05 - 31.05

09:06, 27 May 2015 (UTC)

Development goes quite well, a basic version of the plugin will be uploaded soon. The only problems I've found were dealing with concurrency and EDT.

15:53, 31 May 2015 (UTC)

Most basic things are done. Next week I will publish the plugin. The only thing I couldn't do was writing the proper EXIF information when exporting the images. The source code can be found in the SVN repository.

Week 2: 1.06 - 7.06

16:23, 2 June 2015 (UTC)

The basic version is almost done. I had to make a new plugin for commons-imagery library, as it is used by another plugin. I had to create a couple of new icons (thanks gimp), in order to show images direction. Next step will be correcting all the bugs the users will find and then will jump to edition of the Mapillary's pictures' attributes, for that I will have to implement a login system.

11:34, 7 June 2015 (UTC)

This week I've started with more advanced features, such as a history record and being able to reposition icons in the map and change their direction. I'm a bit stuck a the moment until Mapillary finish their API, but that will probably be soon.

Week 3: 8.06 - 14.06

17:31, 10 June 2015 (UTC)

You can already move and modify pictures' direction, import local pictures and there is a new dialog that shows latest commands and lets you undo them.

Week 4: 15.06 - 21.06

11:53, 16 June 2015 (UTC)

The plugin works pretty well. I still have to polish the main functionalities a little bit more. I've started talking with people at Mapillary in order to get more information about more complex functionalities in their API so I could upload pictures and make changesets.

Week 5: 22.06 - 28.06

12:09, 23 June 2015 (UTC)

I've been into contact with people from Mapillary. I got many ideas in how to continue. I will focus on the traffic sign aspect of the plugins in order to easily identify and map them. Also, I have been getting many bug reports recently, meaning that many people are using the plugin. At the moment I'm creating a filter system. You could filter pictures depending on whether they are imported or not, and the signs they have.

Week 6: 29.06 - 5.07

Week 7: 6.07 - 12.07

Week 8: 13.07 - 19.07

Week 9: 20.07 - 26.07

14:52, 24 July 2015 (UTC)

Long time without writing. Almost all the plugin requierements have been satisfied, except those related to intereaction with Mapillary website (editing pictures properties, blurring,...). At the moment I'm waiting for the Mapillary API to be finished, in order to being able to upload new pictures and update the existing ones. At the moment just the OAuth 2.0 login system has been implemented. Appart from this, the code has been migrated to a GitHub repository thanks to floscher. He is taking a look at how we can use the traffico font in order to represent traffic signs.

Week 10: 27.07 - 2.08

09:12, 30 July 2015 (UTC)

The Mapillary API has progressed a lot. Since today, I will be implementing the parts of the plugin that requiere interaction with the logged in part of the API, such as the upload of new images. I started making tests. It's being a little bit hard because at first the code wasn't designed to be used without the JOSM UI being active, but I'm slowly fixing it and improving the code quality.

08:33, 2 August 2015 (UTC)

The login system is working, so I can now make many more things. At the moment I'm working with the system to upload new pictures, but after that I will try to make something related to blurs. I've also tried to implement some tests, until I realized it was impossible to create an instance of ToggleDialog subclass in headless mode, because it tries to look for images.

Week 11: 3.08 - 9.08

15:21, 4 August 2015 (UTC)

I've been working in the upload for a couple of days and it is working at the moment. A new stable version of the plugin will be soon published. From now on I will start improving the code quality and making test. And maybe something related to blurring/unblurring pictures.

Week 12: 10.08 - 16.08

08:44, 11 August 2015 (UTC)

The upload is working pretty well. Yesterday I realeased a new stable version (0.9), in order to do the final tests before the program finishes. For the next two weeks I will be testing everything and writting more tests.

10:54, 12 August 2015 (UTC)

Final two weeks of the program. The plugin goals are mostly fullfilled. The only thing I would have wanted to do is modifing existing pictures attributes, but it's not possible with this API. But appart from that, almost everything is working really fine. At the moment I'm improving the history system and trying to improve the user experience. I should also write a few more tests and make sure everything works.

Week 13: 17.08 - 23.08

16:17, 17 August 2015 (UTC)

Last week. Everything seems to work fine and I can't think on any more test to write. I'm getting a couple of good suggestions (thanks system for Mapillary) and automatic tagging, but I won't be able to do it before the program finishes. But I will try to implement it on my free time (not much), but I hope I can maintain the plugin and add few more things to it.

Ideas

Core ideas

  • Download pictures from server. Metadata of the images is downloaded using the JSON api. Several ways:
    • Download all pictures in the area you are seeing.
    • A map to select an area, like the JOSM download menu.
    • Download all pictures around this node. Then you can specify the distance.
    • Possibility to store sequence names in order to easily download and an option to complete any incomplete sequences.
  • When downloaded, pictures are shown in the layer with a generic symbol, but showing its direction. When you hover an icon, its thumbnail (320) is downloaded and stored in cache.
  • If you click on an image, a new window would open. There you would see the thumbnail, and the full image (2040) would start downloading, and whenever it finishes the full picture is shown. Also the next and previous pictures in the sequence would be downloaded.
  • The idea to manage cache would be to use JCS, maybe, until JCS is completely implemented, a basic cache program could be implemented.
  • Menu to export current downloaded pictures into a local folder

Extra 1

  • Import local stored pictures, format JPEG, they will need to have the proper EXIF information. If they don't have position or direction, they would be set in the center of the layer or facing north respectively. In the case of time, current time would be set and would be possible to change it manually.
  • In the view window, add a button to modify the picture's direction, just if they have been imported from local:
    • A new window appear, with the map as background (or satellite imagery) and a thumbnail of the picture. Then orientation could be changed using + - buttons. There should be an option to apply the same changes to all images in the sequence.
  • If an object is selected, an add tag button would appear in the viewing with, which would add the tag Mapillary = 'key' to the object.
  • Upload the local pictures to Mapillary, you would need a permission hash.

Extra 2

  • Blur picture parts inside Josm.

Extra 3

  • Maybe the option to edit Mapillary pictures inside Josm. I think this wouldn't really be necessary but could be useful.
    • Although with the normal api or python scripts it isn't possible to do this. Maybe with the developers api gyllen mentioned at this Josm ticket.
  • Traffic sign verification system.