OpenStreetMap

FTA's Diary

Recent diary entries

Uploading Street-Level Imagery to Multiple Sources

Posted by FTA on 29 June 2018 in English. Last updated on 25 February 2019.

Recently I picked up a GoPro HERO5 Black camera for use in street-level imagery. It’s been a really great platform that has displayed fairly steady GPS acquisition and tracking. (Though I may not necessarily be the person driving when I am capturing footage.) I’m also big fan of contributing to as many projects in the OpenStreetMap ecosystem as possible.

To that end, I’ve found a workflow that has worked fairly well for taking photos from my GoPro and resulting in photo contributions to OpenStreetCam and Mapillary. Here’s how (note this is a compilation of not only trial-and-error but also advice scattered throughout the internet):

Capture street-level imagery with the camera

As mentioned, I use a GoPro HERO5 Black because it has GPS, and I capture in time lapse photo mode with a linear frame and 1 second timing (I have found that 0.5 second timing causes some issues with upload backends). Unfortunately glare from the dash is a major issue unless you’ve situated the camera dead on the windshield, so I use some fabric I picked up at my local Walmart to cut down on the reflectivity of the dash.

Extract photos

I usually plug my card from the GoPro into an SD card adapter that I use on my MacBook. Once downloaded, I then scp the files to a Linux box. You could most likely also complete the following steps on another platform that has a Python interpreter, but I haven’t tested it out.

Separate and filter photos

Depending on how you capture the photos, you may need to perform some manual separation of sequences. If you’re the kind of person who leaves the camera on the whole trip, you’re going to initially have a directory (or many directories if you have over 999 photos) of many photos. Furthermore, you’re going to have many photos of you idling in the same position, so that will require filtering. I like to stop my camera with the remote switch right as I’m rolling up to a stop light; I turn the camera back on just as I’m about to accelerate from the stop. The GoPro increments one of the first few numbers (depending on what photo count you’re on) every time you start a new sequence, so this allows me to easily find breaking points to split up segments as I see fit. Note that Mapillary prefers sequence counts in the low hundreds.

Interpolate compass

The GoPro is great in that it has a built in GPS for photos, but there is no information supplied about the bearing. The easiest way to add that to the photos with a fairly good degree of accuracy is the script at https://github.com/mapillary/mapillary_tools/blob/ca7bec7be44ed2560d3c26eaa9255f6d5a7dad85/python/interpolate_direction.py which will require you to clone that full git repository and install dependencies; note I am using an older commit because that’s what I’m familiar with. With that installed, you run this step as python interpolate_direction.py /data2/losangeles/seq01/. Repeat this for each sequence you have constructed.

(optional) Crop photos

The linear frame on the GoPro leaves a lot of sky at the top of the image and, even if you have some fabric in your dash, it may reflect other things in your car behind the dash such as your passenger seat, driver seat, or radio selection. Furthermore, we’re mostly only interested in what’s going on at street-level, so cropping the extra is useful. To crop the photos, I use Imagemagick: for f in 'ls /data2/losangeles/seq01/*.JPG'; do mogrify -gravity South -crop 4000x2200+0+0 $f; done (the ' is actually a grave accent on the ls command part–and by grave accent I mean the one on the same key as the tilde for American English keyboards). The parameters work well for my GoPro photos but will depend on the resolution of the camera you’re using. Repeat that for each sequence you have constructed. Here’s an example how, even with cropping, there’s still some reflection from past the dash: https://www.openstreetcam.org/details/1201407/0/track-info.

Upload to OpenStreetCam

Now you ideally have sequences of photos that are GPS tagged by the GoPro, bearing set by the script above, and possibly filtered/cropped. The first place you can upload is OpenStreetCam. I cloned the repository at https://github.com/openstreetcam/upload-scripts, installed dependencies and authenticated as instructed in their README, then navigated to the upload_photos_by_exif subdirectory. Once there, you can call python upload_exif.py -p /data2/losangeles/seq01/ for a given sequence of photos. This will upload the photos and create two log files in their directory. Repeat this command for each sequence of photos.

Upload to Mapillary

The next place you can upload to is Mapillary. Again, I have been using an older version of their tools library, so your mileage may vary here. But with those scripts downloaded from before, I navigate to the python directory again and I edit the upload_with_authentication.py file. Depending on the commit, this line may not match exactly, but with the above-quoted commit, line 40 should have the variable MOVE_FILES defined as True. I set this to False so that the photos are not split up into success and failure directories while uploading. With that one-and-done edit, I now run upload script as python upload_with_authentication.py --auto_done /data2/losangeles/seq01/ and iterate over all the sequence directories.

Location: Linda Vista, Pasadena, California, 91109, United States

Expanding the OSM Community

Posted by FTA on 26 August 2015 in English.

One common theme weaved into the State of the Map US conference was the difficulty of community onboarding…once people are finally drawn into OpenStreetMap, how can we retain them and help them feel like a part of the community? I think we should have some sort of OSM Ambassador program. A welcoming committee, or mentoring program, that reaches out to greet new users as they join the community and serve as a contact point for questions about OSM, correct tagging, using the data, or just why this community is so great. This group can also be the connection from individual mappers to local OSM chapters, Maptimes, and other organizations.

The program should be somewhat local, focused on the country, province, or even city to provide a “local” touch to the communication–not just a generic response. The ambassador/mentor/welcomer doesn’t necessarily have to live there, but it would be great for them to have some knowledge of the location to provide advice tailored towards that region. This initial contact would perhaps help the new mapper realize they aren’t the only person in a TIGER desert of nodes. It would also give them a direct contact point if they don’t want to approach the mountain of mailing lists or try their hand at IRC and other help mediums.

A similar mechanism has likely been informally happening already by many of us in the community. I have personally sent messages to people as I’ve randomly seen a new editor show up in the history, usually when they are in my area. Minh Nguyễn, had a great talk at the SOTM US, where he touched on how he has also reached out to new mappers in the bigger picture of inspiring local mappers. It makes sense that we already do this, because we truly care about the OSM community. But we should organize our efforts so that we can ensure all of the areas are covered.

This project is, I think, the biggest step forward for springboarding an ambassador program. We should look to organize this worldwide and rally around welcoming people into our community to provide a group of fellowship for mapping and open data!

Location: Madison, Dane County, Wisconsin, United States

HOT and OSM

Posted by FTA on 2 October 2014 in English.

Over the past six months. I’ve taken a great interest in the HOT project…first dealing with flooding issues in Europe and the conflicts in the Central African Republic, now with the Ebola outbreak in Africa. This has been one of the more rewarding projects I have worked on in a while, providing the opportunity to directly impact disaster response operations–something I have been active with over the years previously through amateur radio. I am looking forward to continued work with HOT and hope that I can provide some “meta”-help with them in the future, beyond simply mapping.

New Mexico Railroads

Posted by FTA on 30 November 2013 in English.

For the past few months, I have been working on overhauling, lining up, and adding to relationships all the New Mexico railroads. I am about 90% of the way to my goal. Also, I noticed some of the other states and countries have railroad pages on the wiki, so I went ahead and started one for the New Mexico Railways.

Some lessons learned:

  • Railroads often have many more bridges than streets (I suppose since they often intersect land parcels).

  • service=siding actually exists (was marking them as spurs up until a few months ago, but went back and fixed the other ones).

  • Many spurs exist on the main lines, and it is often hard to determine if the company or the railway maintains it (for now, I excluded them from the subdivision relationships).

  • It’s difficult to keep an ordered list of ways on a relation. For example, I would find one of two lines within a relationship not in the relationship. It’s difficult to pinpoint exactly where each segment lines up with the segment in the other main line.

  • There is a map that uses OSM data to render an explorable map of railroads.

If you ever need a break from the commotion of mapping large urban areas, there are still plenty of railroad segments between cities that haven’t been touched since the TIGER import! Happy Mapping!

GPS Traces

Posted by FTA on 3 July 2013 in English.

Well, after learning I would be traveling on a long trip for summer vacation, I decided I wanted to play with GPS traces. I settled on the OSMTracker for Android because of the ease of tracking without the requirement for data access (I don’t have unlimited on my mobile, so I was not interested in racking up a big bill). I was able to capture most of the trip on the tracker and exported the GPX files to my laptop. It was a little disappointing to me that I could not upload a trace attributed to my name without having to include the time data; I am not really interested in a retroactive speeding ticket due to data I freely uploaded onto the internet if I did exceed the limit in places.

Regardless, I was able to get some traces in rural parts of the USA where it doesn’t seem there have been traces before. My hope is to get traces in the opposite lanes on the way home. In the future, I plan to utilize this more with mapping walking/biking trails as well as outlines of new buildings not yet shown on satellite imagery. Until next time, happy mapping!

Location: Madison, Dane County, Wisconsin, United States

SE New Mexico is Looking Good

Posted by FTA on 26 November 2012 in English.

Over the past few weeks, I think I’ve made some vast improvements across the southeastern part of New Mexico. Railroads are in line, rivers that weren’t drawn in now exist, highways are aligned, roads with medians are split up, buildings have started popping up, parks and golf courses have been added, etc. I have been delighted to work on this and hope to continue editing. Now, if only I could get paid to do this haha!

Best wishes to you all, thanks for reading, and happy mapping.

P.S. I spent my Thanksgiving away from home, so I mapped most of the day:

50!

Posted by FTA on 3 November 2012 in English.

Well, I just broke into the top 50 contributors list for the past 24 hours. I’ve spent alot of time overhauling railroads around much of SENM as well as changing over highways with medians to two separate lanes of traffic. I am hoping to focus now more on actual points of interest within town, e.g. restaurants, churches, fire stations, schools, etc. This desktop editor is an amazing and powerful program.

Love!

Posted by FTA on 31 October 2012 in English.

I have absolutely fallen in love with the JOSM program recommended to me. I am able to edit so much faster than I have been able in other programs. I have noticed a few novice mistakes I previously made have been corrected (splitting nodes and not correctly merging them back, etc.) but I am gaining more knowledge of the program.

Today I just finished up adding some of the bodies of water in the town of Carlsbad and tried out my hand at a relation (to add islands to the river); I hope to extend the Pecos River away towards other towns (at the time of some of the sat photos it was drained due to maintenance so that task might prove somewhat difficult at the time).

Also, I’ve noticed sections of towns that aren’t lined up with satellite while others are…should I spend time moving roads back to match up the satellite perfect, or is it an issue with the satellite image not being projected exactly the same each time? Any comments on that would be very helpful :).

Happy Mapping!

Southeastern New Mexico

Posted by FTA on 25 October 2012 in English.

Welcome!

I am a new editor here, just moving from a similar program led by a large multinational company; that other place just didn’t deliver due to too much supervision and a very laggy editing program.

I am excited to clean up much of the area I was on my previous project: Southeastern New Mexico. Despite not being very populous, there is much to offer in the region and I hope it can be of help to visitors (whether for business or pleasure).

Feel free to send me a message if you’ve got any questions, and happy mapping!