direction routing - latitude-longitude

Is there any link like this "http://maps.google.com/maps?daddr=San+Francisco,+CA&saddr=cupertino"...where instead of address i can pass latitude longitude values of the places

http://maps.google.co.uk/maps?geocode=&q=51+N+5+E
for 51 N and 5 E

Related

SQL Sever Geospatial, find location of point at a distance along a linestring

We are investigating migrating a prototype into SQL Server (azure).
We have LineStrings that also have M values. What we would like to do is given another M value find out what its geographical location is.
To aid your visualisation, here is a real-world example:
I have a linestring that represents a flight path. Because the flight goes up and down the distance the plane has actually moved is not the same as the total length of the linestring. We have calibrated M values as a part of the linestring but need to be able to plot on it where a given event occurred. All we know about this event is its M value.
SET #g = geometry::STGeomFromText('LINESTRING(1 0 NULL 0, 2 2 NULL 5, 1 4 NULL 9, 3 6 NULL 15)', 0);
Given something like the above, what is the lat and long of a point with an M value of 8?
This should be an equivalent postgis's ST_LocateAlong
The M value is not a time, but a distance. It should be understood that this distance is arbitrary and does not directly relate to the length of the line and is calibrated against known points. This is due to the set being based on historic data that is in no way accurate by today's standards.
*Note I am not sure if I have Nulled the Z or M value. The extra parameter we are considering here is the M only.

Computing pairwise distances in Hive

I have a dataset in Hive that looks like this:
Point Latitude Longitude
A 40.3 74.8
B 12.5 -45.1
C -32.7 87.6
D 23.9 -67.2
... ... ...
How can I obtain a matrix with the distance of each point from all the other points? That is, the distances AB, AC, AD, BC, BD, CD and so forth. If it is easier to have the output in a linear format, that is fine as well. I want to be able to do this all using Hive Query Language.
Edit: The data contains hundreds of thousands of rows. In the end I want to be able to identify all points within a certain radius of a given point. So if there a way to reduce the number of calculations by first filtering out points or using some approximation, I am open to that as well.
One possible solution for this can be that you do a join of the same on itself without any condition. The output would be something like this
query1 query1 query1 query2 query2 query2
Point Latitude Longitude Point Latitude Longitude
A 40.3 74.8 A 40.3 74.8
A 40.3 74.8 B 12.5 -45.1
A 40.3 74.8 C -32.7 87.6
A 40.3 74.8 D 23.9 -67.2
...
Use the above output as a subquery and compute the distances between the points. Basically a concat of query1.Point and query2.point would give you the pair and the distance function on latitude and longitudes will give you the distance between them.
Hope this helps.

GPS sentence: GPRMA

I'm writting a NMEA sentences parser, and couldn't find ant documentation about GPRMA sentence except that it is: "Recommended minimum specific Loran-C data". does anyone know what is the meaning of this sentence?
does the longitude and latitude in it refer to the gps device current location?
thanks
From the very handy guide at http://aprs.gids.nl/nmea/#rma:
eg. $GPRMA,A,llll.ll,N,lllll.ll,W,,,ss.s,ccc,vv.v,W*hh
1 = Data status
2 = Latitude
3 = N/S
4 = longitude
5 = W/E
6 = not used
7 = not used
8 = Speed over ground in knots
9 = Course over ground
10 = Variation
11 = Direction of variation E/W
12 = Checksum
Now, LORAN data is not GPS. It is similar, but an old standard of ground stations that were used to find positions. So to specifically answer your question, no, this is not GPS data. If you want GPS data, you will need $GPRMC.

whats A is representing in GPS co-ordinate point?

I am getting GPS information from a device like this
052340.000,A
32.46275,N
75.310415,E
I know N is for north and E for east but what A is representing?
Looking at the value, and some of the other comments, it is unlikely to be an altitude in meters. If this has been extracted from a GPGLL NMEA sentance, the value is time of fix, e.g. 05:23:40, as per the following
$GPGLL
Geographic Position, Latitude / Longitude and time.
eg2. $GPGLL,4916.45,N,12311.12,W,225444,A
4916.46,N Latitude 49 deg. 16.45 min. North
12311.12,W Longitude 123 deg. 11.12 min. West
225444 Fix taken at 22:54:44 UTC
A Data valid
eg3. $GPGLL,5133.81,N,00042.25,W*75
1 2 3 4 5
1 5133.81 Current latitude
2 N North/South
3 00042.25 Current longitude
4 W East/West
5 *75 checksum
$--GLL,lll.ll,a,yyyyy.yy,a,hhmmss.ss,A
llll.ll = Latitude of position
a = N or S
yyyyy.yy = Longitude of position
a = E or W
hhmmss.ss = UTC of position
A = status: A = valid data
Altitude. it would depend on the device as to what units it is. from the number shown in your example i would doubt it is meters, unless you are in an aeroplane.
more info here

Find best longitude/latitude match from an array of possible locations

I have a plist with 12 objects with unique keys (let's say 1, 2, 3, etc). Each object contains an array (key: clubLocations) with 100 - 200 objects.
Each object in the clubLocations array contains a longitude and latitude key with a club's location.
I would like some assistance in creating a method which loops through each object for every clubLocations in every 12 objects and finds out which clubLocation is the closest match to the users coordinates.
So basically object 1/2/3/etc -> clubLocations objectAtIndex:0/1/2/3/etc -> best match?
I have the user's coordinates, so "just" need assistance to find the closest locations from my plist. Thank you in advance and please do not hesitate to ask in a comment if I am not making myself clear enough.
In pseudocode:
min_distance = MAXINT
closest = None
for obj in objects:
for club in obj.clubLocations:
d = distance(club.longitude, club.latitude, user.longitude, user.latitude)
if d < min_distance:
min_distance = d
closest = club