Telephone Number to Geolocation UK - geolocation

Is there a service that provides latitude and longitude for UK phone numbers?
For example:
Query: 0141 574 xxx, Returns: (55.8659829, -4.2602205) [Glasgow City Centre]
Allow me to stress that I am not looking for a reverse-directory-enquires. I am more interested in 'local area' for things like weather by phone or "Where's my nearest Pizza Shop?"
If this service doesn't exist your suggestions on how to implement it or where to get data from would also be incredibly useful.
I am aware that Ofcom provides a list of area codes with a place name [1] suitable for geolocation, but I have my concerns about resolution. I see this as a particular problem in smaller towns and rural areas where an area code will cover a large geographical area.
Second Example:
Area Code: 01555, Ofcom: Lanark
However:
01555 860xxx is Crossford (4 miles W of Lanark)
01555 77xxxx is Carluke (5 miles NW)
01555 89xxxx is Lesmahagow (5 miles SW)
01555 840xxx is Carnwath (7 miles NE)
Therefore 01555 covers about ~80 sq miles. That's not particularly local.
[1] Ofcom Area Code Tool: http://www.ofcom.org.uk/consumer/2009/09/telephone-area-codes-tool/

You can get a resonable location for numbers allocated to BT.
The "L" digits map to a particular exchange within that area:
(02X) LLLL XXXX (2+8)
(011X) LLL XXXX (3+7)
(01X1) LLL XXXX (3+7)
(01XXX) LLXXXX (4+6)
(01XXX) LLXXX (4+5)
(01XXXX) LXXXX (5+5)
(01XXXX) LXXX (5+4)
For cable providers (especially those using fibre optic delivery), there is sometimes only one exchange per area code and therefore the numbers in each LL range cover the entire area code.
For numbers allocoted to other providers there's a similar problem. Additionally, those numbers may be allocated as VoIP and in use in another area or even in a completely different country. For non-BT numbers location data cannot be relied on.
For people who have moved and kept their number, location data will also be inaccurate.
That said, CodeLook does a reasonable job of showing the right data: http://www.telecom-tariffs.co.uk/codelook.htm

You may have a problem in that not all numerics after area codes are geographic. Some have been block allocated to Cable Providers. I know my own number has belonged to myself and also a person who lived about 5 miles northeast of my current location, the link... we belong to the same cable provider.

What sort of telephone numbers are they? If they are businesses, what do you think of the possibility of searching for the whole number using say, Googles API, and lifting the actual address from the page? - I know thats harder to do than that, just exploring some possibilities ..;-

Related

Find land mass nearest to a geo coordinate

As part of a developer challenge, I am trying to determine the land mass closest to a given coordinate. Obviously, if the point is on land, I use reverse geocoding and can get details. The problem is that if the point is in a body of water, especially oceans, it often won't return anything (Google, Nokia, Bing). I'd like to know that a point 3 miles off the coast of California is 3 miles from USA, or x miles from Japan, y miles from South Korea when a point is reasonably near more than one country. Is there any service that provides this information?
Take a KML file of the world's Maine Regions
Simplify it down to a minimum number of rough polygons.
Take your location, does it lie within one of the polygons?
If your location lies with a polygon, then it is at sea, iterate though the points on the inner and outer boundary to find the nearest one using the Haversine Formula. This will be the nearest point on land.
If your location does not lies with a polygon, you are already on land, do a direct reverse geocode.
Just imagine the world is a bit like the board from the game Diplomacy
Now coalesce the sea areas into larger polygons with holes for islands.
If you're not at sea you must be on the land right?
check older post in here Verify if a point is Land or Water in Google Maps, check the answer about the Koordinates Vector JSON Query service

Is spacial search in P2P network possible?

I want to build a Javascript/HTML5 geolocation based social network and I wonder the best choice of possible architectures. Client-server can be simple to develop but drawback is the system ressources that could be very high, especially because the application must manage moves (worst case: a user that is in a car must see others users that are around him in cars).
Basicaly, in a client-server architecture, server tasks will be :
collects and stores latitude and longitude of the users (could have thousands of them)
makes geo distance search for that user (to get the list of users present around him in a radius)
builds and sends to the client an XML file with position of the users in the list
These 3 operation must be done periodically, every 3 or 5 seconds because I want a "live" map that shows users in the list moving in their environnement (city, town).
All these 3 points could be optimized :
client send his position when moving of 10 meters to reduce amount of data to process
"spherical rectangle" search in MyISAM table with spatial index (use of MBRContains) to off load MySQL database.
common output file : the XML that is sent can be the same if 2 users are located in a radius of x meters (the 2 users are close each-other).
It is hard to make load estimation at this stage but I think client-server architecture is not appropriate for that type of application and peer2peer could be a nice answer if 2 clients could communicate when they are near each other.
My point is:
Is there any methode to make possible a client to blind search other clients that are located in a certain radius without the help of a central server ? (it is possible with UDP broadcast :-)
edit : Correction. UDP Brodcast allow a client to poll a machine wherever it is, in certain range or IP address.
Thank you for your help,
Florent
You will have to have central peers/servers, because you need to centralize some information to be able to perform you functionalities.
I would go for the following:
Assign square miles (or whatever size you want) to specific servers.
Have devices send a 'I am here' message with their coordinates to some dispatcher that will forward these to the correct square mile server for handling.
Have servers register when a device enters a square mile they manage. This could be a central map to make sure a device is registered to one and only one square.
Forward this message to all other devices in the square.
And/or make sure you include to which square this message is intended and make sure the devices checks it before displays it to the user.
Tune the size of the square and the rate of 'I am here' message. That's it.
The answer actually depends on many things so I'll help out with basic strategy. To understand things out you'll need to understand how does Kademlia works (Kademlia is a DHT P2P network that stores information).
In Kademlia at first startup each node picks random ID which is a 160 bit number that represents point in a space of all possible 160 bit IDs.
The ID of the information that needs to be stored is obtained with SHA-1 function (it receives arbitrary string, and outputs 160 bit number that is treated like ID of the information that needs to be stored)
After that you have the ID of the information, you publish it, the information is physically stored on a node that has it's ID close to information ID.
(The illustration is taken from here)
The information is queried via it's ID. Both the information lookups or node lookups takes O(log(N)) hops to obtain the required information. The "XOR" metric is used in Kademlia (in your case it can be ordinary Euclidian metric).
Each node maintains an array of buckets, each bucket contains addresses of nodes that are appropriate to the current bucket. The appropriate'ness is a measure of how close the IDs are. consider example:
0 160
Node 1 ID: 1101000101011111101110101001010...
Node 2 ID: 1101011101011111101110101001010...
Node 3 ID: 1101000101011001101110101001010...
After applying XOR metric to Nodes #1,2 i.e (computing the number that represents the virtual distance between these nodes) we get:
index - 012345678901234
xor - 000001100000000... (the difference is in 5-th msb bit)
order - msb lsb
After applying Xor metric to Nodes #1,3 we get:
index - 012345678901234
xor - 000000000000011... (the difference is in 13-th msb bit)
order - msb lsb
Apparently Node 1 is closer to Node 3 since it has difference in less significant bits than the distance from Node 1 to Node 2. And therefore from a point of view of a Node 1, it's neighbor Node 3 goes to 13-th bucket(higher index means closer IDs), and Node 2 goes to to 5-th bucket which contains a group of nodes that are 5 MSB radixes away from a current node ID.
Such data structure allows each node to know it's surroundings in variety of 160 levels of distances.
Back to your example, to allow efficient geospacial queries you'll need to replace Kademlias XOR metric with ordinary Euclidian metric. In this case you will have your ID's as a 3D or 2D vectors, and unfortunately due to fact that Euclidian metric results with floating point numbers which are not directly suitable for this type of algorithm so you will need to convert them to a discrete binary numbers somehow in a way similar to what XOR function does. After that, finding node's neighboring nodes is a trivial task.
Hope this helps. Oh by the way look to HyperDex, new searchable distributed datastore closely tied to euclidian metric, might help...

Form Google Maps URL that searches for a specific places near specific coordinates

I have the longitude and latitude and the name of the place I want to look for. How do I edit the Google Maps URL so that I obtain all the places (name of the places) near a set of coordinates?
I know I could do this using Google Map API, but just for a link seems a lot of trouble.
You can use the query parameter ll for your lat and long, and you can use the query parameter q for what you want to search.
http://maps.google.com/?ll=39.774769,-74.86084
Or you can
http://maps.google.com/?q=your+query
Yeah, I had the same question for a long time and I found the perfect one. Here are some parameters from it.
https://maps.google.com/?parameter=value
q=
Used to specify the search query in Google maps search.
eg :
https://maps.google.com/?q=newyork or
https://maps.google.com/?q=51.03841,-114.01679
near=
Used to specify the location instead of putting it into q. Also has
the added effect of allowing you to increase the AddressDetails
Accuracy value by being more precise. Mostly only useful if q is a
business or suchlike.
z=
Zoom level. Can be set 19 normally, but in certain cases can go up to 23.
ll=
Latitude and longitude of the map centre point. Must be in that order. Requires decimal format. Interestingly, you can use this without q, in which case it doesn’t show a marker.
sll=
Similar to ll, only this sets the lat/long of the centre point for a business search. Requires the same input criteria as ll.
t=
Sets the kind of map shown. Can be set to:
m – normal map
k – satellite
h – hybrid
p – terrain
saddr=
Sets the starting point for directions searches. You can also add text into this in brackets to bold it in the directions sidebar.
daddr=
Sets the end point for directions searches, and again will bold any text added in brackets.You can also add "+to:" which will set via points. These can be added multiple times.
via=
Allows you to insert via points in directions. Must be in CSV format. For example, via=1,5 addresses 1 and 5 will be via points without entries in the sidebar. The start point (which is set as 0), and 2, 3 and 4 will all show full addresses.
doflg=
Changes the units used to measure distance (will default to the standard unit in country of origin). Change to ptk for metric or ptm for imperial.
msa=
Does stuff with My Maps. Set to 0 show defined My Maps, b to turn the My Maps sidebar on, 1 to show the My Maps tab on its own, or 2 to go to the new My Map creator form.
reference : http://moz.com/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters
additional info:
http://maps.google.com/maps?q=loc:
put in latitude and longitude after, example:
http://maps.google.com/maps?q=loc:51.03841,-114.01679
this will show pointer on map, but will suppress geocoding of the address, best for a location without an address, or for a location where google maps shows the incorrect address.
As of Jan 2018 (update: still works in May 2022) the latest URL is:
https://google.com/maps/search/*your search string* (address, landmark, city, etc. Spaces are ok)
Examples:
https://google.com/maps/search/empire state building
https://google.com/maps/search/1600 Pennsylvania Ave NW, Washington, DC 20500
You can use the new URL for Google Maps: https://www.google.com/maps/#39.774769,-74.86084,18z
equivalent to http://maps.google.com/?ll=39.774769,-74.86084.
39.774769 is the latitude and -74.86084 is longitude and 18z is 18 zoom level.
Google now has a documentation page dedicated to Maps URLs:
https://developers.google.com/maps/documentation/urls/guide
An API key is not required.
Manipulating one of the examples, I came up with this URL scheme that fits your question:
https://www.google.com/maps/search/<search term>/#<coordinates>,<zoom level>z
A valid example of this would be:
https://www.google.com/maps/search/pizza/#41.089988,-81.542901,12z
This should show you all of the pizza places around Akron, Ohio.

Can longitude and latitude change?

I'm working on a GeoTargeting application. I'm curious if longitude and latitude of a point on the earth can change?
If you know the exact position of the statue of liberty how sure is it that longitude and latitude will stay the same.
Does it change according to the season, time in the year, or slowly over time
Wikipedia to the rescue:
The surface layer of the Earth, the
lithosphere, is broken up into several
tectonic plates. Each plate moves in a
different direction, at speeds of
about 50 to 100 mm per year. As a
result, for example, the longitudinal
difference between a point on the
equator in Uganda (on the African
Plate) and a point on the equator in
Ecuador (on the South American Plate)
is increasing by about 0.0014
arcseconds per year.
It depends on the map projection variables you use. Currently WGS-84 is used mostly.
The same point can have different coordinates depending on the variables. They do not differ a lot, I remember the difference between EUR-50 (or something like that) and WGS-84 was at most 50 meters or something.
You're tangentially referring to geodetics, which is the science of modelling (representing) the shape of the earth. So while a physical location may not change, the datum (model) used by a geodetic coordinate system will change, fortunately this does not happen frequently.
In North America NAD83 is the mostly widely used datum, which replaced NAD27.
Did I mention that Geographic Information Systems (GIS) was my foray into software development?
Yes. Zip codes get split all the time, and doing so would move the center of the zip code to a new location.
47.554 always equals 47.554
But if the shape of the earth changes or you are using different methods of calculations (there are plenty) or if the input data changes in precision or if if your compiler treats floating point differently..
you'll end up in different long/lat

Is there a formula to convert from Thomas Bros Map page & grid to a latitude/longitude?

I'm working on a project that contains Thomas Brothers Map page and grid numbers. Is there a way to programatically convert from this map page to a latitude & longitude?
An Example would be for the intersection of the US101 & I405 freeways.
ThomasBrothers: 561-3G (page-grid)
Not that I know of, but I don't have a lot of experience with Thomas bros maps. Are you talking about printed version of the maps or is there a link somewhere to an online map?
If you just need a few lat/longs, then you can look up the locations that correspond to the grid and get the lats and longs manually at many websites, including http://itouchmap.com/latlong.html
If you provide a link to a Thomas bros map that you are using, I might be able to help further.
By looking at the link above, you can determine that US 101 and I-405 has a latitude of 34.16073390017978 and a longitude of -118.46952438354492.
Your best source would be the map publisher. If they choose to help, someone there can tell you exactly what you need to know. If they won't help you, it's unlikely that they've released the information to anyone else.
If that's the case, you could do some work by hand to correlate one point from the map grid to your target coordinate system. Effectively, you could reverse engineer a mapping "datum" for each page. You'd also have to know what map projection was used to render the maps, so that you can calculate the transform from the map coordinates to the geographic coordinates as you move away from your "origin". Finally, you'll need to establish the orientation of the map, since different notions of "north" exist.
It sounds like the Thomas maps use a new grid for every page, rather than bleeding the grid continuously from page to page. If that's the case, you'll have to correlate one point on each map. For example, find a spot where a map grid intersection coincides with a notable road intersection. Then you can find the coordinates of the road intersection using a map with latitude and longitude (a topographic map, TerraServer, etc.). Doing this with two points on the same vertical grid line should help you establish the north used on the map as well.
The short answer is that each of the nine regions has a grid derived from a Lambert conformal conic projection with custom parameters, so you cannot write a conversion program without the parameters.
I've also got ThomasBros. pages that I would like to convert to lat/long for lookup against Google Maps API. They also provided something called TBXY ... not sure what this is -- perhaps some notation for GPS/lat/long?
<Area>"El Cajon"</Area>
<ThomasBrothers>"1297 5E"</ThomasBrothers>
<TBXY>"6481390:1827008"</TBXY>
Thomas Brothers Maps invested a lot when developing their GIS system to create their digital mapping system. Though the first "digitally produced" map was Sacramento County-1990, the development began back in 1986. I expect that their map projection equations are a well guarded trade-secret, which Rand McNally now owns. I'd don't know those equations, but would also like to know them.
There are 9 projections covering the 48 states. If you know the equations for Los Angeles, it is valid across California & Nevada. Oregon & Washington have their own projection. Arizona, New Mexico, Colorado, and Utah share another projection.
I do know this...
As many know, the page grid is an exact 1/2 mile square, or 2640 feet by 2640 feet. The coordinate measurement unit is 1 foot.
To determine the Thomas Brothers XY Coordinate, get one or more of the Thomas Guide CD- ROM maps, which were recently discontinued. The last ones produced for certain California counties were the 2008 edition. Last editions for Seattle, Portland, Las Vegas, and Phoenix/Tucson were the 2007 edition. Each is still available on the Rand McNally website for $20.
When you geo-code a group of addresses, you'll see an output file with the TGXY coordinates and Lat/Lon for the addresses you specified, and the page # and grid that point is in. Once that file is open, you can click on the map to add additional geo-coded points, which will also provide both the coordinates. The output file is saved in an Access database ".mdb" file.
If you know a lot about map projections or solid geometry, the set of corresponding TGXY and Lat/Lon coordiantes will provide you some good data for testing.
As you mentioned San Diego Page 1297, I'll provide its bordering coordinates.
West x=3062760
East x=3086520
North y=0985040
South-y=0966560
This is not in range of the "TBXY" you found on Google. Maybe it's the same projection, with a relocated origin.

Resources