如果我是在村里还是在村外(城市),如何获取信息? (适用于OSM的iOS地理编码器或Overpass API) [英] How to get info if I am in village or out of the village (city)? (iOS geocoder or Overpass API for OSM)

查看:116
本文介绍了如果我是在村里还是在村外(城市),如何获取信息? (适用于OSM的iOS地理编码器或Overpass API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以使用iOS SDK(地理编码器信息)或OSM的Overpass API来确定我是在村庄/城市内还是在村庄/城市外?

Is there any way to find out if I am within village/city or out the village/city using iOS SDK (geocoder information) or Overpass API for OSM?

我知道有商业上的API提供此功能,但是我想知道它是否存在免费的API或服务吗?我正在使用伪导航应用程序,我需要有关当前位置的此信息.

I know there are commercially APIs providing this feature, but I am wondering if it exists any API or service for free? I am working on pseudo-navigation app and I need this info about my current location.

目前,我正在使用地理编码-有关位置的地标信息-如果thouroughfare为空或某个数字(街道或道路号)-我不在城市里.如果有一些字符串"-这是街道名称,我在城市中.但是这种方法是非常不准确的.我也在考虑将Overpass API用于开放街道地图,并且想知道OSM是否提供此类信息.谢谢你的来信.

For now I am using geocoding - placemark info about location - if thouroughfare is null or some number (street or road No.) - I am out the town. If there is some 'string' - it is street name and I am in the city. But this approach is very inaccurate. I am also considering using Overpass API for Open Street Maps and I am wondering if OSM provides such information. Thanks for any sugestions.

谢谢

推荐答案

iOS位置服务仅提供有关设备位置的信息,但不提供有关位置背景的信息,例如它们在哪个城市附近以及距它们有多近它.地理数据(例如您感兴趣的数据)需要付出一定的代价,这就是为什么要提供商业SDK的原因.

iOS location services provide information about the device's position, but not information about the context of the position, such as which city they are near and how close they are to it. Geographic data such as what you're interested in comes at a price, which is why there are commercial SDKs providing it.

这篇关于如果我是在村里还是在村外(城市),如何获取信息? (适用于OSM的iOS地理编码器或Overpass API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆