尝试在UBUNTU虚拟机中安装gdal2.1时,这将是我的命令行序列.我的虚拟机是UBUNTU 16.04 LTS(64位)我需要gdal2.1,特别是Python绑定在python中使用它.当前安装的python版本是2.7.11+,我安装了numpy,因为我知道GDAL是必要的.现在的命令行了
我在GDAL2.1的Pypi页面中找到的说明:
antonio19812@antonio19812-VirtualBox:~$ sudo apt-get install libgdal1i
libgdal1i is already the newest version (1.11.3+dfsg-3build2).
antonio19812@antonio19812-VirtualBox:~$ sudo apt-get install libgdal1-dev
libgdal1-dev is already the newest version (1.11.3+dfsg-3build2).
antonio19812@antonio19812-VirtualBox:~$ sudo pip install gdal
Collecting gdal Downloading GDAL-2.1.0.tar.gz (619kB) 100% |????????????????????????????????| 624kB 247kB/s
Installing collected packages: gdal
Running setup.py install for gdal ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;file='/tmp/pip-build-_sHDUY/gdal/setup.py';
exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record /tmp/pip-eOB65J-record/install-
record.txt --single-version-externally-managed --compile:
running install
running build
running …Run Code Online (Sandbox Code Playgroud) 我有2个列表(list1,list2),其中包含各种位置的纬度/经度.一个list(list2)具有没有的位置名称list1.
我想要list1中每个点的近似位置.所以我想指出一点list1,试着寻找最近的点,list2然后选择那个地方.我重申每一点list1.它还需要距离(以米为单位)和点的索引(in list1),因此我可以围绕它构建一些业务规则 - 基本上这些是应该添加到list1(near_dist,indx)的2个新cols .
我正在使用该gdist功能,但我无法使用它来处理数据帧输入.
示例输入列表:
list1 <- data.frame(longitude = c(80.15998, 72.89125, 77.65032, 77.60599,
72.88120, 76.65460, 72.88232, 77.49186,
72.82228, 72.88871),
latitude = c(12.90524, 19.08120, 12.97238, 12.90927,
19.08225, 12.81447, 19.08241, 13.00984,
18.99347, 19.07990))
list2 <- data.frame(longitude = c(72.89537, 77.65094, 73.95325, 72.96746,
77.65058, 77.66715, 77.64214, 77.58415,
77.76180, 76.65460),
latitude = c(19.07726, 13.03902, 18.50330, 19.16764,
12.90871, 13.01693, 13.00954, …Run Code Online (Sandbox Code Playgroud)