1.打开https://www.gisinternals.com/release.php
本人电脑是x64,下载对应版本release-1930-x64-gdal-3-6-2-mapserver-8-0-0
2.解压安装包
3.环境变量配置
a.新增SDK_ROOT
变量名,值为D:\Software\Development\release-1930-x64-gdal-3-6-2-mapserver-8-0-0
(根据解压的路径设置)
b.编辑path
变量,新增值
%SDK_ROOT%\bin;%SDK_ROOT%\bin\gdal\python\osgeo;%SDK_ROOT%\bin\proj\apps;%SDK_ROOT%\bin\gdal\apps;%SDK_ROOT%\bin\ms\apps;%SDK_ROOT%\bin\gdal\csharp;%SDK_ROOT%\bin\ms\csharp;%SDK_ROOT%\bin\curl;%PATH% GDAL_DATA=%SDK_ROOT%bin\gdal-data GDAL_DRIVER_PATH=%SDK_ROOT%\bin\gdal\plugins PYTHONPATH=%SDK_ROOT%\bin\gdal\python;%SDK_ROOT%\bin\ms\python PROJ_LIB=%SDK_ROOT%\bin\proj\SHARE;
4.打开命令行界面,输入ogr2ogr进行测试
5.文章参考
https://www.gisinternals.com/release.php
https://blog.csdn.net/czdfn000/article/details/125917426
https://gdal.org/programs/ogr2ogr.html
http://download.osgeo.org/gdal/
http://naturalatlas.github.io/node-gdal/classes/gdal.html
https://www.npmjs.com/package/gdal-async
GDAL/OGR 快速入门
OGR2ogr-JS开源库
gdal-ogr2ogr空间数据转换
使用GDAL的ogr2ogr工具,结合ArcGIS Desktop对Geojson数据编辑
C# GDAL开发环境配置
GDAL C# 开发环境配置
GDAL - 地理数据导入PostGIS
官网提供的csharp实例代码片段