是否有一个OpenStreetMap的API? [英] Is there an API for openstreetmap?
问题描述
我不知道是否有任何API我可以通过查询OSM的数据,例如;是(lon_1,lat_1)在陆地或海上?或可能是可能得到一个岛屿作为一个良好定义的多边形?迄今为止我见过的唯一用途刚刚工具呈现OSM数据(生成砖)。
I wonder if there is any API I could query OSM data through, for example; Are (lon_1, lat_1) at land or at sea? Or could it be possible to get an island as a well-defined polygon? The only usage I've seen so far has just been tools for rendering OSM data (generating tiles).
推荐答案
我发现了一个伟大的API,用于读取数据OpenStreetMap的; Mapscript 。
这是地图服务器的接口,这是能够读取* .MAP和*的.shp文件。它是能够使用一个空间索引,因此是潜在的非常快。我已经做了随机的多边形查找(检查是否多边形相交的土地)全球海岸线形状文件在40毫秒。
I've found a great API for reading Openstreetmap data; Mapscript. This is an interface to MapServer, which is able to read *.map and *.shp files. It is able to use a spatial index and is therefore potentially extremely fast. I've done random polygon lookups (checking if a polygon intersects land) of the world coastline shape file in 40 ms.
这篇关于是否有一个OpenStreetMap的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!