Yup, you're quite right, realised that just after I hit 'send'! I'm working on getting boundary line into a DB as we speak, but it's quite a monster! Stuart Harrison Webmaster Lichfield District Council www.lichfielddc.gov.uk <http://www.lichfielddc.gov.uk/> Tel: 01543 308779 Twitter: http://twitter.com/pezholio <http://twitter.com/pezholio> LinkedIn: http://www.linkedin.com/in/pezholio
________________________________ From: [email protected] on behalf of Matthew Somerville Sent: Thu 4/8/2010 4:43 PM To: mySociety public,general purpose discussion list Subject: Re: [mySociety:public] UK Postcodes and a teensy favour Harrison, Stuart wrote: > http://www.uk-postcodes.com/latlng/{lat},{lng} > Should do what you want it to do :) Isn't that actually the council for the closest postcode to that lat/lon though, which isn't precisely what's asked for. > Nice. On a slightly related note, is there any published database or API > that allows me to get from either a latitude/longitude or OS grid > reference to local authority names, without needing to know the postcode > first? I wrote some simple Django example code at the weekend to import Boundary-Line into a database: http://github.com/dracos/opendata-boundaryline It's then as trivial as: point = Point(400000, 300000) Council.objects.filter(shape__contains=point) I'd certainly recommend getting shapefiles into some sort of spatial database nowadays, it makes things very easy. ATB, Matthew _______________________________________________ Mailing list [email protected] Archive, settings, or unsubscribe: https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring.
_______________________________________________ Mailing list [email protected] Archive, settings, or unsubscribe: https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public
