OpenStreetMap的法国地区、省份、区镇、市镇等形状文件
项目描述
摘要
从OpenStreetMap或IGN操作法国地区、省份、区镇、市镇等多边形,用于在地图上使用leaflet显示。
从OSM导入数据
形状文件来自 http://osm13.openstreetmap.fr/~cquest/openfla/export/ (也分享在 https://www.data.gouv.fr/fr/organization/openstreetmap)
不同的分辨率(从5米到100米,取决于显示地图的比例尺)。
以下示例导入地区、省份、区镇、epci和市镇的多边形
$ cubicweb/bin/cubicweb-ctl osmfrance_import_shp <myinstance> \
> --regions=path/to/regions-20140306-100m-shp.zip \
> --departements=path/to/departements-20140306-100m-shp.zip \
> --arrondissements=path/to/arrondissements-20140306-100m-shp.zip \
> --epci=path/to/epci-20140306-100m-shp.zip \
> --communes=path/to/communes-20140306-100m-shp.zip
从IGN导入数据
形状文件来自GEOFLA版本1.1
http://www.data.gouv.fr/en/dataset/geofla-communes http://www.data.gouv.fr/fr/dataset/geoflar-arrondissements http://www.data.gouv.fr/en/dataset/geofla-departements-30383060
$ cubicweb/bin/cubicweb-ctl ign_import_shp <myinstance>
> --departements=path/to/DEPARTEMENT.SHP \
> --arrondissements=path/to/ARRONDISSEMENT.SHP \
> --communes=path/to/COMMUNE.SHP
数据查询
以下查询返回仅市镇(城市)的多边形角(作为纬度、经度坐标)
Any DISPLAY(G, 4326) LIMIT 10 WHERE X geometry G, X is Commune
以下返回所有类型
Any DISPLAY(G, 4326) LIMIT 10 WHERE X geometry G
显示数据
可以使用leaflet cube在地图上显示这些多边形;用于此的CW视图是 leaflet-geojson
例如,以下查询
Any DISPLAY(G, 4326),X LIMIT 20 WHERE X geometry G, X is Departement
应显示20个省份,使用X(省份eid)作为Z值(颜色值)使用黄色-红色颜色图。
使用leaflet视图的相应URL是
http://<server>/view?rql=Any+DISPLAY%28G%2C+4326%29%2CX+LIMIT+20+WHERE+X+geometry+G%2C+X+is+Departement&vid=leaflet-geojson
项目详情
关闭
cubicweb-osmfrance-0.2.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2e8f0d0aba8584ef9b5eaebff895b749af5a9ed5fae551ee0a45bbad309e1abe |
|
MD5 | e173222c7b52facfe4450e30d46e5450 |
|
BLAKE2b-256 | 996758e020879b6e2e86021c2c12ae08a4311475130c563a964236015cb6183b |