great-circle

Fast python GIS library that supports Great Circle Distance and polygon

佐手、 提交于 2021-02-06 23:33:04
问题 I was looking for a geographical library for python. I need to be able to do the following: Get the distance between 2 points (in meters) using Great-circle distance (not liner distance calculation) Check if a point is inside a polygon Perform 1 and 2 couple of thousands times per seconds At start I've looked at this post: Python module for storing and querying geographical coordinates and started to use geopy. I've encountered 2 problems: Geopy doesn't support polygons High CPU usage of

Fast python GIS library that supports Great Circle Distance and polygon

僤鯓⒐⒋嵵緔 提交于 2021-02-06 23:32:13
问题 I was looking for a geographical library for python. I need to be able to do the following: Get the distance between 2 points (in meters) using Great-circle distance (not liner distance calculation) Check if a point is inside a polygon Perform 1 and 2 couple of thousands times per seconds At start I've looked at this post: Python module for storing and querying geographical coordinates and started to use geopy. I've encountered 2 problems: Geopy doesn't support polygons High CPU usage of

Need a standalone Java library for performing spatial calculations on lat/lon data [closed]

試著忘記壹切 提交于 2021-02-05 20:04:44
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Improve this question I'm looking for a Java library that is capable of performing spatial calculations on sets of lat/lon data. Here are some of the functions that I'm looking for: Calculate the Great Circle distance between two points Determine if a point lies within a simple closed

MySQL Great Circle intersection (do two roads cross?)

不问归期 提交于 2020-01-22 02:55:08
问题 MySQL OpenGIS CROSSES doesn't seem to work for me: SET @ls = 'LineString(1 1, 2 2, 3 3)'; SET @xx = 'LineString(0 2, 10 2)'; # SELECT AsText(EndPoint(GeomFromText(@ls))); select crosses(GeomFromText(@ls), GeomFromText(@xx)) returns 0 - expected 1 How would I rewrite this as a MySQL function? Bonus points for using lat, lon and spherical projection (and maybe the Great Circle.) PS I can't create tags and I have lost my old login: Useful tags would be: MySQL OpenGIS CROSSES greatcircle lat lon

Antipodal error in Great Circles code

瘦欲@ 提交于 2020-01-04 15:30:29
问题 I'm trying to build something like this http://flowingdata.com/2011/05/11/how-to-map-connections-with-great-circles/ but with my own data in csv files. The code runs well if I use the same csv files as the author, but with mine , this is what I get Code library(maps) library(geosphere) map("world") xlim <- c(-180.00, 180.00) ylim <- c(-90.00, 90.00) map("world", col = "#f2f2f2", fill = TRUE, bg = "white", lwd = 0.05,xlim = xlim, ylim = ylim) airports <- read.csv("/Users/shabnam/Desktop

Drawing Connecting Lines (“Great Arcs”) on a D3 Symbol Map

限于喜欢 提交于 2019-12-23 17:39:46
问题 I am using Version 4 of the D3 Library and am, to this point, unable to draw connecting lines between points on a Symbol Map. In the example, from an earlier version of the library, drawing connecting lines is accomplished with this code: // calculate the Great Arc between each pair of points var arc = d3.geo.greatArc() .source(function(d) { return locationByAirport[d.source]; }) .target(function(d) { return locationByAirport[d.target]; }); [snip] // Draw the Great Arcs on the Chart. g

Need help calculating geographical distance

久未见 提交于 2019-12-20 13:05:27
问题 I'm setting up a small program to take 2 geographical coordinates from a user and then calculate the distance between them(taking into account the curvature of the earth). So I looked up wikipedia on what the formula is here. I basically set up my python function based on that and this is what I came up with: def geocalc(start_lat, start_long, end_lat, end_long): start_lat = math.radians(start_lat) start_long = math.radians(start_long) end_lat = math.radians(end_long) end_long = math.radians

Great Circle Distance Formula: T-SQL

旧城冷巷雨未停 提交于 2019-12-18 15:33:41
问题 So I have a table with a bunch of different addresses in it. I need a proc that will select the addresses in that table that are within a specified distance in miles from the passed in lat/long values. So example of my table: - messageId - lat (float) - long (float) Proc is passing in another lat/long pair (both float s as well) as well as an int (miles) I found this http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81360 to calculate the actual formula but I can't figure out to modify it in

Great Circle Distance question

浪子不回头ぞ 提交于 2019-12-17 22:53:02
问题 I am familiar with the formula to calculate the Great Circle Distance between two points. i.e. <?php $theta = $lon1 - $lon2; $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); $dist = acos($dist); $dist = rad2deg($dist); //convert degrees to distance depending on units desired ?> What I need though, is the reverse of this. Given a starting point, a distance, and a simple cardinal NSEW direction, to calculate the position of

Automating great-circle map production in R

大兔子大兔子 提交于 2019-12-13 12:04:20
问题 I've taken some of the things I learned in a Flowing Data great circle mapping tutorial and combined them with code linked in the comments to prevent weird things from happening when R plots trans-equatorial great circles. That gives me this: airports <- read.csv("/home/geoff/Desktop/DissertationData/airports.csv", header=TRUE) flights <- read.csv("/home/geoff/Desktop/DissertationData/ATL.csv", header=TRUE, as.is=TRUE) library(maps) library(geosphere) checkDateLine <- function(l){ n<-0 k<