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

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!

Related

Specific cloaking for legal reasons, better solution?

I have a somewhat specific question about Cloaking, I'm aware that this might be one of the worst things to do for SEO, however my client has a product that is due to legal reasons named differently in Germany, now this means based on the location of the visitor we have to change that name, therefore it has nothing to do with SEO at that point and we'd replace just the product name. Does anyone know if this affects SEO or knows about a technique to avoid this but still achieve our goal?
As long as you serve the same content to users as you would to search engines, then it is not cloaking. eg - for german IP addresses/users, they get xx, and any german search bots would too. Google mainly crawls from usa.

How to optimise Google Translate API calls to translate multiple words in a single request

Everyone. Recently Google Translate Is Integrated Into My Project, Which Plays The Role Of Translating Some Product Names, Product Descriptions, Product Related Category Names. But Cause There Are Plenty Of Products In My Database(And Increased Quickly), Google Translate Api Would Cost Considerable Money.
I Want To Translate By Google As Less As Possible. In The Translation, Many Words Are Same Among Many Products, For Example : 阿迪达斯 - Adidas, 苹果 - iphone, 篮球 - Basketball, Bla Bla..... I Wanna Do Some Tricks, But Find No Idea.
Did Anyone Encounter Such Questions?
Any Help Would Be Appreciated.
It sounds like what you need is actually the ability to reuse translation at the string or substring level (in other words, per database entry). You can't really do that with Google, that I know of. You've got a few options, as I see it:
You could switch over to Microsoft Translator and use their methods
that allow you to place translations yourself, such as their
Collaborative Translation feature that lets you override the MT with
a preferred translation and even to vote translations up/down. Quality here will be broadly comparable to Google (I often find it better), and you have methods at your disposal that allow this override. Also, unlike Google, the Microsoft API is free up to a certain volume. Take a look:
http://www.microsoft.com/en-us/translator/developers.aspx
Microsoft also has a unique feature called the Microsoft Translator Hub, which can use your terminology, for example, for translations. However,depending on how you implemented any solution with Microsoft, you might still have the problem that you are making more calls out to Microsoft than you'd like, and, moreover, that "matching" only takes place at the level of a whole record or string, so it would not hit the case of shared linguistic elements being concatenated into one string.
There's a commercial offering called GeoFluent (full disclosure--I am the product manager for this product, so I'm clearly biased :)) that works with Microsoft Translator but provides pre and post translation processing that can deal with sub-segment and may reduce the volume you are therefore putting through translation each time. It could make sense if, as you mention, you are rapidly adding to your database. Of course, this is a commercial offering too, so you'd have to balance the costs.
Let me know if this helps, and happy to answer any other questions you have.
Marcus
There is a PHP sample here : http://weblite.ca/svn/dataface/modules/tm/trunk/lib/googleTranslatePlugin.php
That allows you to send and array and return an array.
array(source=>target) getTranslations()
translates all of the user provided strings into the target language using the Google Translate API and returns an array of source=>target
strings.

trying to figure out N / S / E / W side of street w/ Google Maps 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.

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...).