coordinates

Get location coordinates using bing or google API in python

﹥>﹥吖頭↗ 提交于 2019-11-29 10:26:06
问题 Here is my problem. I have a sample text file where I store the text data by crawling various html pages. This text contains information about various events and its time and location. I want to fetch the coordinates of these locations. I have no idea on how I can do that in python. I am using nltk to recognize named entities in this sample text. Here is the code: import nltk with open('sample.txt', 'r') as f: sample = f.read() sentences = nltk.sent_tokenize(sample) tokenized_sentences =

Web service to get the GPS Coordinates

我们两清 提交于 2019-11-29 10:22:11
I'm developing an web application (jsp/strtus2) which requires the GPS coordinates of a place. What I want to know is, whether there are any free web services that I can get GPS coordinates of a place by passing address or zip code to the server. Thanks in advance, Nuwan Yahoo's Geocoder is easy to use. Basically change a few query strings and it outputs an easy to parse xml file. Google's had a few issues in our area with the coordinates being returned being incredibly inaccurate at times. Yahoo tends to actually land on the street in question, but probably wont hit the parcel itself. That

How do I get the coordinates for finger tapping in UIView?

二次信任 提交于 2019-11-29 10:03:05
How do I get the coordinates for finger tapping in UIView? (I would prefer not to use a big array of buttons) Thank you There’re two ways to accomplish this. If you’ve already got a subclass of UIView that you’re using, you can just override the -touchesEnded:withEvent: method on that subclass, like this: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *aTouch = [touches anyObject]; CGPoint point = [aTouch locationInView:self]; // point.x and point.y have the coordinates of the touch } If you’re not already subclassing UIView, though, and the view is owned by a view

How to get screen cordinates corresponding to the whole screen, and not the View touched?

老子叫甜甜 提交于 2019-11-29 09:17:46
Im having some trouble obtaining the real (x,y) from my screen by handling the touch events of one View Item. I have this: When I touch the View item, it gives me coordinates with the origin located in his upper-left corner, and if i slide the finger out the view, it gives me negative coordinates (when sliding up or left). I would like to obtain the View location in the screen, to add it to the (x,y) coordinates that i get, so the final result is that the (0,0) is in the upper-left corner of the whole screen. I also need the total screen size, so that i know when the finger is located in the

Lat Long or Long Lat

时光毁灭记忆、已成空白 提交于 2019-11-29 09:02:56
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? 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,lat order should be used, because the x-axis relates to longitude and y to latitude and the x,y order is

How to calculate angle between two Geographical/GPS coordinates?

为君一笑 提交于 2019-11-29 07:05:12
I have two GPS Coordinates e.g. (Lat1, Long1) and (Lat2,Long2) Could anybody please help me find the angle between those two points. Values should be 0-360 degrees. npinti Taken from this previous SO post: float dy = lat2 - lat1; float dx = cosf(M_PI/180*lat1)*(long2 - long1); float angle = atan2f(dy, dx); I suppose you mean the bearing to and not the angle between the locations: If (lat1,long1) is stored in a Location object loc1 and (lat2,long2) is stored in loc2 you get the bearing from loc1 to loc2 like this: float bearing = loc1.bearingTo(loc2); The result is in degrees east of true north

Distance between two coordinates, how can I simplify this and/or use a different technique?

☆樱花仙子☆ 提交于 2019-11-29 05:11:00
I need to write a query which allows me to find all locations within a range (Miles) from a provided location. The table is like this: id | name | lat | lng So I have been doing research and found: this my sql presentation I have tested it on a table with around 100 rows and will have plenty more! - Must be scalable. I tried something more simple like this first: //just some test data this would be required by user input set @orig_lat=55.857807; set @orig_lng=-4.242511; set @dist=10; SELECT *, 3956 * 2 * ASIN( SQRT( POWER(SIN((orig.lat - abs(dest.lat)) * pi()/180 / 2), 2) + COS(orig.lat * pi()

Multilateration of GPS Coordinates

删除回忆录丶 提交于 2019-11-29 05:09:34
I have N GPS coordinates with N distances given to an unknown position which I wish to determine. My first approach was to use just three points and trilateration, exactly as described here . This approach was already quite accurate (best error~5km), but I would like to improve this and increase the robustness. Because the given distances are not very accurate to begin with, I thought about using multiple measurements and multilateration. However, it turned out that this approach is by far less accurate (best error~100km) although I provide more than 3 points/distances (tested with up to 6)

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

为君一笑 提交于 2019-11-29 04:51:59
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 have any idea how to do that? Calculating the distance is pretty computationally expensive, as others

How to map a point onto a warped grid

不羁岁月 提交于 2019-11-29 03:56:05
Say you have a collection of points with coordinates on a Cartesian coordinate system. You want to plot another point, and you know its coordinates in the same Cartesian coordinate system. However, the plot you're drawing on is distorted from the original. Imagine taking the original plane, printing it on a rubber sheet, and stretching it in some places and pinching it in others, in an asymmetrical way (no overlapping or anything complex). ( source ) You know the stretched and unstretched coordinates of each of your set of points, but not the underlying stretch function. You know the