Mapping the Trails

After reading some coverage on the Google Trekker and its use in Whitby for mapping the trails I decided to get into it and put the Oshawa trails on the map!!

I also looked at Google maps and found very little on the Waterfront Trail. I occasionally use this trail on the way home from working Scarborough. Usually when there is massive traffic on the road and I do not want to risk the bike ride.

So, after experimenting around my apartment building, I took a walk and covered about 2 km of the Oshawa Creek Trail. I stopped my North and South travels due to people at each end (got to respect their privacy). Since I live in the middle of the area covered it ended up being 4.5 km of walking according to my Samsung Gear 2 smart watch. The walk was done stopping every 3 meters (approximately) to take a picture. Sometimes I had to wait for people to pass by which was okay as it was hot and humid out and I needed a drink. I ended up taking 165 pictures with the Gear 360.

Since I needed a fairly accurate time and location for each picture I ended up using my Samsung Galaxy Note 3 to take a picture at the same time with the GPS enabled and the pictures geotagged. I’ll use exiftool to pull the tags from the Note pictures and put them into the Gear 360 pictures.

I was using a selfie stick and putting it above my head when the pictures were taken. Thankfully I was wearing a hat so there is no glare from the top of my head. I’d like to be out of the picture but that just is not to be. I set up the Gear 360 for a 5 second delay timer. I would push the button, raise the selfie stick above my head, wait for it to click and then click the shutter on my phone’s camera app as close as possible. This way I have the 360 picture and a reference picture very close timing wise.

When I returned home, the Gear 360 was at 53% battery charge.

I have downloaded all the images into my working environment. Now I am going to take a break.

Next steps:

  • the EXIF processing.
  • panoramic processing.
  • quality check
  • upload via Street View app
  • quality check
  • link and move
  • publish

Repeat all the above for each section of the trail until I have had enough of it!!
I’ll expand on this and eventually cover the portions of the Waterfront Trail that I use.

[Update 2017-Sep-20]
After uploading to Google and trying them out, I found that the orientation was off. The app does not allow for changing the direction of the images. I also found out that the Gear 360 does not include a compass. If you want your pictures to include any location tags you have to connect it to your mobile device. I also found out that Google uses the XMP tags, thankfully the gear360pano script adds the basic tags but misses two of them: UsePanoramicViewer and PoseHeadingDegrees.
The UsePanoramicViewer is optional but the PoseHeadingDegrees is required for Google Street View. Zero is assumed if it is missing.
Even the reference pictures I took with my phone do not include the PoseHeadingDegrees tag (or any other XMP tag).
So now I have to through each of the pictures and figure out the PoseHeadingDegrees for the center of the image.
Thankfully I only uploaded 12 of the 160 pictures so deleting them was easy.

I was able to add the UsePanoramicViewer using exiftool -xmp-gpano:UsePanoramaViewer=True *.jpg

I added a heading of 0 (North) to all the images using exiftool -xmp-gpano:PoseHeadingDegrees=0 *.jpg

The PoseHeadingDegrees affects how the arrows show up on screen. I had some images where the arrows pointed ahead but took me backwards.

So my process work flow now becomes:

  1. take picture with Gear 360
  2. take reference picture with phone
  3. record which direction I am facing (compass)
  4. repeat above for desired area
  5. upload to my desktop
  6. make sure 360 and reference images match up (sometimes I had 2 reference pictures)
  7. discard unusable pictures
  8. apply reference picture’s EXIF data to 360 picture
  9. panoramic processing via gear360pano
  10. apply UsePanoramicViewer=True tag to all panoramic pictures
  11. apply PoseHeadingDegrees=0 tag to all panoramic pictures
  12. fix PoseHeadingDegrees tag for each panoramic picture based on reference compass
  13. upload via Google Street View app
  14. link and move
  15. publish

[Update 2017-Sep-21]
After 4 hours and 10 km of walking I now have almost all of the trail between Gibb St and Lakeview Park covered. I even went off-road following unpaved trails just to see where they went. I found a few things that were interesting and a few that were disappointing. I managed to get a few creek level shots as well. I do need to go back over a couple sections between Wentworth and Tomas due to people in these areas.
I talked with a few people as they were wondering what I was doing. Some were surprised as they did not know you could do this with Google.
So I have added 243 pictures to my collection today.
Since the stock camera app on my Note 3 does not include the compass heading, I used OpenCamera which does. Hopefully my phone’s compass is not too far off as I’ll be importing it. I know my manual compass was way off in a few spots.

There were plenty of large fish in the creek today and a number of people trying to catch them. Which is why I had to skip some areas.

Today’s trip ended with the Gear’s battery at 32% and my phone at 45%.

[Update 2017-Sep-23]
I have started processing the images from the 21st. I found the OpenCamera app placed the compass in GPS Img Direction Ref and GPS Img Direction tags. So using the above processes I entered the following commands, repeating as required:
exiftool -artist="Andrew Haines" -copyright="2017 Andrew Haines" 360_*.JPG
exiftool -tagsFromFile ref_0182.jpg -AllDates -gps:all 360_0182.JPG
gear260pano.cmd -o ../pano/ 360_0182.JPG
exiftool -xmp-gpano:UsePanoramaViewer=True 360_*_pano.jpg

I had an error every time I tried to use a wildcard with gear360pano so I did each file separately.
This command did the job but I could not figure out how to adjust the value for True North.
exiftool "-xmp-gpano:PoseHeadingDegrees<gpsImgDirection" 360_*_pano.jpg

It has been quite some time since I used Perl but I put together a very simple script to set the PoseHeadingDegrees.
setPoseHeading.pl:
#!/usr/bin/perl -w
use Image::ExifTool;
my $file = shift or die "Please specify filename";
my $exifTool = new Image::ExifTool;
my $info = $exifTool->ImageInfo($file);
my $gpsdirection = $exifTool->GetValue('GPSImgDirection');
my $oldPoseHeading = $exifTool->GetValue('PoseHeadingDegrees');
my $poseHeading = $gpsdirection - 10.53;
if ($poseHeading < 0) {
$poseHeading += 360;
}
$success = $exifTool->SetNewValue('PoseHeadingDegrees', $poseHeading);
$exifTool->WriteInfo($file);
$errorMessage = $exifTool->GetValue('Error');
if ($errorMessage != '') {print "$errorMessage\n";}
print "$file $gpsdirection $oldPoseHeading $poseHeading\n";

I found the True North offset to be 10.53 for my location so I hard coded it into my script.
I could also use this script to remove a few of the previous command lines my adding more SetNewValue lines.

Now to see how these images look on Google Street View.

After a few hours of work, I now have almost everything from Bloor St south to Lakeview Park posted on Google Street View. I have 3 small areas still to populate. Then I’ll start on the section between John St and Bloor St. I have already taken pictures between Bloor & Gibb but with what I’ve learned since I’ll just make new ones as it will be easier.

I have 309 pictures uploaded in my Google profile so far.

[Update 2017-Sep-28]
On my way home from Scarborough today I decided to hop on the Waterfront Trail and take some pictures. I took pictures from Thickson Road through to Stone Street, Stone Street to Ritson Road, and Ritson Road to Lakeview Park. At this point I had a low battery warning on my phone. I have 129 reference pictures and 3 signs.

[Update 2017-Oct-06]
Pictures for Thickson Road through Phillip Murray have been uploaded and linked. I found that my GPS on the phone was way off for a number of these pictures, sometimes a couple kilometers away, and once 20 km away.
Pictures for Phillip Murray through Stone St are being uploaded now.
Street Maps is one messed up app, it locks up at random times, refuses to upload pictures, all with no information as to why.

Bookmark the permalink.

Comments are closed