Showing posts with label maps. Show all posts
Showing posts with label maps. Show all posts

Monday, October 13, 2008

First update on mapping OpenStreetMap (long overdue)

Australia » Victoria » Melbourne
I signed up for OpenStreetMap about a year ago, and there were plenty of warnings that it's very addictive, but little did I know!!!
I do mapping in spits & spurts (like a lot of other people I'd imagine).

Progress

Turns out I have done a fair bit since I signed up:
Melbourne contributors
Looks like I'm the biggest contributor in greater Melbourne, scary stuff.

I've traced streets, added a lot of names and added some POI's like parks, foot/bike paths, pubs, schools etc.

Rough order of Suburbs I've done:

  • Essendon
  • Moonee Ponds
  • Aberfeldie
  • Strathmore
  • Ascot Vale
  • Flemington
  • Travancore
  • Kensington
  • West Melbourne (industrial area)
  • Strathmore Heights
  • Gowanbrae
  • Airport West
  • Keilor East
  • Avondale Heights
  • Maribyrnong
  • Maidstone
  • West Footscray
  • Footscray
  • Braybrook
  • North Sunshine
  • Sunshine
  • Keilor Park
  • Tullamarine

Since I don't have a GPS, I trace from Yahoo! imagery and fill in as many details as possible.

My usual steps:

  1. Trace streets, parks, foot/bike paths from Yahoo! imagery
    • Add as many tags as is obvious, leave alone if in doubt
      • eg. highway=residential, source=yahoo
  2. Ride along "main" roads to pick up all the side street names, scribbling on my Palm T3 Notepad application (exports to PNG)
    • Tag as name=blah, source:name=survey
    • Later on use Maplint or NoName layers to spot missing street names
      • Plan another ride that swings past all remaining streets
  3. Walk or ride down *every* street, after printing off a Mapnik layer map of the area
    • Note down:
      • All street names/references/lanes/bike lanes/speed limits
      • Schools, park, shopping centre names and shapes (to refine the rough tracing from Yahoo!
    • This takes a long time, and I've only done a little bit so far, but it does make the area almost 100% complete

Wishlist

  1. Either Yahoo! updates their Melbourne satellite photo's (~5 years old) and provide higher zoom levels (currently level 16) or Google provides their photo's to OSM
  2. Potlatch is my editor of choice, and it has improved a lot since I started using it
    • Zoom further in by scaling the Yahoo! tiles when hitting the highest zoom Y! provides
      • Potlatch used to do this, which made it much faster to trace, but a Flash bug that occurs when the auto-maximise feature was added means this had to be turned off :(
    • More tag "autocomplete" entries (especially source:name=survey/photo etc.)
    • When crossing a way with another (either as a T-intersection or cross), I think the snapping feature of Potlatch means the created node is not where the two ways mathematically cross, but the nearest snapped point
      • So the angles of ways change a bit, needing zooming in to fine tune
        • But snapping is very obvious at z18, which becomes dodgy when ways are close to (but not) orthogonal
      • I usually layout a grid of streets with a little overlap, then come through and join all crossing ways, crop T-intersections overhang and fine tune
  3. Get a GPS and:
    • Circumnavigate local parks etc. which are hard to see the boundry from Yahoo! imagery because of trees
    • Enter POI points like postboxes, speedhumps, changes of speedlimits
    • Take photos as I go of all the street signs, amenity names etc. which, with a GPS, can be geotagged (and upgrade name's to name:source=photo)

Ownership

I've noticed that there is a fair amount of pride/possessiveness around the contribution that OSM users have made, and I'm no different.

I get annoyed when other users come through and add inappropriate tags (not what was on the ground, "for the renderer", not "best-practise" etc.), move carefully smoothed ways around/offset. I guess the "pride" of one's contribution is a double edged sword.

Good tools for letting me know when someone has editing "my areas" would be fantastic, and I've just signed up for Itoworld's osmmapper (RSS feeds of changes to specific areas). But I think it's hard to communicate what has changed, how do you convey changes in a concise/meaningful way?

  • eg. Mary St is now oneway & nodes moved; Frank Rd deleted; Railway Hotel pub added+tagged opening hours; etc.

Crossposted at OSM diary

Saturday, January 06, 2007

Excel formula to calculate distance between 2 latitude, longitude (lat/lon) points (GPS positions)

I've been looking for this one for ages, and the one I created based on an equation I found a little while ago didn't work too well :(

Investigation

Calculate distance, bearing and more between two Latitude/Longitude points shows lots of equations in math, and implemented in JavaScript. Chris Veness's page also contains an Excel formula of the ‘Haversine’ equation (actually, using the "spherical law of cosines") for distances between points in kilometres:

=ACOS(SIN(Lat1)*SIN(Lat2) +COS(Lat1)*COS(Lat2)*COS(Lon2-Lon1)) *6371

But it wasn't working, because my GPS points (Lat/Lon) were in decimal degrees, not radians. So I used the formula I found at Latitude And Longitude In Excel (under the "Great Circle Distances" section) by Chip Pearson:

=RadiusEarth*ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2)))

where Chip gives RadiusEarth as 6378.135 kilometres. This didn't match up with distances I had when calculated from other systems. But Chris's page has:

R = earth’s radius (mean radius = 6,371km)

Digging deeper, I found Chris's Vincenty formula for distance between two Latitude/Longitude points page which includes a table on different datum models (treating Earth as an ellipsoid), it shows WGS-84 & GRS-80 having the greatest radius on an ellipsoid as 6378.135km & the smallest as 6356.752km.

So Chip was using the maximum radius of the Earth, not the mean radius like Chris (I'm not sure where Chris gets the mean radius from). Substituting Chris's R for RadiusEarth in Chip's formula gives:

Solution

=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371

and my final version that uses Excel cell references is:

=ACOS(COS(RADIANS(90-A2)) *COS(RADIANS(90-A3)) +SIN(RADIANS(90-A2)) *SIN(RADIANS(90-A3)) *COS(RADIANS(B2-B3))) *6371

PS. To calculate distances in miles, substitute R (6371) with 3958.756 (and for nautical miles, use 3440.065).