2019年12月18日星期三

filezilla内容列表字体非常小

fractional-scaling-on-xorg-linux

Place this in ~/.profile. These variables will take effect when you log in.

export GDK_SCALE=2
export GDK_DPI_SCALE=0.5



wxGTK3 Linux: small fonts in directory trees

Is there any way to influence the font size of the file list?

PointZ and PointM Data Types

PointZ and PointM Data Types

PointZ and PointM have the same properties as the Point data type except they contain one more ordinate. 

The Z is the elevation and the M is the measurement. 

Syntactically these types are similar.

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/

2019年12月8日星期日

osx brew gdal

osx中,postgis自带的ogr2ogr执行的sql包含ST_Centroid时,出错,原因不明,
使用brew install 的gdal,没有问题。

How to Find Where Homebrew Packages Are Installed on Mac

gdal Formula

ogr2ogr centroid.shp fields.shp -dialect sqlite -sql "SELECT ST_Centroid(geometry), id, name from fields"

Debian中安装postgresql

install-postgresql-database-in-debian-10

2019年12月2日星期一

gdal:shape文件添加面积属性

ogrinfo -al -so         2max_elements_0.shp

ogrinfo  -sql       "alter table  \"2max_elements_0\"  add column area real(20,3)" 2max_elements_0.shp

ogrinfo  -dialect SQLite -sql   "update \"2max_elements_0\" set area = ST_Area(geometry)" 2max_elements_0.shp


备注:

Because UPDATE is not supported in OGR SQL, you should update the table using the SQLite SQL dialect available in GDAL >= 1.10 with SQLite and SpatiaLite support.[1]

GDAL is internally using the Virtual Table Mechanism of SQLite and therefore operations like ALTER TABLE are not supported. [2]