spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2009
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2009

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
ViaVirtualEarth
SVG Tutorials
MapPoint

Map Visitors

 Direct Media

Travel Insurance Compare over 450 travel insurance policies (inc. annual multi-trip, single trip & winter sports)

  ARTICLES  


Accuracy With OSGB Grid References

Nick Hubbard investigates and supplies a solution for using OSGB coordinates accurately with MapPoint 2002

MapPoint has the OSGB coordinate system wrong!

That's a bold statement. What do I mean?

Introduction

When placing pushpins from within MapPoint I noticed that they were out by 120 metres. On further investigation this error only occurred if I had defined the location using OSGB (Ordnance Survey of Great Britain) grid references.

Also there is no automation interface for us poor Brits wanting to use our national mapping coordinate system. We're obliged to use alien latitude and longitude.

Helmert Transform

The Earth is not a sphere. To cope with the irregular shape, British national maps use a coordinate system that best fits Britain only (Airy 1830). GPS and MapPoint use the "World Geodetic System 1984" (WGS84) that best fits the whole Earth.

When MapPoint reads in our "Quaint, Little Old England" map references, it uses the WGS84 coordinate system without transforming to the Airy 1830 shape of the Earth.

The coordinate system conversion is performed by matrix maths, the aforementioned Helmert transform.

This is explained in A guide to coordinate systems in Great Britain. Published by the Ordnance Survey. It's a very readable document.

Does this error matter?

That depends on how accurate you want to be. The error can be significant, up to 200 metres. 

If you can use latitude and longitude, then the problem goes away: only OSGB coordinates read in by MapPoint are in error.

But what do you do if your dataset is in OSGB coordinates? You can't use OSGB coordinates in automation - the MapPoint "GetLocation" method only takes latitude and longitude.

Is there an solution?

Yes. I have implemented an OCX control that performs the WSG84 to OSGB Helmert transform. This reduces the error to within 5 metres.

What does the control do?

  • Parses the OSGB grid reference, and if valid...
  • Calculates the ellipsoidal Latitude and Longitude. (MapPoint stops here!)
  • Converts to 3-D Cartesian, using OSGB36 constants
  • Performs a Helmert transformation from OSGB36 to WGS84
  • Converts from 3-D Cartesian to WGS84 Latitude and Longitude.

How to use it:

  • Download it. This zip file contains the OCX control.
  • Run the application. This will let you test it, as well as automatically register the OCX.
  • Test it from VB. 

Sample code:


You may provide as many digits as convenient. 6 figure "SP840355" is valid. Spaces are optional.

Source

The source to the control is here.

Further Information

Visit http://www.anotherurl.com/mapping/default.htm to read more.

Test the control here and now running in an asp script on a IIS web server.

More samples in VC++ here.

Discuss this story in the forum.

Author: Nick Hubbard
Email: nick(AT)anotherurl.com
URL: http://www.anotherurl.com
Nick Hubbard is a mercenary software contractor with 12 year's experience of Windows programming. He is located in Milton Keynes (SP840355). When not exploiting his clients, he likes taking his collection of GPS receivers on trips out to various confluences. See http://www.confluence.org. Any GPS receivers that lie get left behind.



Google
 
MP2Kmag Internet


 Recent Discussion
-Export Zip Codes Along A Route
-Importing from Excel troubleshooting
-MP 2009 Pushpin Question
-Add-In Development Goes Sour
-MVP
-Route Optimization in Bing Maps powered by OnTerra’s free Stop Optimization Service
-Newbie Fail - Please Help
-Find road traffic details
-Convert a territory to a shape?
-Imagine Cup 2009 – Team Croatia Builds GeoScout with Bing Maps
-Maponics Adds Infusion Development and MapMart to Distributor Network
-Mappoint updates
-Mappoint 2006 history list???
-Trying to optimize my route
-Finding zipcodes (or other territory descriptions)
-Is MapPoint 2009 capable????
-Rendering Historic Maps on Bing
-Spatial-Enabled Windows Azure (Part 1)
-Spatial-Enabled Windows Azure (Part 2)
-MapPoint 2009 - Discovery GPS's COM Port
-Territory export. 3 Digit Zips and State
-TrekWireless Shows Electric Car Charging Points on Bing Maps
-I'm back
-Embed Chart into Mappoint2009
-BBC Goes Big on Bing Maps
 Resources
Browse GIS books and periodicals
Best Car Contract Hire Lease Save
Find a MapPoint Partner or Consultant
Real Estate Columbia, MO


Want Your Site To Appear Here?

   © 1999-2009 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009 are either trademarks or registered trademarks of Microsoft.

• Replacement Cordless Phone Batteries from DSMiller
Improve your career with a computer degree LocalEDU.com
• Tim Cohn's Marketing Strategy Consultancy
• Buy Toner Cartridges at Marquee Office Solutions
• Looking for Dry Erase Boards? See Dry Erase Boards • The Search Starts Here Used Cars
• 5339 - We Know Bikes: Road Bikes / Triathlon Bikes / Mountain Bikes / BMX Bikes
• Buy Your Car Used Cars UK, Car Lease and Contract Hire