compute a shape from a list of geographical coordinates - google-maps

I have an App that displays thousands of Pin annotations on a google map using geo coordinates (lat/long in degree).
In some circumstances I would like to replace the Pin annotations with an overlay that will represent the shape of my geographical area covered by my thousands of Pin.
I'm looking for an algorithm where the input is the list of geo coordinate of my Pin annotations and the output will be an ordered list of geo coordinates that I will use to create the overlay on the google map. For sure the best would be java/objective-C code if it exists :-)
I looked on internet and found articles related to Graham convex hull algorithm but it seems not so easy to use and I don't know if it really works with Lat/Long?
Any help will be really appreciated.
Regards,
Sébastien.

i believe this is what you're looking for:
http://en.wikipedia.org/wiki/Gift_wrapping_algorithm

Related

How to detect water on google maps

Is it possible to determine if a gps point is in water or near(not including elevation) . From what I have seen it doesn't seem possible. I had an idea of somehow getting the gps fence of water bodies and checking if the point lays in the fence. Sounds good but I can't find gps coordinate fences. If any one have any other ideas or a place to get those fences it would be great.
You can get the GPS fence for water from OpenStreetMap.
Then you do a point in polygon operation, optionally you put all polygons in
a spatial search structure, like a quad tree, for a fast polygon search nearby the lat,lon point.
You can start here. and later read more how to identify water in OpenStreetMap
A solution that works on small areas of waters, worldwide, would use much storage space If you concentrate on some countries this should work.
I found that the article is a very interesting approach.
Using google static maps to draw just some pixels around your coordinates, and then check whether its blue or not blue.
You can set a custom unique colour for "water" as a parameter to the google static map, which makes it easy for you to determine if it matches water or not

What is a coordinate reference system in GIS? How is it different from a projection system?

We hear a lot about CRS in GIS. I am working with QGIS and whenever I add a layer I need to specify the CRS but what I am confused about what exactly is a CRS and how is it different projection system. Why do countries have their own CRS and how is it determined?
If I understood the question correctly, most APIs use the WGS84 format to specify geographical coordinates, which is briefly explained in this Wikipedia article. Basically, the coordiantes are polar coordinates referring to an ellipsoid whose center is located at earth's center of gravity.
The earth is a sphere, and not a completely round one. However we would still like it as if it was flat to make proper maps and make measurements.
For example, using WGS84 on a map of Norway would make it look horribly distorted.
that is why different regions have their own projections for their own cartographic needs.
I found a good definition of a CRS here. For al intends and purposes it is the same as its projection.

Get bounding polygon coordinates from Google Maps

Does Google Maps(or any other provider[commercial/free]) provides API(s) that can return bounding polygon coordinates of place search? I'm not talking about sw-ne coords only, rather, actual boundary that perfectly defines the shape of a place. Place could be city, or more fine-grained identifiable place?
I don't know much about Google Maps API, but I did give it a fair share of searches and testing out sample codes(from examples provided by Google itself), as well as browsed through API reference, but couldn't find any.
Any help please...
If what you mean is "is it possible to get boundaries of any place returned by Google Places API as we can see in Google Maps ?", the answer is no, you have to use KML files describing the polygon representing the boundaries of the place.
Depending of what you are searching for, it exists a lot of open-data KML files representing some state boundaries, for exemple this file for example.
Please improve your question if you're searching something more specific, it is too broad right now. I didn't downvote, but I guess this why some other people dit it.

Google Maps - Create a polygon around existing markers

I dont know if this is possible but I use a google map to plot out positions of entities via markers on an overlay. I would like to be able to create a polygon or some other sort of overlay object around all the created markers, highlighting the extent of the markers, sort of a catchment area diagram. I wont know before all the markers are retrieved from the database and mapped what the extent is.
Anyone have any ideas how to approach this..?
Thanks
I think you are looking for the Convex Hull of the points
In mathematics, the convex hull or convex envelope of a set X of points in the Euclidean plane or Euclidean space is the smallest convex set that contains X. For instance, when X is a bounded subset of the plane, the convex hull may be visualized as the shape enclosed by a rubber band stretched around X.
Example using the Google Maps API v3 on a random set of points

How do I obtain the coordinates along GMaps directions?

I want to create an online map for a hiking trail, and I have been using my smartphone to collect coordinates from it.
I have many questions regarding what's good practice when it comes to making such tracks, but for starters: it would look much neater if I could edit the readings so that they are right on top any roads in Google Maps. How can I achieve this?
EDIT: I want to find the coordinates that will make a track along a road look exactly as if I'm using snapping/directions even when I'm not.
I've tried tools such as QLandkarte GT and Viking, and with the latter I was able to manually remove excess coordinates and move the remaining ones so that they're exactly on top of roads (inside Viking, using OpenStreetMap). However when I load the edited .kml-file in Google Maps, the roads seem to be in slightly different places and the result is hardly better than before editing.
I tried using the hack that exports GMaps directions as .gpx, thinking I could insert Google's own coordinates along the roads. But the exported file only had coordinates at the turning points with straight lines between these.
QLandkarte GT supposedly has a snap-to-road feature (see answer in link), but I haven't found it and I also don't know how to obtain a vector map of the area.
Then there's Google Earth which people seem to use for this, but again I can't find any track editing features (in the free version).
In short:
How do I edit my existing tracks so that they match roads in GMaps...
OR
How can I obtain new tracks representing roads in GMaps...
...so that the resulting track is as smooth as Google's own directions or other professional GPS-data, when displayed in GMaps?
It seems like it's possible to get these coordinates from Google Maps after all, exporting the directions polyline. I'm not sure how, it seems to involve adding the parameter output=dragdir to the link.
Anyway there's a tool called GPS Visualizer that can create a .kml-file with the wanted coordinates.
Edit: Will accept my own answer as long as it's the only one, but I would still like to know more.