Converting street directory grid references to coords

Discussion about software such as GSAK, OziExplorer etc, as well as all things hardware, GPSrs, laptops, PDAs, paperless caching, cables etc
Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Converting street directory grid references to coords

Post by Mind Socket » 09 March 04 2:33 pm

Hi all,

Does anyone have any code/data/links/info/ideas/(complaints :twisted: ) for converting sydway, ubd, gregories ... grid references (map number and grid such as 236 B7) to coords. Obviously, they only need to be approximate given the size of grid squares.

I'm interested in converting data sources that provide info with street directory references to something that can be plotted approximately using coords.

Cheers,
- Rog

Mix
450 or more roots tripped over
450 or more roots tripped over
Posts: 1399
Joined: 30 October 03 9:20 pm

Post by Mix » 09 March 04 3:43 pm

steelrat may help
<br><br>
http://www.geocaching.com/seek/log.aspx ... ed214160d1
<br><br>
on the gregories maps they have the UTM in AGD66 so it you convert to WGS84 UTM you have much the smae thing.

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 09 March 04 3:56 pm

Thanks. I'm actually hoping to do it without having to refer to a street directory.

For example, I have a list of location that have sydways and gregory's map reference (map number & grid) that I'd like to convert in bulk to coords, without looking up each one in a street directory.

I'm going to have a look at whereis.com.au or UBD on disk for UBD. Unfortunately, it's the other 2 directories I'm more interested in.

- Roger

Mix
450 or more roots tripped over
450 or more roots tripped over
Posts: 1399
Joined: 30 October 03 9:20 pm

Post by Mix » 09 March 04 4:08 pm

It may still help as gregories standardised the map numbers so that they are liner in both direction (rows and columns) if you can work out the relation ship between UTM which divides an are by 1000s and the GR and AR on the maps then you can have the map reference converted to UTMÂ’s then to long. & lat.. Maybe IÂ’m wrong but I think some clever maths may be all that is needed, I would talk to Steelrat though as he plans meticulously every cache he does using paper maps and street directories, so he may have what you need.

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 09 March 04 4:20 pm

Thanks, I'll check it out.

It appears that discway and sensis have the data that I'm after, but at a premium (and with more stuff that I don't need for this exercise).

I'll keep at it.

Cheers,
- Rog

User avatar
Richary
8000 or more caches found
8000 or more caches found
Posts: 4189
Joined: 04 February 04 10:55 pm
Location: Waitara, Sydney

Post by Richary » 09 March 04 5:26 pm

Wouldn't be that accurate though, I would hate to be told to find a cache given nothing better than map 185, D4 :shock: But to get you in the general area could work.

Unluckily here in Adelaide the maps don't always run consecutively in the UBD, some are staggered off centre :(

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 09 March 04 8:15 pm

:) Agreed. This list of locations is for finding things bigger than caches.

Ebenezer
150 or more caches found
150 or more caches found
Posts: 425
Joined: 03 June 03 5:12 pm
Location: Summer Hill, Sydney
Contact:

Post by Ebenezer » 10 March 04 11:13 am

If you don't mind Ozi namesearch format, see http://members.optusnet.com.au/%7Elink_ ... d_grid.zip . Not sure if that helps or not. He has more namesearch stuff at http://members.optusnet.com.au/%7Elink_ ... earch.html .

Ebenezer
150 or more caches found
150 or more caches found
Posts: 425
Joined: 03 June 03 5:12 pm
Location: Summer Hill, Sydney
Contact:

Post by Ebenezer » 10 March 04 12:15 pm

The link I posted will give you the co-ordinates for the map number. UBD/Gregories also has the grid reference number marked on the maps. I think a square is 250x250m, so pretty simple if you know the UTM for the top left of the page.

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 10 March 04 1:04 pm

Thanks Ebenezer, I picked up that link on another forum too. :)

I'll probably try to get my hands on a Sydways and figure out the conversion. I understand that most maps have a UTM related grid scale, so it shouldn't be too bad as long as the map index is nice and rectangular (UBD is mostly so).

- Rog

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 10 March 04 2:33 pm

Something like that. Approximate pseudocode, assuming a uniform rectangular grid of map pages starting at a given offset (due to high detail initial maps) ...

row=(map# - map_offset) / maps_per_row
col=(map# - map_offset) mod maps_per_row

base_easting=min_easting + (row * easting_per_map)base_northing=min_northing + (col * northing_per_map)

easting=base_easting + ((horiz_grid_ref - 1) * 250) + 125
northing=base_northing + ((vert_grid_ref - 1) * 250) + 125

Whew! Doesn't look as bad (yet) as the topoweb->OziE script I wrote last night :p That got real ugly around 2am.

- Rog

User avatar
Two Goth Geeks
50 or more caches found
50 or more caches found
Posts: 281
Joined: 05 April 03 7:02 pm
Twitter: TwoGothGeeks
Location: Sydney, Australia
Contact:

Post by Two Goth Geeks » 12 March 04 12:38 pm

I just look up the UTM in the Gregory's/Refidex:

UTM: 55H E 694612 N 6105669

E & N are on the page.

Perhaps I missed your point :)

Mind Socket
Posts: 1329
Joined: 29 March 03 6:04 pm
Location: Gladesville, Sydney
Contact:

Post by Mind Socket » 12 March 04 1:13 pm

My point is to find a way to make the computer do the lookup (I have a long list of grid refs covering 3 different publications that I want coords for). I stumbled across the following whilst reverse engineering a map server last night (I didn't say that 8) ).

Javascript grid ref to UTM converter - for educational purposes only ...
// =======
// ZOOMUBD
// =======
function zoomUBD(ubdmap,col,row){
// window.status="29 "+new Date().getTime().toString();
// Window to a UBD reference
var e,n,map,sp,special,maplc;
maplc=ubdmap.toLowerCase();
sp=UBDSpecial.indexOf(maplc+"~");
special=false;
if (sp != -1) {
// Special Case
if (sp==0) {
map=119;
special=true;
} else {
map=((sp-6)/5)+21;
}
} else {
map=parseInt(ubdmap);
}
if (map < 119 || special) {
// First part
e=269500+Math.floor((((map-21)%20)+2+col/15)*3750)+125;
n=Math.floor(6293000-((Math.floor((map-21)/20)+row/16)*4000))-125;
} else {
e=269500+Math.floor((((map-119)%20)+col/15)*3750)+125;
n=Math.floor(6293000-((Math.floor((map-119)/20)+5+row/16)*4000))-125;
}
// Window to the UBD reference
wx1=e-125;
wy1=n-125;
wx2=e+125;
wy2=n+125;
if (!allowStretch) {
adjustToTile();
}
redisplay("zoom",0,true);
}

Post Reply