countries covered by a GPS trace - gps

I have a GPS trace and I wish to find out which countries does this trace effectively span. In other words if I go over the trace from beginning to end which countries does the trace go over.
Is there an API call which can help me accomplish this task?
with kind regards
Rohit

If you want to program it yourself:
Download the rough country borders as polygons in latitude longitude format (WGS84). (There are stackoverflow answers on this topic)
for each coordinate of the GPS trace call a "point-in-polygon" algorithm, where each country is represented as one polygon. You might want to ignore special situations like enclaves. (That would be a country polygon with holes)

Related

Does celestial body locations reported by PyEphem report apparent or actual positions?

I've been using PyEphem for a couple of things, and I was wondering if the location of celestial bodies are reported as actual or apparent positions. That is to say, does the locations factor in the time delay for information to reach us?
Thanks,
It corrects for light travel time — here's the code where it does so, in case you want to check its technique:
https://github.com/brandon-rhodes/pyephem/blob/6849cc42dbb52284f9365655ba84cac5497de1f1/libastro-3.7.7/circum.c#L336

What Geographic Reference System and Datum is used for DJI Phantom 3 advance

I have spend a bit of effort trying to figure out what the geographic projection is of coordinates attached to the exif files of the photos taken on the DJI Phantom 3 advance. I assumed that it was in WGS84 with the elevation in its associated datum, but when I looked closely at the elevation values, there was a systematic offset that was closer to the NAVD88 datum (but still off).
I called DJI's tech support and was put on hold for a while, and they reported back that the it was indeed NAVD88. I am not sure I buy this answer though. The person I was talking to had no idea at first, and I had planted the term navd88 when I posed the question, and even spelled it out for him; I asked if the z was in a global ellipsoid or a local datum like navd88.
Like I said, I was on hold for a long time, so it is possible this is really the correct answer, but when I think about it, it doesn't make sense. These are flown all over the world, so why would you want a North American datum if you are flying in Tasmania for example. I suppose it is possible there is a list of local datums onboard, and it automatically applies it depending on the location, but I kind of doubt it.
I know that the onboard GPS in not very accurate, especially in the Z direction, but where I am at there is more than 13 meters difference between the WGS84 global ellipsoid and NAVD88. Knowing the datum will help strengthen my photogrammetry product.
I also went through all the DJI documentation I could find on the subject, to no avail.
Has anyone else examined this issue in detail?
Thanks!
I was thinking the exact same thing! Which datum is used, so propably WGS84. But yes if you are in Tasmania, that make a difference, you can have more than hundred feet diffence if you are looking at a specific waypoint. But at the end, that makes no diffence of using the "universal datum" WGS84, because when you use a point as a "RTH" point, you not entering a geodesic point (lat/long). But the drone is recording where is at according to what it's reading! The day that DJI will offer to enter a coordinated, then, exact country datum will be required.
Another "BUT".... if you are looking at your flight records, while playback your flight, at the bottom you can see you coordinates, so if you have an nicking gps, and that gps is set at WGS84 datum, do that exercise, enter you coordinated on google earth and check where it's landing. Then change gps datum to another datum, nad27 or what ever and enter again your coordinates and check again, you will be surprise of the distance difference!!
Take care!
based on my experience, Phantom 4 is using the WGS84 as datum.
I made experiment by taking several GPS reading at 1 site used for GPS calibration. The reading from all GPS is slightly matching the coordinate of calibration point.
Then I take a reading via phantom 4 and its not matching with the calibration point. I changed the datum from the Phantom 4 reading into Timbalai 1948 (datum use in Borneo Island), the coordinate is matching with the calibration point.
Therefore I confident that datum used by the Phantom 4 is using WGS 84 since this datum is universal datum and also used by Google Earth.

Determine if GPS location is within city limits?

I want to be able to determine if a GPS location is in an inhabited or uninhabited zone.
I have tried several reverse geocoding API like Nominatim, but failed to get good results. It always returns the nearest possible address, even when I selected a location in the middle of a forest.
Is there any way to determine this with reasonable accuracy? Are there any databases or web services for this ?
If you have to calculate that youself, then the interesting things start:
The information whether or not a region is inhabited is stored in digital maps in layer "Land_Use". There are values for Forest, Water, Industry, Cemetary, etc.
You would have to import these Land_use polygons into a special DB (PostGres).
Such a spatial DB provides fast geo indizeds for searching only the relevant polygons.
Some countries may also fit in main memory, but then you need some kind of geo spatial index, like Quad-Tree or k-d tree to store the polygons.
Once you have imported the polygons, it is a simple "point in polygon" query, or "polygons within radius r". The typoe of th epolygon denotes the land use.
OpenStreetMap provides these polygons for free.
Otherwise you have to buy them from TomTom or probably NavTeq (Nokia Maps). But this makes only sense for major companies.
Since you're using Nominatim, you're getting the coordinates of the nearest address back in the reply.
Since the distance between two coordinates can be calculated, you can just use that to calculate the distance to the closest address found, and from that figure out if you're close to populated areas or not.

Creating a program that takes GPS data and displays the current location on a geo-referenced image

My name is John and I am a grad student at the University of Florida. As part of my research one of my tasks is to create a piece of software that is to display a map of the surrounding area, which shows the current location (from a GPS), and to implement a shapefile (as a boundary outline). I am not able to really get enough information to get on the right track on how to do this, and would appreciate any assistance!
The project involves a large-scale robot that will be operated by tele-communication in rough terrain. So this mapping and gps software will need to be entirely offline, but the location in use will be known. It is very preferred to find a cost effective means to doing this process (maybe even a simple API that could do the simple task, dll libraries, or active x.
My initial guess is to use a geo-referenced image (that I would get the lat and long of and know the boundaries of that image). Then from a GPS I then would treat the image as an XY plot somehow and that would provide the current position. Obviously even this step can be a challenge depending on what kind of image, map, kml file, etc that I can find and use.
So I would appreciate any advice, suggestions, or comments.
Suggest you online reference source code, and then modify their own, this project is currently on the Internet, you can through search engines to find. Good luck!

Algorithm for reducing GPS track data to discard redundant data?

We're building a GIS interface to display GPS track data, e.g. imagine the raw data set from a guy wandering around a neighborhood on a bike for an hour. A set of data like this with perhaps a new point recorded every 5 seconds, will be large and displaying it in a browser or a handheld device will be challenging. Also, displaying every single point is usually not necessary since a user can't visually resolve that much data anyway.
So for performance reasons we are looking for algorithms that are good at 'reducing' data like this so that the number of points being displayed is reduced significantly but in such a way that it doesn't risk data mis-interpretation. For example, if our fictional bike rider stops for a drink, we certainly don't want to draw 100 lat/lon points in a cluster around the 7-Eleven.
We are aware of clustering, which is good for when looking at a bunch of disconnected points, however what we need is something that applies to tracks as described above. Thanks.
A more scientific and perhaps more math heavy solution is to use the Ramer-Douglas-Peucker algorithm to generalize your path. I used it when I studied for my Master of Surveying so it's a proven thing. :-)
Giving your path and the minimum angle you can tolerate in your path, it simplifies the path by reducing the number of points.
Typically the best way of doing that is:
Determine the minimum number of screen pixels you want between GPS points displayed.
Determine the distance represented by each pixel in the current zoom level.
Multiply answer 1 by answer 2 to get the minimum distance between coordinates you want to display.
starting from the first coordinate in the journey path, read each next coordinate until you've reached the required minimum distance from the current point. Repeat.