Main Content
Ordnance Survey - using a 'Get a map' Archive - Originally posted on "The Horse's Mouth" - 2005-05-22 18:04:12 - Graham Ellis
Sunday, and a chance to play. I've been interested in the possibilities offered by Ordnance Survey's "Get a map" service - which allows (with limitations described on their site ) their mapping to be captured and used on web sites in a not-for-profit way.
I've started to put up a whole load of pictures for visitors to Melksham and the surrounding area and I felt that I would like to be able to show where each of the pictures was taken on a map. So ... I've spent the last hour writing a PHP script to get my maths right.
Image produced from the Ordnance Survey Get-a-map service. Image reproduced with kind permission of Ordnance Survey and Ordnance Survey of Northern Ireland.
For the more technical readers, I've put a copy of the script into our PHP / graphics, etc training area. It takes care of all the letters and digits of a grid reference - e.g. ST914628, and you can give it any map captured from the OS provided that you tell it the centre grid reference of the image and how wide (in kilometres) the area covered is. It does the rest!
Some other articles
H999 - Additional PHP Material Image indexer / thumbnail display scripts in PHP Catchable fatal error in PHP ... How to catch, and alternative solutions such as JSON Arrays of arrays - or 2D arrays. How to program tables. Exception handling in PHP If nothing, make it nothing. Extra PHP Examples PHP Techniques - a workshop Flipping images on your web page Script to present commonly used images - PHP Copyright and theft of images, bandwidth and members. More PHP sample and demonstration programs Ordnance Survey Grid Reference to Latitude / Longitude Converting from postal address to latitude / longitude Controlling and labelling Google maps via PHP PHP Standalone - keyboard to screen Drawing hands on a clock face - PHP Drawing dynamic graphs in PHP Sorting people by name in PHP Parallel processing in PHP Dates, times, clickable diarys in PHP Display an image from a MySQL database in a web page via PHP Syntax checking in PHP Reporting on the 10 largest files or 10 top scores PHP - a team member leaves Check your user is human. Have him retype a word in a graphic Hot answers in PHP Presentation, Business and Persistence layers in Perl and PHP PHP Image viewing application PHP - setting sort order with an associative array Merging pictures using PHP and GD Running a Perl script within a PHP page Double Dollars in PHP Stand alone PHP programs Time calculation in PHP the array returned by preg_match_all More maps This article What and why for the epoch PHP and natural sorting H309 - Maps, Graphics and Geographics Image indexer / thumbnail display scripts in PHP Adding a PHP build option, rotating an image based on camera data, and a new look at thumbnails in PHP The changing face of Christmas Where are you? How to write a geosensitive application Fpdf - generating .pdf documents easily from your PHP program QR codes with marketing logos embedded QR codes - graphics images that provide quick phone links UK Mapping Data - and more to come - under government Open Data measures Needle in a haystack - finding the web server overload Computer Graphics in PHP - World (incoming data) to Pixel (screen) conversion Finding and diverting image requests from rogue domains An image from a website that occasionally comes out as hyroglyphics Server logs - drawing a graph of gathered data Protecting your images from use out of context Uploading a document or image to its own URL via a browser Redirecting to your main domain for correct security keys Reducing image size on digital photos - PHP Dynamic / changing images on your web page Geocoding - converting address to latitude / Longitude with PHP via Google World Flags in your PHP pages Images for Christmas Making it all worthwhile Ever had One of THOSE mornings? Dynamic maps / geographics in PHP All around the world? addslashes v mysql_real_escape_string in PHP Gant charts - drawing them with a PHP script Ordnance Survey Grid Reference to Latitude / Longitude Converting from postal address to latitude / longitude Controlling and labelling Google maps via PHP Drawing hands on a clock face - PHP Drawing dynamic graphs in PHP Display an image from a MySQL database in a web page via PHP PHP Image viewing application Merging pictures using PHP and GD This article G902 - Web site techniques, utility and visibility Almost so wrong, but perhaps it's right for some? Effect on external factors on traffic to our web sites - an update Selecting RECENT and POPULAR news and trends for your web site users Well House Consultants, Well House Manor, First Great Western Coffee shop, TransWilts / 2014 web site reports Facebook marketing - early experiences How do I post automatically from a PHP script to my Twitter account? More or less back - what happened to our server the other day Web site - fully back! Helping search engines with appropriate 400 error codes TV show appearance - how does it effect your web site? An email marathon Some traps it's so easy to fall into in designing your web site Legal change - You need to obtain user consent if you use cookies on your website Short Web Addresses for Melksham QR codes with marketing logos embedded Some TestWise examples - helping use Ruby code to check your web site operation Promoting a single one of your domains on the search engines How big is a web page these days? Does the size of your pages matter? Learning more about our web site - and learning how to learn about yours Sharing the user experience - designing a form with the customer in mind Who is knocking at your web site door? Are you well set up to deal with allcomers? Automed web site testing scripted in Ruby using watir-webdriver Google +1 - what is it? Finding and diverting image requests from rogue domains Looking back at www.wellho.net Making the most of critical emails - reading behind the scene Retaining web site visitors - reducing the one page wonders How to set up short and meaningfull alternative URLs Is it worth it? How to run a successful online poll / petition / survey / consultation Web site traffic - real users, or just noise? Analysing Google arrivals by country of origin Status Page / breaks of service in early December Removal of technical resources from this site Writing with our customers words Koulutus, Open Source tietokone kielillä ldning, Open Source dator sprÃ¥k ldning, Open Source dator sprÃ¥k Opplæring, Open Source datamaskinen sprÃ¥k Uddannelse, Open Source computer sprog Opleiding, Open Source computertalen Formação, Open Source computador lÃnguas Ausbildung, die Open-Source-Sprachen Formazione, Open Source computer lingue Formación, de los lenguajes de código abierto Formation, des langages Open Source How important is a front page ranking on a search engine? Static mirroring through HTTrack, wget and others Web Site Loading - experiences and some solutions shared Cooking bodies and URLs Plagarism - who is copying my pages? Making our things easier to find How to avoid duplicating web page maintainance Find the link A few of my favourite things Web Bloopers - good form design - avoiding pitfalls I have been working hard but I do not expect you noticed Which country does a search engine think you are located in? Ever had One of THOSE mornings? Who is watching you? Rapid growth leads to server move How do Google Ads work? Kiss and Book To provide external links, or not? PHP course dot co, dot uk Online hotel reservations - Melksham, Wiltshire (near Bath) Colour, Composition or Content Where in the world / country is my visitor from? Perl, PHP or Python? No - Perl AND PHP AND Python! Ongoing Image Copyright Issues, PHP and MySQL solutions Script to present commonly used images - PHP A time to update pictures Above the fold with First Great Western Stuffing content into a web page - easy maintainance What proportion of our web traffic is robots? What brought YOU to our web site? Simple but effective use of mod_rewrite (Apache httpd) From Web to Web 2 Two new pages / sites Finding resources - some pointers Sorting out for a site map Drawing dynamic graphs in PHP Above the fold Our search engine placement is dropping. Search engine placement - long term strategy and success Training on Cascading Style Sheets Santa at the station Driving customers away Visibility Effective web campaign? Finding the language preference of a web site visitor Horse and Python training Where is a web site visitor browsing from Protecting images from theft Mirroring a dynamic site Keeping the visitors happy and browsing Denial of Service ''attack'' Bigger Box Campaign Getting favicon to work - avoiding common pitfalls Dynamic Web presence - next generation web site New Navigation Aid - Launch of My Wellho Form Madness What brings people to my web site? CMS - the minefield of Choices Graveyard pages Frightening and from-friend viruses and spams More maps This article What language is this written in? Growth pains Colour blindness for web developers The Iconish language Cover all the options An apology to Mr Boneparte Our most popular resources Information request forms, cleaning up spam Putting a form online Responding to spam Who are all these visitors? Searching for numbers Allow for peak traffic on your web site Your personal Google ranking The hunt for unique words Data Mining Implementing an effective site search engine Colour for access A case of case URLs - a service and not a hurdle No more 'Error 404' pages. Something better. Web design platoon Skills and responsibilities A213 - Commercial and Legal Aspects Can a legitimate forum post become illegal a year later? Change to Libel and Defamation laws from 1st January 2014 An easy way to comply with the new cookie law if your site is well designed Google Analytics and the new UK Cookie law Legal change - You need to obtain user consent if you use cookies on your website Web Sites - Subject to Advertising Standards from 1st March - check your sites Catering in Syracuse, the Saigon Cafe, stolen images and Christmas The legal considerations of your web presence - revisited Freedom of Information - consideration for web site designers Re-using our pictures Leaping dog, Leaping horse, copyright of old masters Beware - giving copyright away when you upload a picture - Dogs Trust Getting hold of the wrong end of the stick Validating Credit Card Numbers Who is watching you? Ongoing Image Copyright Issues, PHP and MySQL solutions Does anyone understand Lithuanian? Copyright and theft of images, bandwidth and members. Getting the community on line - some basics UK legal requirements for your commercial web site Training on Cascading Style Sheets Making pages clearer - easy Disability Discrimination Act Compliance Remember a site's non-technical issues too Watch your Google profile Domain Listing Center and Domain Registry of America Copyright - how much can I legally copy? More maps This article Colour blindness for web developers Responding to spam Colour for access