Get type of terrain by coordinate

2019-02-18 16:08发布

问题:

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?

回答1:

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.



回答2:

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.