Google OR-tools with here.com integration for Middle East region - google-maps

I am looking at using Google OR for our route optimization tool targeted at the Middle East. I am planning to use here.com as the distance matrix input and want to understand if the OR tool will recognize the additional information received from here.com (such as open/closed roads, closed / temporarily prohibited points of passage) to build routes - can you please let us know? Thanks

As said by Sascha, the routing library is completely agnostic of the source of the distance matrix. Getting the data must be done before calling the solver.
We do provide a code sample to access the Google Maps distance API. But nothing is integrated within the routing library itself.

Related

How to request polygons from Google Maps?

I am interested in an analogue of http://wiki.openstreetmap.org/wiki/Nominatim
I.e. to be able to make request and get some kind of polygon coordinates:
"geojson":{"type":"Polygon","coordinates":[[[-87.464761,44.600998],[-87.459755,44.599569],[-87.459745,44.601012],[-87.463143,44.601],[-87.464761,44.600998]]]}
Nominatim is good, but it lacks of some data (I am interested in data about cities and counties of Canada). For example, Google Map knows about the Ontario districts and highlights them, but OpenStreetMap - does not. As well as for some cities - where OpenStreetMap shows a dot, Google Maps shows full polygon.
Can it be done with Google Maps?
Other alternatives will work as well.
Yes, it can be done via GMaps API: https://gis.stackexchange.com/questions/43292/how-to-geocode-an-address-to-a-polygon
But be also aware of the legal restriction of the API and the commercial dataset, esp. if you want to use it regularly or for bulk processing: http://www.google.com/help/legalnotices_maps.html
I would also consider to help OSM to improve the dataset. This can be done by contacting the local community and offering help to ask for official public datasources. Esp. in the case of political boundaries, there is no way to get this material on the ground: http://wiki.openstreetmap.org/wiki/Canada

Google Maps API v3 pathing with location service

I'm using Google Maps for my campus map and I already have all the overlays for the buildings done along with javascript to open windows when clicked on the overlay, etc. The next problem I'm trying to tackle is how to get directions from point A to point B (using point A as geolocation). On my campus there is about 2.5 miles+ of sidewalks but they aren't defined paths in google maps, so i cannot use the built in directions which Google maps offers.
Is there any way i can make it so it displays directions from point A to point B while making it so it displays a path along a sidewalk?
Thanks in advance.
EDIT: I already have the geolocation working also.
If Google doesn't know about the sidewalks, you will have to do the drawing yourself. You will need to store information about the sidewalks in a database, then come up with a routing algorithm, then draw a line (using the Polyline class).
For routing algorithms, you might be able to get away with using Dijkstra's algorithm
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
or you could try A*
http://en.wikipedia.org/wiki/A*_search_algorithm
or one of the other algorithms you can find in the Wikipedia sidebar on the Dijkstra and A* pages.
Polyline documentation:
https://developers.google.com/maps/documentation/javascript/overlays#Polylines

Displaying 3D routes in Google maps

I want user to be able to enter source/destination and take a virtual tour of the route.
PHP is my preferred solution. I am not sure where to start from. I do not have much experience with Google map 3D APIs so need some pointers.
I need something that is similar to Google maps's Helicopter view feature. Gives a bird's eye tour of your route.
Thanks in advance!
You will want to use Javascript, which powers the Google Earth API
Check out the examples at the code playground, especially how to create a line string (for your route) and how to move the camera

Get type of terrain by coordinate

I'm looking for a solution to be able determine landscape type by a given coordinate, for example check if current position is water/forest/town/road and so on. I found google.maps.MapTypeStyleElementType object specification in the Google Maps specification, but not sure if it could help me or not.
Probably, there are some another Maps API with such functioality? Or maybe I should refer to the different types of offline maps?
Nope, the link you send is just for styling the proper features, not to tell which feature is at a given coordinate. If you are interested in landscape, then Corine Land Cover is the thing you are looking for. It describes the types of biotops like forest, water, but also land use - meadow, field, buildings etc. However, I don't know if there is such an online service where you could query particular coordinates. Other solution for you would be to import these GIS layers (they are freely available) to your own gis map server. Maybe this is partially solved as there are e.g. projects how to incorporate these into openstreetmap.
Well not quite, but you could get close to what you're looking for by using the Google Reverse Geocoder and the Google Places API
Google Reverse Geocoding
http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding
If you send the service a geocode it will send back an address type and/or one of several adress components http://code.google.com/apis/maps/documentation/geocoding/#Types
Google Places API
http://code.google.com/apis/maps/documentation/places/
You could use the Google places API to search for for what's near. If the geocode is in the middle of the lake, the Places API may return something like "Lake Michigan" and then you'd know the terrain obviously.

How to find a closest street

I'm reading through Google Maps API documentation and I wonder if such a think is possible:
I specify the point (by coords)
I search for all roads, and junctions around the node (say in 1km radius)
I get parameters for the streets around (polyline coords)
Is it reachable, or google do not share that data?
Thanks in advance
Rafal
I can image writing up a little script that generates a bunch of random points within a 1km radius and then performs directions services via Google Maps API to obtain all possible routes and thus streets within a 1km radius. However, this is problematic since it is kinda against the Google Maps TOS of displaying this information only on a map within a website and not extracting data for you personal use as this would be.
A better approach would be looking into utilizing Open Street Map data where you can download street data from a specific viewport. If buying street network data is an option, you can go to a commercial outlet such as NAVTEQ or PTV which post-processes NAVTEQ data to a format for use in the transport modeling software package you mention on your blog.