Is it possible to obtain through geocoding service polygon not a single point on map?
You can define your suburb in the form of a kml polygon. To do this you will need to know the points that form the boundary of this suburb.
Related
Is there a possibilty to check that Polyline is in Polygon? Or I must check each points in Polyline containsLocation in Polygon?
I think about importing gpx files (my Polyline) and check what administrative area (my Polygons) contains this Polyline. I was thinking about reverse geocoding for each points in Polyline, but its impossible due to geocoding limitations. Any ideas?
You have to check every point of the Polyline against your Polygon. Take into account that a Polyline can be (according to DE-9IM):
Within your polygon (contained) = completely contained
Intersect your polygon = partially contained
Disjoint = not contained
So, a polyline can intersect two different Polygons (your Polyline can intersect two different administrative areas)
On one project , I recovered all the coordinates of the polygons of different postal code.
When I search a zip code, I draw the polygon using the google api.
Now I would like to know whether a given polygon is so much distance from another .
Is that possible ?
By parsing all my geojson , I need to know if a random polygon is 5km from the polygon drawn .
There is computeDistanceBetween method from the geometry library...but its for two points. Is there the same for the distance between two polygons ?
Thx u for your help
Not sure if this would solve your problem but you can somehow use this library to compute distances within your polygon.
BDCCgeo.js
There is a function called bdccGeoDistanceToPolyMtrs(), you can measure the distance between a point and a polygon edge or polyline. Perhaps you can get a certain point on your first polygon and compare with with the second using this function.
Reference:
Distance from point within a polygon to polygon edge
If I have a (latitude,longitude) pair, is there a way to determine whether it lies in a 'region'. By region I mean the 'highlighted' result of an query in google maps. For example, when I search for Manhattan, a red region is highlighted. Does Google/Bing provide an API to query if a given coordinate lie in such a region?
I am aware of the containsLocation API call that tells me if a coordinate lies in a polynomial already defined as a set of coordinates. The problem here is me not having all the coordinates that can define Delhi
Bing Maps provides an API called the GeoData API where you can pass in a coordinate and it will return the boundary information for the intersecting location (city in this case). https://msdn.microsoft.com/en-us/library/dn306801.aspx
Another method as mentioned by others in the comments is to use a reverse geocoding service. By passing in your coordinates it will return the name of the city in which that coordinate is in. Bing Maps also has a Reverse Geocoding service:
https://msdn.microsoft.com/en-us/library/ff701710.aspx
Is there a function in google map that can get the geofence or the polygon area of city? For example i like to get the geofence Manila Philippines. I want to save the polygon Latitude and longitude of the city to MySql geometry column.
At the moment there is no such function. If you search for Manila, Philippines using geocoding you will get the location with the viewport and bounding box. However you won't get a polygon around the area.
One workaround would be to create your own polygons and save them to your database and then check if the lat/long is within those polygons.
I want to draw Polylines with the Google Maps JavaScript API. Is there a tool that will help me get the latitude and longitude points by just clicking on the map, then exporting an array of lat-long pairs?
I imagine something like the personalized maps service (My Places) in Google Maps where you can click-snap on the roads to specify your own driving directions. I'd like to take that one step further. That is, to export an array of lat-long pairs that specify the roads traveled.
I know this answer might be a little late but today I was trying to figure out what I believe to be the same issue as this question. So, you can draw the points on the map then get that encoded polyline with Google's Interactive Polyline Encoder Utility then I recommend using Mapbox polyline utility to convert the overview_polyline to latitude and longitude pairs values. The latitude and longitude pairs are also on Googles Utility but it is a bit of a hassle to continuously copy each coordinate.
For more information about the Mapbox Polyline Utility process:
http://zevross.com/blog/2014/09/23/convert-google-directions-to-geojson-points-or-polylines/
And here is Google's Encoder Utility:
https://developers.google.com/maps/documentation/utilities/polylineutility
You can use the Drawing Tools library:
http://code.google.com/apis/maps/documentation/javascript/overlays.html#drawing_tools
which will give you an encoded polyline. You can use that to draw a line, or you can decode it to get the specific points using the geometry library:
http://code.google.com/apis/maps/documentation/javascript/geometry.html