coordinates

Lat Long or Long Lat

耗尽温柔 提交于 2019-11-28 02:24:29
问题 There seems to be no standard whether Longitude,Latitude or Latitude,Longitude should be used. WSG84 and stuff based directly on it, seem to prefer Long,Lat. "Normal people" always tend to speak of Lat, Long - so I've very often seen code or frameworks that use Lat, Long (e.g. google Maps) Is there any strong argument for either way? 回答1: You are correct, there is no standard on the order: In mathematical functions which do an universal conversion, between x,y or lon,lat or inverse, the lon

Python 3.0 using turtle.onclick

不羁岁月 提交于 2019-11-28 02:22:21
So here is my problem, I have to make a picture for my CS class and it is really frustrating estimating in turtle. I planed to use .onclick() to show me to position. import turtle as t def getPos(x,y): print("(", x, "," ,y,")") return def main(): t.onclick(getPos) t.mainloop() main() The turtle documentation seems to say that the onclick will pass the coordinates in a function that takes in two variables. http://docs.python.org/3.1/library/turtle.html#turtle.onclick NOTE: It works when I click on the arrow head, but thats not what I want. I want to click some other position on the screen to

Facebook FQL: Get checkins within range

你说的曾经没有我的故事 提交于 2019-11-28 00:20:33
Is there a way to use FQL to select all my friends Checkins that are in range of a specified location? I can use FQL to return my friends checkin coords: https://api.facebook.com/method/fql.query?access_token={0}&query=SELECT coords FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) but how can I add to the above query to do something like... Where coords Within 10 miles of [(New York City, NY) | (long, lat) | (user.current_location)] Any help would be greatly appreciated. Thanks in advance. EDIT (3/9 3:05pm est): I'm mainly just looking for an end result - doesn't

svg: generate 'outline path'

柔情痞子 提交于 2019-11-27 21:24:18
I have a set of coordinates that I turn into an svg path (using cubic beziers to make it smooth). When I apply a certain stroke width, I get the following result (the blue dots are my coordinates) What I am interested in is to get a path that runs around the gray shape (like: pick any point on the gray/white border, and round around the shape until you're back at the starting point). How would I go about computing such a path? for reference, this is my svg info: <g> <title>number 3</title> <path d="m238,50c5.67569,-1.01351 11.8327,-3.8229 20.92029,-2.14724c8.68106,0.69732 14.21173,4.90255 18

Get new position of coordinate after rotation with Matrix

时光毁灭记忆、已成空白 提交于 2019-11-27 20:17:18
问题 I'm wondering how to use a Matrix to get the new position of a coordinate within a rectangle after rotation. What I would like to do is: Define a rectangle Define a coordinate within that rectangle Rotate the rectangle Get the new position of the coordinate after the rotation The parts I can't figure out are 2 & 4. Any ideas? 回答1: I have created a simple Demo for this. It has a little extra, so you can also see how to use this in Drawing. main.xml <?xml version="1.0" encoding="utf-8"?>

How to get real world coordinates (x, y, z) from a distinct object using a Kinect

核能气质少年 提交于 2019-11-27 20:16:58
I have to get the real world coordinates (x, y, z) using Kinect. Actually, I want the x, y, z distance (in meters) from Kinect. I have to get these coordinates from a unique object (e.g. a little yellow box) in the scenario, colored in a distinct color. Here you can see an example of the scenario I want the distance (x, y, z in meters) of the yellow object in the shelf. Note that is not required a person (skeleton) in the scenario. First of all, I would like to know if it is possible and simple to do? So, I would appreciate if you send some links/code that could help me doing this task. Hayko

How to perform bilinear interpolation in Python

人盡茶涼 提交于 2019-11-27 20:07:33
I would like to perform blinear interpolation using python. Example gps point for which I want to interpolate height is: B = 54.4786674627 L = 17.0470721369 using four adjacent points with known coordinates and height values: n = [(54.5, 17.041667, 31.993), (54.5, 17.083333, 31.911), (54.458333, 17.041667, 31.945), (54.458333, 17.083333, 31.866)] z01 z11 z z00 z10 and here's my primitive attempt: import math z00 = n[0][2] z01 = n[1][2] z10 = n[2][2] z11 = n[3][2] c = 0.016667 #grid spacing x0 = 56 #latitude of origin of grid y0 = 13 #longitude of origin of grid i = math.floor((L-y0)/c) j =

Implementation of parallel coordinates? [closed]

徘徊边缘 提交于 2019-11-27 19:51:47
I want to implement parallel coordinates for my muldimensional result. Does anyone have a good link to its implementation in matlab or R? Furthermore, are there any suggestions regarding the best tool to use for producing the parallel coordinates? VitoshKa R solution lattice package comes with R and includes parallel function: parallel(~iris[1:4] | Species, iris) ggplot2 is also your friend here: D <- data.frame(Gain = rnorm(20), Trader = factor(LETTERS[1:4]), Day = factor(rep(1:5, each = 4))) ggplot(D) + geom_line(aes(x = Trader, y = Gain, group = Day, color = Day)) lattice and ggplot require

PHP MySQL get locations in radius user's location from GPS

谁说我不能喝 提交于 2019-11-27 18:43:23
问题 I have in my database car incidents for example. These incidents have a latitude and longitude. On a mobile using the GPS, I get the user's location with his coordinates. The user can select a radius that he wants to know if there are incidents around him. So let's say he want to know incidents 2 miles around him. So I send from the phone to a web service the user's latitude, longitude and the radius he selected. I need to make a SQL query to get the incidents 2 miles around the user. Do you

Algorithm to generate a hexagonal grid with coordinate system

南楼画角 提交于 2019-11-27 18:12:42
I am trying to roll up 19 lines of code into a single for loop, but I am feeling a bit stumped. The reason I ask, is because I want the grid to be other sizes instead of 5. In Main::drawHexGridAdvanced() , I am trying to deduce the similarities between each line as opposed to Main::drawHexGridBasic() where I am hard-coding values. I am not sure how to determine the start of the x for each column in each row, because the pattern for n == 5 is 0, -1 -2 -2 -2 after that each consecutive column is just incremented except when the loop reaches the halfway point... Information and Understanding `n`