根据地理位置从集合中选择照片的脚本。
geoselect的Python项目详细描述
根据地理位置从集合中选择照片的脚本。 通过十进制纬度/经度点。或是在 期望的位置,它将寻找EXIF标准化的GPS LAT和 经度标记。
安装
PIP
最简单的方法是使用pip下载和安装脚本。
pip install geoselect
获取(最新)源
# clone this repo clone https://github.com/FreekKalter/geoselect.git cd geoselect # initialize virtual environment (optional, but recommended) virtualenv venv source venv/bin/activate # install (--editable to hack on code whithout running pip install again) pip install --editable .
使用
有两种方法可以指定要选择的位置。位置可以是 “纬度,经度”以十进制度数表示,例如:“41.40338, 2.17403英寸。或者它可以是一个带有EXIF GPS坐标的照片的路径,它 然后将搜索在同一位置拍摄的照片。它会搜索 在指定半径内(默认值:1公里)。
如果设置了--path,geoselect将查看该位置的图像 具有通用文件扩展名(jpg、jpeg、gif、bmp、png)。这个可以设定 使用--extensions参数执行其他操作。如果--path是 未设置,图片路径是从stdinput获取的。这样就可以了 用作流过滤器,就像大多数unix/linux命令行实用程序一样。为了 以以下管道为例: find /home/fkalter/photos -name '*holiday*' | geoselect --radius 10 "40.783068, -73.965350" | wc -l 要计算在中央公园内/周围拍摄的照片数量 文件名中的“holiday”。
(expiremental)功能使用图片拍摄到gues的时间 它的制造地点。有时用来制作图片的装置 需要一段时间才能得到“GPS定位”。所以它可能不会注册GPS 系列中第一张图片的坐标。那--time-based option查找在 拍摄指定位置的照片。因为很有可能 每次拍摄后不久的照片 同一地点。
usage: geoselect.py [-h] [--path PATH] [--extentions EXTENTIONS] [--copy-to COPYTO] [--time-based] [--radius RADIUS] [-V] location A script to select photos from a set, based on geographical location. Either via a decimal latitude/longitude point. Or a photo taken in the desired location, it will look for exif standerized gps lat- and longitude tags. positional arguments: location location given in decimal degrees like: "40.783068, -73.965350", or a path to a photo with exif gps info optional arguments: -h, --help show this help message and exit --path PATH path to look for image files, if not set files will be taken from stdin --extentions EXTENTIONS comma separated list of extension to look for in PATH --copy-to COPYTO path where found photos should be copied --time-based also add photos wich themselfs dont have gps information, but are taken in a short time before or after one that has (in the right location) --radius RADIUS radius of area (in kilometers) to select photos from -V, --version show program's version number and exit