latitude-longitude

Preferred order of writing latitude & longitude tuples

独自空忆成欢 提交于 2019-11-28 15:34:52
问题 When dealing with GIS source code you often need to write latitude and longitude coordinate tuples. E.g. in Google Maps links (123, 456): http://maps.google.com/maps/ms?msid=214518704716144912556.00046d7689a99e95b721c&msa=0&ll=123,456&spn=0.007996,0.026865 Which is preferred order (and why?) latitude, longitude longitude, latitude I have seen both being used in various systems and I hope to find some evidence to stick with other one. 回答1: EPSG:4326 specifically states that the coordinate

proper/best type for storing latitude and longitude

浪尽此生 提交于 2019-11-28 15:34:14
In a system level programming language like C, C++ or D, what is the best type/encoding for storing latitude and longitude? The options I see are: IEEE-754 FP as degrees or radians degrees or radians stored as a fixed point value in an 32 or 64 bit int mapping of an integer range to the degree range: -> deg = (360/2^32)*val degrees, minutes, seconds and fractional seconds stored as bit fields in an int a struct of some kind. The easy solution (FP) has the major down side that it has highly non uniform resolution (somewhere in England it can measure in microns, over in Japan, it can't). Also

Is it possible to get the latitude and longitude of a draggable marker in a map (using javascript) into a form in HTML?

我们两清 提交于 2019-11-28 14:33:29
I am trying to obtain the Latitude and longitude of a draggable marker in google maps. I need this values to go directly into the value attribute in an <input type="text"> . I've managed to do this, the only problem is that I don't know how to add a geocoder so the user can type their own address and get the lat and lng, but they also need to be albe to drag the marker in case google maps isn't accurate. I'll put my code down here. Appreciate if anyone could help. HTML <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false

how to get lat and long from sdo_geometry in oracle

岁酱吖の 提交于 2019-11-28 13:45:23
how can i get lat and long from point in oracle? Like this: MDSYS.SDO_GEOMETRY(2001,4326,NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1), MDSYS.SDO_ORDINATE_ARRAY(51.702814,32.624736)) The notation you show is not the best one for representing single 2D or 3D points. The common and most efficient way to encode those points is this: SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(51.702814,32.624736,NULL),NULL,NULL) All the GIS tools I have seen use this notation. The one you show is valid too - it just uses more storage. But the two notations are fully functionally equivalent. Using the compact notation, getting

Lat Long to Minutes and Seconds?

老子叫甜甜 提交于 2019-11-28 13:30:35
Google Maps gives me the Lat and Long of a location in decimal notation like this: 38.203655,-76.113281 How do I convert those to Coords (Degrees, Minutes , Seconds) 38.203655 is a decimal value of degrees. There are 60 minutes is a degree and 60 seconds in a minute (1degree == 60min == 3600s). So take the fractional part of the value, i.e. 0.203655, and multiply it with 60 to get minutes, i.e. 12.2193, which is 12 minutes, and then repeat for the fractional part of minutes, i.e. 0.2193 = 13.158000 seconds. Example in python: def deg_to_dms(deg): d = int(deg) md = abs(deg - d) * 60 m = int(md)

android google map finding distance

对着背影说爱祢 提交于 2019-11-28 12:42:25
I am trying to find distance between two locations. I have longitudes and latitudes and I can calculate Euclidean distance. But I want to find road distance. I mean, , I want to calculate the distance of the road that I am going on while going to destination from source. In this case how to calculate this? The easiest way would be to use the Google Directions API to get the directions, this gives you a list of all the points along the route (and the total distance). Check out : http://code.google.com/apis/maps/documentation/directions/ If your not sure how to do this let me know and i'll post

Latitude, Longitude Grabber

我只是一个虾纸丫 提交于 2019-11-28 11:25:16
What I would like to do is create app where when anyone clicks on the map object and two fields get filled with latitude and longitude at every click. Is there sample code of Google Maps V3 JavaScript API (Geocoding API) somewhere out there that does something like that? You can achieve this with google.maps.event' LatLng property: Something like this would show how it works. Here is a JSFiddle Demo: google.maps.event.addListener(map, 'click', function(event){ alert('Lat: ' + event.latLng.lat() + ' Lng: ' + event.latLng.lng()); }); Where map is your google map object. Yes the example is in V2

How do I convert coordinates to a Latitude & Longitude?

久未见 提交于 2019-11-28 10:16:11
I am reverse engineering a transportation visualization app. I need to find out the latitude for the origin of their data feed. Specifically what XY 0,0 is. The only formulas I have found calculate distance between two points, or location of a bearing/distance. They use the XY to display a map in a very legacy application. The XY is in FEET. I have these coordinates: 47.70446615506108, -122.34469839507263: x=1268314, y=260622 47.774182540800616,-122.3412994737105: x=1269649, y=286031 47.60024792289405, -122.32767331735774: x=1271767, y=222532 47.57012494413499, -122.29129609983679: x=1280532,

Converting from Decimal degrees to Degrees Minutes Seconds tenths.

最后都变了- 提交于 2019-11-28 09:23:15
Is there some sample conversion code in C# to go from decimal degrees to Degrees, Minutes, Seconds, Tenth? I think this should do it. double decimal_degrees; // set decimal_degrees value here double minutes = (decimal_degrees - Math.Floor(decimal_degrees)) * 60.0; double seconds = (minutes - Math.Floor(minutes)) * 60.0; double tenths = (seconds - Math.Floor(seconds)) * 10.0; // get rid of fractional part minutes = Math.Floor(minutes); seconds = Math.Floor(seconds); tenths = Math.Floor(tenths); Here is a class I made time ago. public class SexagesimalAngle { public bool IsNegative { get; set; }

Distance from point to line on Earth

自古美人都是妖i 提交于 2019-11-28 08:50:23
I need something as simple as "Subject 1.02: How do I find the distance from a point to a line?" But that works with Lon/Lat. We'll start with some assumptions: We'll model the figure of the earth as an oblate spheroid . By "line" we mean the minor arc of a great circle . We are looking for a highly accurate solution (for the suggested model) So, rephrasing your question: Given three earth-surface points - p0, p1 and p2, find an earth-surface point on the minor arc of the great circle defined by p1 and p2, which is the closest to p0. As an infrastructure for the solution, We'll need: An