Skip to main content

根据地理位置从一组照片中选择照片的脚本。

项目描述

根据地理位置从一组照片中选择照片的脚本。通过十进制纬度/经度点。或者在所需位置拍摄的照片,它会寻找 exif 标准化 gps 纬度和经度标签。

安装

最简单的方法是使用 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 .

使用

有 2 种方法可以指定要选择的位置。LOCATION 可以是以十进制度数指定的“纬度,经度”,例如:“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 计算在中央公园/周围拍摄的文件名中包含“假期”的照片数量。

(实验性)功能使用拍摄照片的时间来让观众在拍摄照片的位置。有时用于制作图片的设备需要一段时间才能获得“gps 修复”。因此它可能不会为系列中的第一张图片注册 gps 坐标。--基于时间的选项 查找在拍摄指定位置的照片之前或之后短时间内拍摄的任何照片。因为很可能在每个 ohter 之后不久拍摄的照片是在大致相同的位置拍摄的。

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

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

geoselect-0.2.2.tar.gz (5.5 kB 查看哈希)

已上传 source

内置分布

geoselect-0.2.2-py2.7.egg (9.8 kB 查看哈希)

已上传 2 7