Add start and end British National Grid References to a Polyline Shapefile

1940
2
08-15-2012 11:21 AM
JohnRice
New Contributor
Hello,

Hope somebody can help with this.  Pretty sure there is a simple solution, but I'm struggling to find it.

I have a series of polylines contained within a single shapefile.  Within the attribute table, I need to provide the start and end grid reference for each polyline in British National Grid format. 

I am familiar with generating X & Y coordinates in separate fields using the calculate geometry function, but i need the data in BNG format (i.e. SU XXXXX XXXXX) for further processing.

Hope you can help!

Thanks

John
0 Kudos
2 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
This is an interesting question; the solution may not be simple. For my curiosity, I searched internet and found this reference, in case you need to know the math:
http://www.movable-type.co.uk/scripts/latlong-gridref.html
See Annex C of their Guide to coordinate systems in Great Britan.
Then click the link for "The guid is available in a PDF format".
0 Kudos
JimSibbald
Esri Contributor
John

I have previously written BNG tools in VB6 and then C# which apply (encode) the bigram to the normal easting and northing provided by ArcMap when in BNG.  I also have written code that decodes the bigram back to numeric easting and northing.  While what you want is probably python, I am more than happy to provide the C#, although I am not a programmer and the code is taken as is.

Let me know if this would be useful.

Yours aye

Jim
0 Kudos