简体   繁体   English

Rails Geocoder MapIt功能的替代品

[英]Rails Geocoder MapIt functionality alternatives

I'm working with rails, geocoder and gmap4rails. 我正在使用rails,geocoder和gmap4rails。 Trying to figure out how to show boundaries of an ward district area in UK. 试图弄清楚如何显示英国病区区域的边界。 Found mapit - Mapit by mySociaty . 由mySociaty找到mapit- Mapit Would be amazing if anyone could suggest or point me in the direction for creating a similar functions in rails. 如果有人可以建议或指出我在rails中创建类似功能的方向,那将是惊人的。 I'm especially interested in functions like 'Touching this area' as showed in the mapit.mysociety.org site. 我对mapit.mysociety.org网站中显示的“触摸此区域”之类的功能特别感兴趣。

Google maps also show boundaries of an area eg google map example Shows boundaries for 'Roath' area. 谷歌地图还显示区域的边界,例如谷歌地图示例显示“ Roath”区域的边界。 is there anyway retrieve that data from google ? 反正有从谷歌检索数据吗? I also tested a lot of addresses with geocoder, looking up in google. 我还使用Geocoder测试了很多地址,在Google中查找。 Tried to Geocode from address administrative_area_level_1 2 and 3 as well as in locality or sublocality. 尝试从地址Administrative_area_level_1 2和3以及地区或子地区访问地理编码。 The results were very unreliable. 结果非常不可靠。 Tried at least 20 addresses from birmigham city - only some of them returned administrative_area_level1,2,3 or locality or sublocality and most of the time it was wrong data. 尝试过至少20个来自伯明翰市的地址-只有其中一些返回了Administrative_area_level1,2,3或地区或次地区,并且大多数时候返回了错误的数据。

Another website that is sort of showing ward areas with in a city is www.streetlife.com I think it only works for UK users. 另一个显示城市中病房区域的网站是www.streetlife.com,我认为它仅适用于英国用户。 basically it takes a postcode from a user and then in their map they show users district and other district around it, which is pretty cool :) Does anyone know how it works ? 基本上,它从用户那里获取邮政编码,然后在他们的地图中向用户显示用户所在的区域以及周围的其他区域,这非常酷:)有人知道它是如何工作的吗? or how to get something like that working in rails ? 还是如何在铁轨上工作?

I would really love to discuss this topic in more depth and figure out the best answers for it. 我真的很想更深入地讨论该主题并找出最佳答案。

This question at gis.stackexchange is probably of use to you if you wish to use rails. 如果您希望使用rails ,则gis.stackexchange中的这个问题可能对您有用。 The "touching" feature is fundamentally a PostGIS query, so you could build on top of anything that allowed you to make SQL queries to a PostgreSQL database - GeoDjango (on which MapIt is built) makes this nice, but you could certainly accomplish the same in rails with work. “接触”功能从根本上来说就是PostGIS查询,因此您可以在允许对PostgreSQL数据库进行SQL查询的任何内容的基础上进行构建-GeoDjango(基于MapIt的构建基础)使这一工作变得很不错,但是您当然可以实现相同的功能在工作的轨道上。

You won't be able to get those boundaries you see out of Google Maps, I believe, as it's proprietary. 我认为,您将无法从Google地图中看到这些边界,因为它是专有的。

Geocoding is a separate topic - you may want to look at things like OpenStreetMap's Nominatim ( MapQuest have a version) or GeoNames , which could supply a dataset you could use with geocoder - Ordnance Survey also publish GB datasets that could be of use. 地理编码是一个单独的主题-您可能希望查看OpenStreetMap的NominatimMapQuest具有版本)或GeoNames之类的东西 ,它们可以提供可与地理编码器一起使用的数据集-Ordnance Survey还发布了可能有用的GB数据集

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM