I found this issue while experimenting with shapes. As written in documentation, we can draw circle with radius specified in meters. But Google Maps use cylindrical projection of the Earth (edit: ok, it doesn't), so logically, in Arctic regions our circles should be something similar to ellipse. So I conducted simple experiment and drew a circle near The Egde. That's the result:
As we can see, we still have a circle.
So, my question is, how Google Maps API calculates meters? Is there some constant coefficient between meters and coordinates, used consequently? Or maybe this is a bug and in all other cases one meter in Google Maps equals one meter in reality?
So, as I said in comment, the problem was my misinterpretation of the north edge of the map. When it comes to measuring, Google Maps API is reliable. This is how my 400-meters circle looks like near the real north pole:
Related
Why does the Google Places API provide more Points of Interests (POI) by providing a smaller radius? The definition of radius is noted below:
radius — Defines the distance (in meters) within which to bias place results. The maximum allowed radius is 50 000 meters. Results inside of this region will be ranked higher than results outside of the search circle; however, prominent results from outside of the search radius may be included.
When using the API I get significantly more POIs by providing a radius of 50 vs. 200 meters. What is the "bias" that is mentioned in the definition above? Does anyone know how the radius meter search may translate to a zoom level when using Google Maps? Any information provided would be great. Thanks!
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
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
I have attempted to map some GPS coordinates (longitude / latitude pairs) onto an image of the region of the world that they correspond to. The math was not complicated simply offsetting and then transforming the numbers with a multiplier. However this worked fine for points in Australia, but not for points in New Zealand.
The result is that the points seem to drift south near the middle of the image then slowly correct before the bottom.
Is there some extra math which needs to be taken into consideration for plotting points on a map?
Note:
during my diagnostic excercise I placed my map over google maps and noticed that my version of Australia was different to google maps, but New Zealand was the same as google maps. But the plotting for Australia works but for New Zealand does not.
Longitude/Lattitude is spherical coordinatesystem and will only work if you have a globe to show your map on. In your case you have a flat map and need to project the coordinates onto a flat surface. The maps that Google uses is created with an Mercator-like projection.
What kind of projection you want to use depends on how big area your map consist of. Most countries have their own projection that fit best for their purposes.
Those transformations are quite tricky to work out by hand if your not a mathematician but there are good libraries for transformations like Dotspatial and GDal.
I have a set of coordinates data from 3rd party provider. However when I plot those coordinates on google maps with annotations, the annotated points are not exactly on the position they should be. For example, some points should be placed on the road, however they are placed slightly off the road.
My question is, how to solve this kind of discrepancy?
Thanks!
Coordinates (lat and long), by themselves, do not describe a position on the Earth. You need a third piece of information, called the datum. The datum for google maps is WGS84. The datum establishes such things as where 0,0 is on the Earth's surface.
If you've received coordinates, and those coordinates are based on a different datum, then they will not plot correctly on Google Maps.
On the other hand, if the points came from any kind of mobile device (even if it is using WGS84), there are inherent inaccuracies in such measurements (thankfully generally down to < 5m for GPS these days, I believe) that mean that they will not align 100%.