我正在寻找的是一个PHP函数,它采用这样的无格式查询:
$ sql ="选择名称,尺寸来自颜色='绿色'按价格asc"排序的东西";
这样它会出现在这样的HTML页面中:
SELECT
name, size
FROM
things
WHERE
color = 'green'
ORDER BY
price ASC';
phpMyAdmin中有一些代码可以执行此操作,我猜我可以查看!
这个:
gdallocationinfo -valonly -wgs84 file longitude latitude
Run Code Online (Sandbox Code Playgroud)
提供文件中已解析像素的值。
是否有gdal可以从相邻像素提供插值的函数?
例如,这些调用读取伦敦格林威治公园的海拔:
gdallocationinfo -wgs84 srtm_36_02.tif 0 51.4779
47
gdallocationinfo -wgs84 srtm_36_02.tif 0 51.4780
37
Run Code Online (Sandbox Code Playgroud)
对于向北约 11 米的 0.0001° 运动,海拔下降 10 米。
文件中的像素相当粗糙——相当于地面上大约 80 米。我想得到更平滑的值,而不是突然的大跳跃。
我目前使用的解决方法是使用此转换以四倍的分辨率重新采样源文件:
gdalwarp -ts 24004 24004 -r cubicspline srtm_36_02.tif srtm_36_02_cubicspline_x4.tiff
Run Code Online (Sandbox Code Playgroud)
与以前使用新文件相同的位置的海拔请求:
gdallocationinfo -wgs84 srtm_36_02_cubicspline_x4.tiff 0 51.4779
43
gdallocationinfo -wgs84 srtm_36_02_cubicspline_x4.tiff 0 51.4780
41
Run Code Online (Sandbox Code Playgroud)
这要好得多,因为只有 2 米的跳跃。
这种方法的缺点是生成更高分辨率的文件需要几分钟,但主要问题是文件大小从 69MB 变为 1.1GB。
我很惊讶重新采样不是 的直接选择gdallocationinfo,或者我可以使用另一种方法?