Converting street directory grid references to coords
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
Converting street directory grid references to coords
Hi all,
Does anyone have any code/data/links/info/ideas/(complaints ) 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
Does anyone have any code/data/links/info/ideas/(complaints ) 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
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.
<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.
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
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
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
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.
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
-
- 150 or more caches found
- Posts: 425
- Joined: 03 June 03 5:12 pm
- Location: Summer Hill, Sydney
- Contact:
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 .
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
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
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
- Two Goth Geeks
- 50 or more caches found
- Posts: 281
- Joined: 05 April 03 7:02 pm
- Twitter: TwoGothGeeks
- Location: Sydney, Australia
- Contact:
-
- Posts: 1329
- Joined: 29 March 03 6:04 pm
- Location: Gladesville, Sydney
- Contact:
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 ).
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);
}
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);
}