2019年12月14日星期六

gdal中配置选项的使用

1、转换dxf文件时经常用到的选项
     set GDAL_FILENAME_IS_UTF8=NO
     set OGR_ARC_MAX_GAP=20
     set DXF_ENCODING=CP936
ogr2ogr --config OGR_ARC_MAX_GAP 20 -s_srs EPSG:2384 -t_srs EPSG:2384 -f "ESRI Shapefile" center_line2.shp  道路中心线.dxf

ogr2ogr --config OGR_ARC_STEPSIZE 1 -s_srs EPSG:2384 -t_srs EPSG:2384 -f "ESRI Shapefile" center_line3.shp  道路中心线.dxf

ogr2ogr -segmentize 20 -s_srs EPSG:2384 -t_srs EPSG:2384 -f "ESRI Shapefile" center_line5.shp  道路中心线.dxf

ogr2ogr --config GDAL_FILENAME_IS_UTF8 NO -simplify 10  -s_srs EPSG:2384 -t_srs EPSG:2384 -f "ESRI Shapefile" center_line8.shp  道路中心线.dxf

2、官方文档
      https://gdal.org/drivers/vector/dxf.html#vector-dxf

      https://trac.osgeo.org/gdal/wiki/ConfigOptions

      https://gdal.org/user/configoptions

      set-default-gdal-ogr-config-options

      using-dxf-arc-or-circle-accurately-in-arcgis-for-desktop

 3、多段线简化

      cmdoption-ogr2ogr-simplify

      cmdoption-ogr2ogr-segmentize

     道格拉斯-普克算法

    Ramer–Douglas–Peucker algorithm

iterative-version-of-ramer-douglas-peucker-line-simplification-algorithm/

没有评论: