• gdal程序执行反距离加权插值运算


    参考管网gdal_grid

    gdal的msi文件下载

    1.GeoJSON 数据

    1.1 经纬度数据(EPSG:4326)

    gdal_grid -a invdist:power=2.0 -txe 102.620777 102.7881 -tye 24.931334 25.125699 -a_srs EPSG:4326 -outsize 300 259 -zfield c10 -of GTiff -ot Float64 -l dem D:dem.geojson D:dem.tiff
    

    1.2 Web墨卡托数据(EPSG:3857)

    gdal_grid -a invdist:power=2.0 -txe 11423692.6404500808566809 11442318.9516080822795630 -tye 2867312.9072038829326630 2891191.8293626653030515 -a_srs EPSG:3857 -outsize 300 259 -zfield c10 -of GTiff -ot Float64 -l dem_3857 D:dem_3857.geojson D:dem_3857.tiff
    

    2.VRT数据

    2.1 编辑csv与vrt文件

    1.csv文件未指定列名

    dem.csv文件:

    102.711483,25.05689,0.123
    102.662463,25.052893,0.677
    102.650627,25.071291,0.296
    ...
    

    dem.vrt文件:

    <OGRVRTDataSource>
        <OGRVRTLayer name="dem">
            <LayerSRS>EPSG:4326</LayerSRS>
            <SrcDataSource>D:dem.csv</SrcDataSource>
            <GeometryType>wkbPoint</GeometryType>
            <GeometryField encoding="PointFromColumns" x="field_1" y="field_2" z="field_3"/>
            <Field name="x" src="field_1" type="Real" />
            <Field name="y" src="field_2" type="Real"/>
            <Field name="z" src="field_3" type="Real" />
        </OGRVRTLayer>
    </OGRVRTDataSource>
    

    2.csv文件指定列名

    dem.csv文件:

    Easting,Northing,Elevation
    102.711483,25.05689,0.123
    102.662463,25.052893,0.677
    102.650627,25.071291,0.296
    ...
    

    dem.vrt文件:

    <OGRVRTDataSource>
        <OGRVRTLayer name="dem">
            <LayerSRS>EPSG:4326</LayerSRS>
            <SrcDataSource>D:dem.csv</SrcDataSource>
            <GeometryType>wkbPoint</GeometryType>
            <GeometryField encoding="PointFromColumns" x="Easting" y="Northing" z="Elevation" />
            <Field name="x" src="Easting" type="Real" />
            <Field name="y" src="Northing" type="Real" />
            <Field name="z" src="Elevation" type="Real" />
        </OGRVRTLayer>
    </OGRVRTDataSource>
    

    2.2 执行命令

    gdal_grid -a invdist:power=2.0 -txe 102.620777 102.7881 -tye 24.931334 25.125699 -a_srs EPSG:4326 -outsize 300 259 -of GTiff -ot Float64 -l dem D:dem.vrt D:dem.tiff
    
  • 相关阅读:
    安装LVS安装LVS和配置LVS的工作比较繁杂
    移动web开发研究
    10个顶级的CSS UI开源框架
    Jquery使用tbody编辑功能实现table输入计算功能
    【开源】Hawk-数据抓取工具:简明教程
    55个最实用大数据可视化分析工具
    Apache本地服务无法自启动问题解决
    网站10大致命SEO错误
    企业管理:名片的重要性
    开发人员应该知道的SEO
  • 原文地址:https://www.cnblogs.com/unlockth/p/14086668.html
Copyright © 2020-2023  润新知