zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    Flexigrid在IE下不显示数据的处理
    [置顶] ios 网页中图片点击放大效果demo
    WPF仿360卫士9.0界面设计
    Android调用相机并将照片存储到sd卡上
    Android 将文件保存到SD卡,从卡中取文件,及删除文件
    java 正则表达式学习
    linux下的块设备驱动(一)
    已知用经纬度表示的两点,求两点之间的直线距离
    IndiaHacks 2016
    IndiaHacks 2016
  • 原文地址:https://www.cnblogs.com/unlockth/p/14086668.html
Copyright © 2011-2022 走看看