I've just noticed Streetmap now has 25K ordnance maps too - and not skewed like Multimap ๐
[url= http://www.streetmap.co.uk/map.srf?X=413250&Y=473450&A=Y&Z=115 ]** see here **[/url]
now if they'd just allow us to draw onto the maps like Google...
PS sorry if someone has already pointed this out ๐
draggable too. Nice.
It changed a couple of months back ๐
Yes, I want an OS map, combined with Bikeley...
Pity they're not making them available for OS Openspace ๐
Displaying routes over 50k is ok but over 25k would be better
www.bikehike.co.uk
lets you plot on an OS map, only 50k but still great for free!
Thanks for that Simon (and also to the others suggesting route planning apps - those also look useful). I'd certainly not noticed before, despite Streetmap having always been my favourite online mapping (have been using Multimap more recently since they introduced 1:25k mapping). Not only is it not skewed, it's also better res. than either OS or Multimap - fortunately I now have unlimited overnight bandwidth for ripping, as higher res presumably means bigger file sizes!
what do you mean by skewed?
On multimap 1:25k, the EW OS grid lines aren't horizontal, and the NS grid lines aren't vertical. They are also curved (though you can't really see that from the small area available). It does of course depend what you mean by skewed, since the OS grid lines are based on a distorting projection, and in fact with the multimap projection EW latitude lines are horizontal and NS longitude lines are vertical!
Err OS let you do this on their site.
< http://explore.ordnancesurvey.co.uk/>
this is what I've done:
[url= http://www.bogtrotters.org/show_overlayy25.php?route=144&album=944&scale=1&base=25 ]example route using streetmap data[/url]
Careful Simon - you're almost certainly breaking Streetmap T&Cs with that (can't be bothered to go and check, but would be very surprised if they did allow that, and I'd expect they may well notice).
...though I'm curious how you got the "loc2" numbers for the images, as I can't work that one out at the moment - or did you just nav to all the locations within Streetmap? ๐ฏ
Streetmap don't have crown copyright mark on their page at all either!
you're almost certainly breaking Streetmap T&Cs with that
I'm just adding a copyright link to them - I've been doing that for my popup maps for 2 years
I have not copied the data, it's still on their servers
I have not copied the data, it's still on their servers
I'm aware of that (hence the comment about image URLs above if you missed the edit - any comment on that?) However I'm still not convinced they'll be happy about hotlinking their image data.
...though I'm curious how you got the "loc2" numbers for the images, as I can't work that one out at the moment - or did you just nav to all the locations within Streetmap?
one time, yes ๐
Oh, and I have an OS licence for displaying maps
..."loc2" does appear to follow some sort of logical pattern, so I think it's probably possible to work it out. Probably put there on purpose to try and stop people ripping ๐
This all takes me back to the days before I owned Anquet maps (1:25k digital mapping is rather prohibitive to buy!)
However I'm still not convinced they'll be happy about hotlinking their image data.
I've added a link back to their site, and it will be more obvious when I've finished the development. I expect the small amount of data hotlinked will not bother them if I also deliver a bit of traffic... and as we saw a couple of months back, it's quite easy to detect hot linking on a server and serve something different instead - but they obviously choose not to.
..."loc2" does appear to follow some sort of logical pattern
it does, but it has escaped me to date ๐
I'll report back if and when I work it out. Some sort of XOR hashing function involving all parts of the main URL I think.
If you're interested, loc2 is XOR of ASCII values for the main image URL (ie the "SD64SW72" bit) all XORed with 0x28 (I think that has some relation to the ASCII for "gif", but can't quite work it out, and it doesn't really matter). You then take that number and rotate left by 3 bits (by rotate I mean the LSB becomes the MSB) - in C, this can be coded as:
loc2 = ((loc2&7) << 5) | ((loc2&0xF8) >> 3);
A quick bit of scratch code for the whole thing is:
strRef.Format("SD%d%d%c%c%d%d", x/100, y/100, (y%100)<50?'S':'N', (x%100)<50?'W':'E', (x/5)%10, (y/5)%10);
unsigned char loc2=0x28;
for (i=0; i<strRef.GetLength(); i++)
{
loc2 ^= strRef[i];
}
loc2 = ((loc2&7) << 5) | ((loc2&0xF8) >> 3);
strURL.Format("http://streetmap.co.uk/img.srf?image=%s.gif&loc2=%.2x&type=O25", strRef, loc2);
cheers aracer ๐ Have you worked out the conversion from OS grid pos to file name yet ? (ie the SD44NE28 bit)
The first line of my second bit of code does most of that - x and y are the 6 figure (ie 3 figures each) ref within the two letter grid square. There's stuff on the web (possibly OS website?) for calculating grid square letters if you need that. In English:
Two letters for grid square (OS Landranger coords)
First digit of Easting within grid square
First digit of Northing within grid square
'S' if second digit of Northing is 0-4, 'N' if second digit of Northing is 5-9
'W' if second digit of Easting is 0-4, 'E' if second digit of Easting is 5-9
(second and third digits of Easting divided by 5) modulo 10
(second and third digits of Northing divided by 5) modulo 10
Basically they first divide the country into normal Landranger squares denoted by two letters. Each of those is then divided into 10km squares with the reference for each square being the next two digits. Then divide each 10km by 10km into 4 quadrants, SW, SE, NW and NE. Then finally divide each 5km resulting square into 500m squares denoted by the last two digits. Streetmap has always done their image squares like this, so it's not something new for me ๐
thanks [b]aracer[/b], I wasn't paying attention to the C code ๐
I puzzled over it for ages but I guess codebreaking isn't my forte. I just ran the loc2 in PHP and it works perfectly!
I just ran the loc2 in PHP and it works perfectly!
What do you mean by that (not into PHP)?
Before I decoded it I did find that a call to "http://streetmap.co.uk/ajaxtp.srf?x=400000&y=400000&z=115" (for example - x and y there are National Grid numbers) did return correctly formatted image and loc2 numbers (the loc2 is the two digit number straight after the first @) by monitoring the HTTP traffic with Fiddler and examining the Javascript code. That helped a lot with the codebreaking, as I could quickly and easily generate loc2 codes - though it's also something which is my forte (usual technique being to try changing one thing at a time and see what happens).
Edit: made Streetmap URL non-clicky so they don't trace it back here if they check their logs!
What do you mean by that (not into PHP)?
sorry, I meant I tried the XORs of the ASCII and then the rotate bits. Yes I tried the AJAX call but it didn't work from my own webpages
HTH ๐
Cheers guys - some great tools I have been looking for there.
sorry aracer - your XOR doesn't seem to work ๐
chk: 7b c: 53 = S
chk: 3f c: 44 = D
chk: 0d c: 32 = 2
chk: 34 c: 39 = 9
chk: 67 c: 53 = S
chk: 22 c: 45 = E
chk: 1b c: 39 = 9
chk: 2e c: 35 = 5
SD29SE95: 35 # c5
Sorry - just worked that out sfb, and was coming back here to comment! I guess I was looking at a limited subset of squares all with 0 as the last digit (thought I'd varied that, but obviously not), since it's that which seems to be different to what I'd thought. That digit's essentially shifted one bit less than the rest, which also explains the 0x28 offset.
I'll try and come up with a simpler way to describe it, but what you need to do is the same as before for the first 7 characters, but for the final digit, rotate it one bit to the right before XORing it and then rotate the whole lot 3 bits left (a simpler method is to shift the result one bit left before XORing with the final digit, and then swap the nibbles at the end). There is no longer a 0x28 offset, so start with 0x00.
e.g.
chk: 53 c: 53 = S
chk: 17 c: 44 = D
chk: 25 c: 32 = 2
chk: 1c c: 39 = 9
chk: 4f c: 53 = S
chk: 0a c: 45 = E
chk: 33 c: 39 = 9
Shift one bit left, chk: 66
chk: 53 c: 35 = 5
Swap nibbles, chk: 35
Which gives you Donald Campbell.
C code:
strRef.Format("SD%d%d%c%c%d%d", x/100, y/100, (y%100)<50?'S':'N', (x%100)<50?'W':'E', (x/5)%10, (y/5)%10);
unsigned char loc2=0;
for (i=0; i<strRef.GetLength()-1; i++)
{
loc2 ^= strRef[i];
}
loc2 <<= 1;
loc2 ^= strRef[i];
loc2 = ((loc2&0xf) << 4) | ((loc2&0xf0) >> 4);
cheers [b]aracer[/b], I've got that working fine now ๐
[url= http://www.bogtrotters.org/show_overlayy25b.php?route=127&album=925&base=25 ]here[/url]