latitude-longitude

Algorithm to find all Latitude Longitude locations within a certain distance from a given Lat Lng location

牧云@^-^@ 提交于 2019-11-27 05:56:58
Given a database of places with Latitude + Longitude locations, such as 40.8120390, -73.4889650, how would I find all locations within a given distance of a specific location? It doesn't seem very efficient to select all locations from the DB and then go through them one by one, getting the distance from the starting location to see if they are within the specified distance. Is there a good way to narrow down the initially selected locations from the DB? Once I have (or don't?) a narrowed down set of locations, do I still go through them one by one to check the distance, or is there a better

lat/lon to utm to lat/lon is extremely flawed, how come?

我的梦境 提交于 2019-11-27 05:51:16
问题 I've tried the following, input: lat/lon data then I'll calculate a box around it by, let's say 50 m, so +/- 50 m on easting/northing value. Now I reconvert it to lat/lon and with a script: http://robotics.ai.uiuc.edu/~hyoon24/LatLongUTMconversion.py I get a result that just can't be, lon before is around 7, afterwards around 2. zone, easting, northing = LLtoUTM(23, location.get_lat(), location.get_lon()) topUTM = northing + error bottomUTM = northing - error leftUTM = easting - error

How to get the marked speed limit of a road, out of longitude and latitude [closed]

ε祈祈猫儿з 提交于 2019-11-27 05:38:23
问题 I know that is not a technical question, but I don't know where else to ask. Is there a way to get the marked speed limit of a road from google or bing maps? or any other web service? 回答1: You cannot obtain this information from Bing Maps or Google Maps. Nor am I aware of any other webservices that provide this information (certainly not any free ones). Open Street Map (http://osm.org) has the ability for ways to be recorded with the maxspeed tag. You could download the OSM planet dataset and

C# Sunrise/Sunset with latitude/longitude

江枫思渺然 提交于 2019-11-27 05:22:02
问题 Is there a way in C# to calculate given a latitude and longitude when the sun will set and rise for a given day? 回答1: Javascript calculations here . Now you just need to port. Edit: the calculations are in the source code of this page now. Edit: here is a direct link to the source code. No need to go hunting through the html. 回答2: I know this post is old, but in case anyone is still looking... CoordinateSharp is available as a Nuget package. It's a standalone packge that can handle sun as

Determining UTM zone (to convert) from longitude/latitude

℡╲_俬逩灬. 提交于 2019-11-27 04:31:23
I'm writing a program which expects a number of lat/long points, and I convert them internally to UTM in order to do some calculations in metres. The range of the lat/long points themselves is quite small -- about 200m x 200m. They can be relied on almost always to be within a single UTM zone (unless you get unlucky and are across the border of a zone). However, the zone that the lat/longs are in is unrestricted. One day the program might be run for people in Australia (and oh, how many zones does even a single state lie across, and how much pain has that caused me already...), and another day

How to get bounds of a google static map?

梦想与她 提交于 2019-11-27 04:19:28
问题 How to get bounds in degrees of google static map which has been returned, for example, for following request http://maps.googleapis.com/maps/api/staticmap?center=0.0,0.0&zoom=10&size=640x640&sensor=false As I know, full Earth map is 256x256 image. This means that n vertical pixels contain x degrees, but n horizontal pixels contain 2x degrees. Right? As google says center defines the center of the map, equidistant from all edges of the map. As I understood equidistant in pixels (or in degrees

How do I convert coordinates to a Latitude & Longitude?

为君一笑 提交于 2019-11-27 03:36:57
问题 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

Retrieve latitude and longitude of a draggable pin via Google Maps API V3

三世轮回 提交于 2019-11-27 02:58:13
I will explain. I managed to have a draggable pin on a map. I want to retrieve the coordinates of this point and put them into two fields: Latitude and Longitude. These coordinates will later be send to a SQL table via PHP. Here is an example of what I intend to do, but instead of several pins, it's just one and it's draggable. The problem is: I'm not even able to display the coordinates of the initial point. And of course when the user moves the pin, I want the coordinates to change as well in the fields. I hope I made myself clear. What did I do wrong? Should I use the Geocoding service?

mySQL longitude and latitude query for other rows within x mile radius

大憨熊 提交于 2019-11-27 02:55:40
I have a database populated with roughly 10k rows currently. All of them have a longitude/latitude based on the center of a zipcode. I found a query that I am now attempting to expand on, but all in all it works well to a point. However, in my example below I am trying to find things within a 25 mile radius, which in all seems to work for the most part. Most of my results do yield within the 25 mile criteria, however I am getting a handful that are way off anything from 86 miles to 800 miles off the mark. Example: This is my center lat/lon: 37.2790669,-121.874722 = San Jose, CA Im getting

Distance from point to line on Earth

那年仲夏 提交于 2019-11-27 02:28:02
问题 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. 回答1: 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