如何将 Zillow 中的 Arc Shapefile 转换并导入到弹性搜索数据库中?

How to convert and import Arc Shapefile from Zillow into an elastic search database?

我想创建一个基于 Zillow 的社区数据的服务,我需要将 Arc Shapefile 格式转换为数据(json?),我可以将其作为地理形状导入 ElasticSearch。

数据:

http://www.zillow.com/howto/api/neighborhood-boundaries.htm

ElasticSearch(数据的目的地)

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html

有没有我可以使用的免费工具,最好是在 node.js 或 .net 中将文件转换为 json - 或者直接导入到更主流的数据库中?我可以借助一些帮助从形状文件中获取原始数据,然后我可以自己解析和加载数据。

所以我可以使用 GDAL 框架中的 ogr2ogr 将数据从 shapefile 转换为 json,然后我可以将其导出到 elasticsearch。

ogr2ogr -f GeoJSON -t_srs crs:84 NY.geojson ZillowNeighborhoods-NY.shp

参见 http://geojson.org/ 和 GDAL ogr2ogr