kios-research / importphotos Goto Github PK
View Code? Open in Web Editor NEWThis tool can be used to import Geo-Tagged photos (jpg or jpeg) as points to QGIS.
License: GNU General Public License v3.0
This tool can be used to import Geo-Tagged photos (jpg or jpeg) as points to QGIS.
License: GNU General Public License v3.0
It worked well before, suddenly it makes error on all os, Windows7 and linux.
QGis version is 3.6
Error messege is
2019-05-13T18:27:42 WARNING Traceback (most recent call last):
File "/home/office1/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/MouseClick.py", line 85, in canvasDoubleClickEvent
self.photosDLG = PhotoWindow(self.drawSelf)
File "/home/office1/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/PhotosViewer.py", line 189, in init
if self.drawSelf.prj.fileName() and 'RELPATH' in self.drawSelf.fields:
AttributeError: 'ImportPhotos' object has no attribute 'prj
Since the GPSLatitude and GPSLongitude can be signed the GPSLatitudeREF and GPSLongitudeREF needs to be considered.
An example is
GPSLatitude = -38.025312
GPSLongitude = 145.28905
Can be expressed
GPSLatitude = 38.025312
GPSLatitudeREF = S
GPSLongitude = 145.28905
GPSLongitudeREF = E
OR
GPSLatitude = -38.025312
GPSLatitudeREF = N
GPSLongitude = -145.28905
GPSLongitudeREF = W
The point being the REF modifies the sign of the value provided. Right now my southern hemisphere images are showing off the coast of China rather than Victoria Australia. The EXIF tags are as follows.
GPSLatitude = 38.025312
GPSLatitudeREF = S
GPSLongitude = 145.28905
GPSLongitudeREF = E
This same image opened in IrfanView and using the "Show on Google Maps" places the image in the correct location. Pic2Map.com aslo correctly identifies the location of the images
I want to share my qgis folder with qgz, layers and pictures with a collegue, but his paths are all different from the imported photos. Is it somehow possible to have this plugin use relative paths?
Hi,
I tested the plugin importing images from different folders. I have created a shp file for each folder but for some of them, the path to the file has been saved as relative path in the project and for some others as absolute path. Therefore, opening the project from another PC for instance, shapefiles with absolute path were obviously missing.
I used QGIS 3.4 on Windows 8, Plugin version 2.2.2
Hello, I am excitedly learning about qGIS. I am trying to add the importphotos plugin, but QGIS won't open after I add it. When I remove the Importphotos folder it starts again. I am using QGIS 2.18.17 on Ubuntu. Ubuntu is up to date. This is the version in the ubuntu repository installed with apt-get install.... Can you help me? I am keen to use this plugin!
Hi,
I get this error while trying importphotos on ubuntu 18.10:
KeyError: '.apefil'
Traceback (most recent call last):
File "/home/reginald/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 368, in ok
self.extension = self.extension_switch[self.extension]
KeyError: '.apefil'
Python versie: 3.5.2 (default, Oct 11 2018, 08:33:18) [GCC 6.4.0]
QGIS versie: 3.2.3-Bonn Bonn, 9b17680
Regards,
I discovered a bug: After opening a photo with photo clicker, clicking the first time on the button for "next photo" skips a photo and clicking the first time on the button for "previous photo" nothing happens. This only occurs on the first click on previous or next photo, every other click works as expected. Even though the photo viewer has the bug, QGIS selects the right photo on the first click. So if you click on "next photo" QGIS highlights the next point, but the photo viewer displays the wrong picture.
I use QGIS 3.4 LTR
In Windows, with the version running on QGIS 2.18.16, there is a small bug. The path link opens up a web browser, as though the path was a http:// path, not through the file browser as though it was a file:// path.
Upon activation, plugin throws an error:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 342, in startPlugin
plugins[packageName].initGui()
File "/home/paolo/.qgis2/python/plugins/ImportPhotos/ImportPhotos.py", line 170, in initGui
self.plugin_path = os.path.join(os.environ['USERPROFILE']) + '/.qgis2/python/plugins/ImportPhotos'#os.path.dirname(__file__)
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'USERPROFILE'
in particular: has the known bug been resolved?
Thanks.
Firstly thanks of a great plugin! It just works :)
I am however puzzled as to why the bearing in the azimuth field is shown as a ratio of two integers (i.e. as a rational number) everything else I have used to view the meta data displays it as a decimal.
It is a bit of a pain having to split the string and then convert to integers and perform the devision. At least QGIS allow you to do this on the fly!
With latest version (2.0) on manjaro, I get the following error when launching:
Couldn't load plugin 'ImportPhotos' due to an error when calling its classFactory() method
TypeError: 'QVariant' object is not subscriptable
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/qgis/utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/XXX/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/__init__.py", line 33, in classFactory
return ImportPhotos(iface)
File "/home/XXX/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 75, in __init__
locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'QVariant' object is not subscriptable
Python version: 3.7.2 (default, Jan 10 2019, 23:51:51) [GCC 8.2.1 20181127]
QGIS version: 3.4.3-Madeira Madeira, exported
Python Path:
/usr/share/qgis/python
/home/XXX/.local/share/QGIS/QGIS3/profiles/default/python
/home/XXX/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/usr/lib/python3.7/site-packages
/home/XXX/.local/share/QGIS/QGIS3/profiles/default/python
/home/XXX/Shared/Work/APPS/Input/Maps/GIS_main
As I told before, there are some quirks while using the plugin on Linux Mint.
When importing and selecting gpkg as preferred storage format, the setting is ignored, and the default shapefile is written to disk.
I import photos in QGIS using the built in "import geotagged photos" tool. Afterwards I safe the data as a Geopackage. I have a column named "photo" as well as a column named "Path".
Since the latest version of ImportPhotos the photo clicker gives me the error message AttributeError: 'ImportPhotos' object has no attribute 'prj'
after double clicking on a point. The error refers to line 206 in the PhotoViewer.py.
If I use the plugins option to import photos, everything works well.
Hi,
I downloaded ImportPhotos today from the repository in QGIS3.6 on OSGeo4W on Windows 10.
I get the error message above. I installed Exiftools as per the method here and restarted QGIS but still get the same error message.
I checked out issues #10 and #16 and tried import pip; pip.main(['install', 'exifread']);
and got ModuleNotFoundError: No module named 'pip'
.
I am curious as to why exiftools cannot simply be included in the plugin. The photo2shape plugin was the same except the method in the link above worked for it.
Many thanks
Sam
The plugin works well on first use, when the project is reopened it is no longer possible to open photos with a double click of the mouse.
QGIS 3 - OSGEO4W64
It would be very helpful to show an arrow or line or something on the map to show the azimuth direction.
I realise it is slightly complicated if you're trying to just use simple markers for the symbology...
"UserComment" attribute is not imported
This is important because it records any comments added to EXIF data when in the field.
Attachment below is a modification made to the QGIS 2 photoimporter plugin to import this attribute.
I would consider dropping support for QGIS 2.x in this plugin. Now that QGIS 3.4 has been released as a long-term support version, the number of users using QGIS 2.x is going to decrease quickly.
Supporting QGIS 2.x adds a lot of extra complexity to the code and provides many places for bugs to hide. It also means that you cannot take advantage of Python 3 features such as pathlib
, which can greatly simplify the handling of file locations. You also have to be much more careful about text string encodings.
I think that there are metadata flags that would stop someone installing the plugin on QGIS 2.x. In the plugin documentation you could suggest that they use the Geotag and Import Photos and eVis plugins instead. That solution works reasonably well.
I tried importing IMPORTPHOTO but I verified the problem installing the plugin
Impossibile caricare il plugin 'ImportPhotos' a causa di un errore chiamando il metodo classFactory()
ModuleNotFoundError: No module named 'exifread'
Traceback (most recent call last):
File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 336, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/init.py", line 32, in classFactory
from .ImportPhotos import ImportPhotos
File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 33, in
from .MouseClick import MouseClick
File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/MouseClick.py", line 31, in
import exifread
File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'exifread'
Versione Python: 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Versione di QGIS: 3.0.0-Girona Girona, exported
Percorso Python:
/Applications/QGIS3.app/Contents/MacOS/../Resources/python
/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins
/Library/Frameworks/GEOS.framework/Versions/3B/Python/3.6/site-packages
/Library/Frameworks/GDAL.framework/Versions/2.2/Python/3.6/site-packages
/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
/Users/Harlock/Library/Application Support/QGIS/QGIS3/profiles/default/python
Thank you for providing such a useful add-in.
I have an issue with the Date and Time attributes in the geoJSON point file. They appear to show when the photo was modified by my photo editing software and not the when I took the photo (see attachment).
May I suggest you use the EXIF Create Date as the data source?
Best wishes,
Kevin.
I installed the version 1.7 and after adding a folder with pictures and defining an output file I see that the plugin stops at line 560.
I commented out the del instruction and the plugin continues but always I have "No photos were added".
When I add a folder with geotagged photos, none of them are imported.
"No new photos were added."
The photos have proper location info in the exif data. Using OSX 10.13, Qgis 3, Python 3.6.
When I take a picture from the same location, only one symbol is displayed on map.
And When "click photo", only one of several pictures will be displayed, and if I press the "show next photo" button, it will randomly move to another location.
I am curious about the order of "show next photo".
I think "show next photo" would be better to show a picture of the same place first and then move on to the next location.
Or better to show only clicked photo (including same location photo).
I just tried this plugin in 3.x on Windows. When using "Click photos", the window displaying the photo is displayed "on top" of all other dialogs and windows, but it is not modal (i.e. you can do other things while it is open).
IMHO you have made the right choice in not making it modal. But making it always "on top" is very problematic.
They are two 0 which appear at the end of the azimuth, for example azimuth 45 of the geotag photo becomes 4500, so the direction of the arrow on the map is wrong.
Something weird happens when I import photos (on all of them), see this link::
https://mega.nz/#!Rdt12YIC!l5H1OvtgJQmTXiVieMzFZXOIgJDeGapLY7QPY5UKmc4
Original photo:
https://mega.nz/#!UIsBTaJK!hXuOi1_bqZUnq02eqkHG_PGI572iJPjhGRP66pUudG0
QGIS version: 3.4.4
Plugin version: 1.8
OS: Lubuntu 18.04 x64
I installed the ImportPhotos plugin using the QGIS official plugin repository, but get the error message "Please install python module "exifread" or "PIL"."
The ReadMe file for the ImportPhotos plugin (downloaded here: https://plugins.qgis.org/plugins/ImportPhotos/), says only: "Mac Users. Requires the following Python Modules to be installed: UnixImageIO, FreeType, PIL Please visit: http://www.kyngchaos.com/software/python." I installed the modules following these instructions, but still get the error message. I then attempted to install the exifread module using the instructions here (https://gis.stackexchange.com/questions/193164/installing-exifread-module-into-qgis-2-14/248353) but again get the error message.
I'm looking for specific instructions (assuming no knowledge of Python) for how to get QGIS to recognize the installed PIL and/or how to install exifread. Any ideas?
QGIS version: 3.4.6-Madeira
Mac OS 10.13.6
Using the plugin on Linux Mint, the import works quite well.
But using it a second time in the same session, it throws this error:
KeyError: '.pefi'
Traceback (most recent call last):
File "/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 388, in ok
self.import_photos(self.directoryPhotos, self.outputPath, self.load_style, showMessageHide)
File "/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 456, in import_photos
self.extension = self.extension_switch[self.extension]
KeyError: '.pefi'
Python-Version: 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
QGIS-Version: 3.8.1-Zanzibar Zanzibar, dcd95cc648
Python-Pfad:
/usr/share/qgis/python
/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python
/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.6/dist-packages
/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python
/home/bernd/.local/share/QGIS/QGIS3/profiles/default/python/plugins
.
thx for ImportPhothos.
Please, consider add dependencies on README.md
ImportError: cannot import name 'QtWebKitWidgets'
Debian GNU/Linux 9.4 x64
Hi
I am running the newest plugin version in QGIS 3.4.4 under Linux Mint 19.
Even though the directories I choose contain geotagged images (from a drone) that have been successfully imported before, I now only get the "No new photos were added" and nothing else.
I tried different outputs and reinstalling in the extensions manage and from zip with no success.
any advice?
Greetings
Arn
I use Archlinux and Qgis verion is 3.4.
Plugin was installed well without error, but problem is it donesn't make output.
I read the readme and found that there are some modules needed, especillay pil module.
But pip can't find the pil module.
How to get the module?
I have successfully used Import Photos to display locations of photos within QGIS.
When I double click a location the photo displays correctly. This might happen 3 or 4 times then it stops working and only date and time are displayed.
Closing and re-opening the project doesn't work. If I shutdown and restart QGIS the same thing happens - the first two or three images display then it stops working. The order in which I click images has no effect - always the same symptoms.
I am running QGIS 3.2.3 using ImportPhotos 1.4 (installed via the QGIS Plugins menu).
Windows 10 with QGIS 32bit on a 64 bit machine.
Import of photos worked (with some quirks I will replicate later), a shape file was populated.
But the "Viewer"-button remains without a function. I get a white cross as selector, but clicking on the symbols does not do anything. Hovering over just reveals the ID from the attribute table.
QGIS 3.8.0 on Linux Mint 19.1
While i was looking for a solution for geotagged photo in qgis, i found this project and while considering other solutions like making myself a plugin i found the module GPSphoto.py that can be the engine of a plugin.
So now i am suggesting to use GPSphoto.py in this plugin :-D
Marios,
The photos in the attribute table appear to be in no particular sequence. I would like them to be in chronological sequence so that when I am browsing they appear in the order in which I took them. May I suggest sorting them by date/time before outputting the records.
Thanks,
Kevin.
Version 1.7 has set 2.18.25 as Minimum QGIS version.
QGIS plugin-manager does not check the minor-versions, as it calls
https://plugins.qgis.org/plugins/plugins.xml?qgis=2.18
So QGIS 2.18 user will not be able to update to version 1.7 through the QGIS plugin-manager even if they use QGIS versions >=2.18.25
Kalimera Marios! Efcharisto for a very useful plug-in.
A very helpful additional feature would be some sort of filter to only import photos in an area of interest. This would allow the user to use as the import directory a much broader photo feed, for instance an icloud or other cloud service "downloaded" photos directory, without having to copy selected photos elsewhere.
Probably the simplest implementation would be a checkbox on the import dialog "Only import photos in canvas extent", and if checked the plug-in would skip over photos whose coordinates are outside of the currently displayed map canvas.
Just for fun and do show what your plug in is useful for, in my instance I am using it to show in a map project of some wilderness in Canada photos of observed wildlife from gamecams. Here are two examples. (There is no need to do anything with these files - just thought you might enjoy an appreciative example from half-way across the world of your plugin used for wildlife monitoring!)
Hi, i have a problem with the puglin, this is the error:
AttributeError: 'ImportPhotos' object has no attribute 'outputPath'
Traceback (most recent call last):
File "/home/giuseppe/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 307, in ok
lphoto = os.path.basename(self.outputPath)
AttributeError: 'ImportPhotos' object has no attribute 'outputPath'
It happens when I click on "browser" to give the path to the folder.
Hi,
I have this error when trying to import photos:
KeyError: '.'
Traceback (most recent call last):
File "/home/reginald/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 368, in ok
self.extension = self.extension_switch[self.extension]
KeyError: '.'
I also noticed that if I chose geojson as output format the plugin creates a file named fotos.geojson.shp which is a shapefile.
Do I need to install additional python libraries?
Regards,
We have tested the plugin! really nice work!
We encoutered a problem with relative path. It is not tealtive to either the project or the file (one subfolder in excess).
In my humble opinion, it would be better to check this strange behaviour and to use the relative path to view the photo instead of absolute path (maybe it is more simple if it is the relative path to the project).
Hi,
if your pictures are in a folder path with blanks they are correctly imported, but displaying them in QGIS 3.2.2 fails.
Ciao
Manfred
Hi ImportPhotos team! Just wanted to say that I love the plugin for displaying flights of geotagged photo locations collected with my company's DJI Phantom 4 RTK. Thanks for your work!
I have noticed that after importing a set of photos, the default behavior of ImportPhotos is to zoom to the group that was just imported. However, it appears that it always zooms QGIS to the latitude/longitude and zoom level to fit the group of photo points, regardless of the Current CRS. If I have set a CRS other than WGS84 / EPSG:4326 in QGIS, it will zoom to the raw lat/lon values in the current CRS, rather than transforming lat/lon to the correct location in the current CRS.
System Specs:
ImportPhotos version 2.1
QGIS 3.6.2 via OSGeo4W Network Installer
Windows 10 Pro 1803 Build 17134.648
Not working for the newest version QGIS 3.4
Hi
I have some difficulties getting the plugin working in QGIS 3.2 under Linux Mint, I have exiftools installed on my system, but on startup I get the following errormessage in QGIS:
ImportError: cannot import name 'QGis'
Traceback (most recent call last):
File "/home/arn/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 40, in
import exifread
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 674, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'exifread'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 337, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/arn/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/init.py", line 32, in classFactory
from .ImportPhotos import ImportPhotos
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 674, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/arn/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ImportPhotos/ImportPhotos.py", line 48, in
from qgis.utils import QGis as Qgis # for QGIS 2
ImportError: cannot import name 'QGis'Python-Version: 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
QGIS-Version: 3.2.3-Bonn Bonn, 9b17680Python-Pfad:
/usr/share/qgis/python
/home/arn/.local/share/QGIS/QGIS3/profiles/default/python
/home/arn/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/home/arn/.local/share/QGIS/QGIS3/profiles/default/python
Any Ideas?
Greetings
Arn
NameError: global name 'NSScreen' is not defined
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 342, in startPlugin
plugins[packageName].initGui()
File "/home/user/.qgis2/python/plugins/ImportPhotos/ImportPhotos.py", line 197, in initGui
self.toolMouseClick = MouseClick(self.iface.mapCanvas(), self)
File "/home/user/.qgis2/python/plugins/ImportPhotos/MouseClick.py", line 58, in init
self.screensize.append(NSScreen.mainScreen().frame().size.width)
NameError: global name 'NSScreen' is not defined
In the current version, the path link does not work correctly with spaces.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.