这个你d3.js数据里面去找,下面这个网站去下载,
或者你可以下载SHP文件,参考这个人的
===========================
此外MySQL57 里面有 ST_AsGeoJSON
===========================分割线====================================
# this is a file to decode the shape file into the geojson
# a.shape file consists of a.shp ,a.prj,a.shx,a.dbf
# .shp file header struct
# ---------------------------
# 1.Big Integer 4 byte
# 2.Little Integer 4 byte
# 3.Little Double 8 byte
# ---------------------------
# typedef struct header{
# UNDEFINED 7 Big Integers 28byte
# Version 1 Little Integers 4byte
# ShapeType 1 Little Integers 4byte
# EXTENT 4 Little Double 32byte
# 3D-PROPS 4 Little Double 32byte
# }
#
#
import struct
import json
def readShp(filepath):
features = []
bbox=[]
featurecollections = {"type