geojson文件格式
https://geojson.org/
GeoJSON supports the following geometry types:
- Point,
- LineString,
- Polygon,
- MultiPoint,
- MultiLineString, and
- MultiPolygon.
Geometric objects with additional properties are Feature objects. Sets of features are contained by FeatureCollection objects.
https://gdal.org/en/stable/drivers/vector/geojson.html
利用qgis将geojson转为kml
插入xyz图源后,要设置图层CRS
图层属性EPSG:3857
工程属性设置为EPSG:4326
这个时候,鼠标的坐标才会显示正确的经纬度
因为map源数据大部分都是EPSG:4326
的数据源格式的数据,但是使用EPSG:4326
的坐标系地图会出现被压缩的感觉。所以我们都是采用 EPSG:3857
的坐标系类型,把数据源转换位 EPSG:3857
的数据源即可。但是这个EPSG:3857
数据源不易读取和值占内存原因,所有结合两者的缺点,我们采用坐标转换,即 EPSG:4326
转 EPSG:3857
。 所有请理解这句话:通常:数据存储在EPSG:4326
中,显示在EPSG:3857
中
————————————————
版权声明:本文为CSDN博主「Q_Q 忙里偷闲」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36410795/article/details/106429109
geojson从qgis里导出kml,要留意字段出错提示,如果出错,则勾选上<以显示值取代所有选中的原始字段>即可,这些字段其实不影响kml结果。
go-mapus里xml文件转geojson文件出错
目前,go-mapus导出geojson文件,拖入qgis,导出kml,kml拖入qgis,导出geojson文件,geojson再导入go-mapus,测试文件通过。
但是,qgis导出的kml文件,用go-mapus的xml2geojson工具,转换出错,可能是因为qgis导出的kml,和91卫图导出的xml格式还是有一点区别
geojson.features.push({
type: "Feature",
properties: {
Name: bb[i]
.split("<Placemark")[1]
.split("<name>")[1]
.split("</name>")[0], // 这里出错!
},
有时候遇到91等软件导出的xml文件存在<name/>
这个情况,导致文件转换失败,请全局替换<name/>
为<name>某某</name>
;为什么不直接替换为空呢,因为会将其他/name
替换掉。
所以,gomapus的xml to geojson转换程序只适合91卫图这种多一个<name>某某</name>
的情况。如果<Placemark>
里没有,则出错。如果有需要其他xml转geojson的,只需要稍微修改一下代码即可。
<Folder>
<name>pipe_cen</name>
<Placemark>
<name/>
<description/>
<styleUrl>#1632796375</styleUrl>
<LineString>
<coordinates>
最后编辑:秦晓川 更新时间:2025-09-28 16:39