确定所在位置的地形类型 [英] Determine type of terrain at location
问题描述
我正在尝试确定任意位置的地形类型.例如,如果我使用Google Maps,我可以通过地图上显示的颜色直观地看到什么是森林,建筑面积和水域.
I'm trying to determine the terrain type at an arbitrary location. If I make use of Google Maps for instance, I can visually see what terrain is forest, built up areas and water for instance by the colour displayed on the map.
我正在尝试查看是否可以使用某种API调用来获取此基本信息.我不需要非常精确,也不需要确定确切的地形类型(因此,像Corine Land Cover这样的东西实在是太过分了).我将每隔几分钟就要提出许多这样的要求.我已经找到了一个早在3年前就问过的问题真的解决了,我希望现在有所改变.
I'm trying to see whether there's any sort of API call I can use to get this basic information. I don't need it to be highly precise and I don't really need to determine the exact terrain type (so stuff like the Corine Land Cover is pure overkill). I'm going to need to make a number of these requests every few minutes. I've found a previously asked question around 3 years ago which wasn't really resolved, I'm hoping that there's been a change now.
有什么我可以使用的吗?我实际上正在考虑自己阅读显示的地图图块并获取像素颜色,但是如果有更简单的方法,我将不胜感激.
Is there anything I can use? I'm actually considering reading the displayed map tile myself and grabbing the pixel colour, but I'd appreciate if there was a simpler method.
推荐答案
似乎他们没有提供执行此操作的API.
It doesn't seem like they provided the API to do that..
一种解决方法是使用其静态地图API.
A work around would be to use their static maps API.
基本上,在关闭除水和绿色之外的所有东西之后,您会得到类似以下的内容:
basically after you turn off everything but the water and greens, you get something like this:
您可以将尺寸设置为1px x 1px,放大并检查该图像的颜色以确定该位置区域的类型.
you can, make the size to be 1px by 1px, zoom in, and check the color of this image to decide the type of area of this location.
这篇关于确定所在位置的地形类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!