latitude-longitude

Matching closest longitude/latitude

孤人 提交于 2019-12-03 14:14:53
问题 Using Maxmind's GeoIP software, we can narrow down the LONG/LAT of an IP address to relative accuracy within 25 miles around 80% of the time. Now, we don't want to use any of the other information provided by MaxMind, because there are a lot of discrepancies between feature names, i.e., cities, to perform a look up. We plan on attempting such a look up if other methods fail to locate a feature, but for performance reasons, look ups on floats are much faster than strings. Now, I'm a little

Move a LatLng 5 meters towards another LatLng

倾然丶 夕夏残阳落幕 提交于 2019-12-03 13:48:08
What algorithm/formula can I use to calculate a LatLng point 5 meters closer to another LatLng point? I'm trying to write a function with 2 LatLng parameters and have it return a LatLng that is 5 meters from the first LatLng and in the direction of the second LatLng. Have a look at Android Map Utils library, specifically the SphericalUtil class. 1.) Call the method computeHeading to obtain your heading from first to second 2.) Call the method computeOffset to solve for the location 5 meters from your first point Hope this helps 来源: https://stackoverflow.com/questions/26594445/move-a-latlng-5

ocean latitude longitude point distance from shore

守給你的承諾、 提交于 2019-12-03 13:06:15
问题 I started a "free" open-sourced project to create a new data set for pH of the earth oceans. I started from the open data-set from NOAA and created a 2.45 millions rows data-set with those columns: colnames(NOAA_NODC_OSD_SUR_pH_7to9) [1] "Year" "Month" "Day" "Hour" "Lat" "Long" "Depth" "pH" Method document HERE. Data-set HERE. My goal now is to "qualify" each row (2.45m)... to do so, I need to calculate the distance from each point of Lat/Long to the nearest shore. So I am looking for a

Travel Distance between two Lat and Long

百般思念 提交于 2019-12-03 12:53:12
问题 I am looking to calculate and give the distance between two sets of Lat and Long for travel on Road. I have had a look at the Google's Directions and Distance Matrix API. And also done a lot of other questions on SO. But i am not able to figure out the best possible way to do it, you need to calculate the distance to around 20-25 locations at each time. We are building a travel app that requires this information for the user on Android device from where he is. 回答1: If You are looking for

Distance from Lat/Lng point to Minor Arc segment

喜你入骨 提交于 2019-12-03 08:52:08
问题 I need to calculate the shortest distance from a lat/lng GPS point P to a line segment described by 2 other lat/lng GPS points A and B. 'Cross-track distance' helps me to calculate the shortest distance between P and the great circle described by A and B. However, this is not what I want. I need need the distance between P and the line segment of A-B, not the entire great circle. I have used the following implementation from http://www.movable-type.co.uk/scripts/latlong.html Formula: dxt =

How do I get an addresses latitude-longitude using HTML5 geolocation or Google API?

泄露秘密 提交于 2019-12-03 08:51:33
问题 I am getting baffled with a problem that is, I can get the location of a user from Facebook and all I need is to get the latitude and longitude of that location, but I still couldn't find a solution. It will help if I can get that latitude and longitude using an HTML5 geolocation or any Google API. What is the solution? 回答1: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(successFunction, errorFunction); } else { alert('It seems like Geolocation, which is required for

How to take a subset from a netCDF file using latitude/longitude boundaries in R

ぃ、小莉子 提交于 2019-12-03 06:14:55
I have a netCDF file that I wish to extract a subset from defined by latitude/longitude boundaries (i.e. a lat/long defined box), using the ‘ncdf’ package in R. A summary of my netCDF file is below. It has two dimensions (latitude and longitude) and 1 variable (10U_GDS4_SFC). It is essentially a lat/long grid containing wind values: [1] "file example.nc has 2 dimensions:" [1] "lat_0 Size: 1280" [1] "lon_1 Size: 2560" [1] "------------------------" [1] "file example.nc has 1 variables:" [1] "float 10U_GDS4_SFC[lon_1,lat_0] Longname:10 metre U wind component Missval:1e+30" The latitude variable

Select all geospatial points inside a bounding box

元气小坏坏 提交于 2019-12-03 05:15:52
问题 I have a table called 'flags' in a MySQL database with 400,000 rows. This table is made up of geospatial points that represent different positions around the UK. The application I'm creating uses Google Maps. On the map is a button that should toggle the flags visibility on the map. It's my job now to create an API that when passed a bounding box all flags inside the bounding box are returned (so that they can then be displayed on the map). The passed parameters are the North East latitude

Convex hull of (longitude, latitude)-points on the surface of a sphere

强颜欢笑 提交于 2019-12-03 05:00:32
问题 Standard convex hull algorithms will not work with (longitude, latitude)-points, because standard algorithms assume you want the hull of a set of Cartesian points. Latitude-longitude points are not Cartesian, because longitude "wraps around" at the anti-meridian (+/- 180 degrees). I.e., two degrees east of longitude 179 is -179. So if your set of points happens to straddle the anti-meridian, you will compute spurious hulls that stretch all the way around the world incorrectly. Any suggestions

ocean latitude longitude point distance from shore

僤鯓⒐⒋嵵緔 提交于 2019-12-03 04:18:31
I started a "free" open-sourced project to create a new data set for pH of the earth oceans. I started from the open data-set from NOAA and created a 2.45 millions rows data-set with those columns: colnames(NOAA_NODC_OSD_SUR_pH_7to9) [1] "Year" "Month" "Day" "Hour" "Lat" "Long" "Depth" "pH" Method document HERE . Data-set HERE . My goal now is to "qualify" each row (2.45m)... to do so, I need to calculate the distance from each point of Lat/Long to the nearest shore. So I am looking for a method that would take In: Lat/Long Out: Distance (km from shore) With this, I can qualify if the data