trying to figure out N / S / E / W side of street w/ Google Maps API - api

Were using Google Maps API to figure out some GIS specific info but we're struggling to get the side of the street that an address or geocode is on. I've looked through stackoverflow and google maps api groups but not seeing too many other people who want/need this.
As an example, 40 St Marks Ave, Brooklyn, NY is on the S (South) side of the street, we can see this if we plot it using Google Maps, but I'm not seeing where this info is returned when we make an API call.
If it's something that the API really doesn't return, any of you folks have a clever way of figuring that out? Been scratching my head on this one and starting to think that I'm just not looking at it quite the right way.
btw, we definitely need the side of the street info returned as compass coordinates (aka N/S/W/E).
Thanks.

If I needed to do this I would:
look to see if ROOFTOP geocodes are available in the area of interest (they are for "40 St Marks Ave, Brooklyn, NY" gives
"location_type": "ROOFTOP"), if ROOFTOP geocodes are not available, this probably won't work.
get directions from that point to itself (should give you the closest location on the road):
example
calculate the [bearing](from the street to the building, or vice versa, depending on which gives you what you need).
use that to determine the compass direction.

A simple solution that comes to mind is to use a timestamp on multiple pictures, while moving down the street. From there we can get to know the direction of movement and know whether the building was on the left or right of the street.

Related

Google Reverse Geocoding - Urban/Rural flag, and Road Type

Would anyone happen to know if it is possible to obtain or derive the following pieces of information from the Google Reverse Geocoder API?
Urban Flag
I would like to know whether a given point is within an Urban or Rural zone/area.
Road Type
I would like to know the road type of a given point if the point is on a road. I would like to know whether it is a Major Highway, Secondary Highway, or a regular street.
Thanks!

MapView look for Places

I have a UIMapView in my iPhone-app.
First I want to show streetnames on it.
Second I want to give the user the chance to look for places with an UISearchViewController.
Are there any tutorials for these 2 points and which service do you think is the best for finding places?
You need to explore and understand Apple's MapKit Framework (https://developer.apple.com/library/ios/documentation/MapKit/Reference/MapKit_Framework_Reference/_index.html). To show stuff on the Map you can use MKAnnotations and MKLocalSearch to get points of interest around the user's location. The Documentation is super clear and has examples on how to get latitude/longitude, drop pins, pin-point user's location, add balloons with info (MKAnnotations), etc. Also, take a look at UISearchViewController documentation to see if it is the best for your use case.
Then, I would suggest you to take a look at Google Places Search API (https://developers.google.com/places/documentation/search) or Foursquare's API (https://developer.foursquare.com/docs/). At the end everything is about showing the info coming on a JSON response from one of the APIs on a List or on the Map with balloons.
If your data source ends up being Google Places... I would suggest you to use Google Maps for iOS instead of the native MapKit.
As for tutorials, there are probably 100s of them in the Interwebz... but I suggest you to start with Apple Documentation on MapKit understand that first and then try to mix it with other data sources.
Good luck and happy holidays!

Google Weather API - Portugese Language

So I know it's unofficial, and thus undocumented, but I think this should work. I'm using the Google Weather API to pull weather based on lat long. THese addresses work:
http://www.google.com/ig/api?weather=,,,32472408,-98796951&hl=es&unused=419334593
English, Spanish, Romanian, etc. etc. etc. However, the language code for portugese (PT), doesn't seem to return anything.
http://www.google.com/ig/api?weather=,,,32472408,-98796951&hl=pt&unused=419334593
Has anyone seen this? Any ideas on how to handle it (short of translating the entire response from English to Portugese)?
Can you use city locations instead? If so something like this will work for you
http://www.google.com/ig/api?weather=Lisboa,Portugal&hl=pt
http://www.google.com/ig/api?weather=New%20York,NY&hl=pt
I'm not sure why this wouldn't work as a language code for the latitude and longitude approach but it certainly doesn't seem to.

Constructing Intersections from Google Maps API

Problem:
I am trying to reverse geocode a lat/long into a closest street intersection using Google Maps API V3. Also, for now, this doesn't have to be super accurate-- as I am just trying to anonymize an address as opposed to providing directions.
I have seen that the Geocoding Results data contains an Address Component Type of "Intersection", but this doesn't seem to be consistent at all in the return results-- and is more often that not blank.
I have also done some looking on SO for the best way to construct this barring getting it from Google directly, and the closest I have seen is: How can I find the nearest intersection via the Google Maps API?, which doesn't really resolve my issue. In light of this I have come up with my own solution, and would like some opinions, optimizations, constructive criticism, or other options entirely.
My Tentative Solution:
After playing around with the API, I decided to give the following algorithm a shot (just for context, this is written in C# within a console app):
I take an address and resolve that into a lat/long.
I then add or subtract a certain amount of lat or long from the
coordinate-- on the order of a city block (a distance which is adjusted given your
latitude) and get walking directions between the points. I do this for up to all four directions-- so the first modification would be to keep the latitude the same but subtract some longitude. Then the next modification would be to keep the latitude and add some longitude, etc.
After getting the directions, I parse the results and check the start
and end address. If they are different, I pull out the street names
and treat them as an "intersection" (even though sometimes this
results in parallel streets-- again just trying to get a ballpark).
If I don't find two different streets, I widen the distance of the end destination and repeat the process.
So far this working well enough, but obviously it is an expensive process both in terms of time, and in using up my allotted query limit. Also, I checked the API terms of service, and as long as I include their disclaimer and display the results on a Google Map I think that I am ok.
My questions for the community are:
How can I improve the efficiency of the algorithm? Specifically, in
the number of times I call the API (the implementation code is not a
problem)
Is there another way entirely to do this using the Google Maps API?
In the SO question referred to above, the solution was to loop
over building numbers. I am not sure exactly what that means-- so any
clarification would be great.
As referred to above, I do not believe this is breaking the terms of service-- but am I mistaken?
Is there another web-based API to use that may meet my needs better?
Perhaps Bing, or some other provider?
Thanks a lot for any help.
UPDATE:
I have run into my query limit for the day, so I won't be able to test any suggestions against Google today, but I am also still open to using a different API. Thanks.
Old question, but since the original poster stated they were open to solutions other than Google, Geonames has a web API for this for the U.S. See GeoNames WebServices overview and http://www.geonames.org/maps/us-reverse-geocoder.html#findNearestIntersection

Question on Google Maps integration

I am working on a webapplication where I need to deliver products to houses in my country.
All the street names and neighborhoods are present in Google maps. I want to know if there is any way to get all the street data(street name, region) from Google maps into one single file to load in my database.
This way people can easily find there street with the auto-suggest options Javascript has. And then I can calculate the cost, trough distance, the people have to pay.
Or is there another way to use the Google maps data in my web application.
PS. sorry for this not being a programming question. If someone knows another place on StackExchange where I can get this question better answered this post can be relocated.
Getting everything in a database is not something Google is going to give you. It's taken them a lot of effort to build it and they want some return.
You do have the option of working with GeoNames where you can either download the database or use a webservice.
Alternatively, you could access Google's database using the Google Geocoding API.
I would recommend working with the Google version as it is much more likely to be up to date.
If you are looking for a way to calculate driving distance from one address to another so you could calculate costs, then I recommend you check out this article. Actually, I'm going to do exactly that on my current project. The problem is that we do not have specific addressing system in my country, so I'll have to use approximate estimations (within an area of the address that is...).