geojson 导入mysql,GeoJson世界数据库

作者寻求将国家列表转化为GeoJson格式的数据,以支持D3.js地图展示。他们分享了过去使用免费开源资源(如Natural Earth Data和QuantumGIS)进行转换的方法,但提到文件庞大且可能需要按国家拆分。提问者希望找到更便捷的服务或程序来简化这个过程。
摘要由CSDN通过智能技术生成

I am working on a project where it is necessary to display maps of countries and cities using d3.js.

Actually, D3 supports GeoJson format. Usually, I guess, GeoJson format is converted from some other format.

I found some places with this GeoJson data:

But, this is only a list of countries, I am looking for some service or program that gives me the ability to set an ID, get this format, and convert it to GeoJson, or get it in GeoJson better.

Thanks!!

解决方案

Does this need to be a service? Here's how I've approached this in the past, using free/Open Source tools:

Download public-domain shape files from Natural Earth Data

Use Quantum GIS to convert .shp to .geojson (one step, under "Layer > Save As...")

Now you have hi-res GeoJSON data. Here, have some countries.

This is a really big file, though, so you'll want to split it up. But you don't need a service for this, just static files for each country, named by ID. This would be easy enough to produce with a script in your utility of choice (Python, Ruby, node.js).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值