[Qgis-user] including images in (database) attributes
Andreas Neumann
a.neumann at carto.net
Mon Nov 25 12:40:51 PST 2013
Hi Niklaas,
Is this a 1:1 relation between the features and the photos or a 1:n?
QGIS has the concept of different widgets per attribute - see the
"Fields" tab in the layer property. There is already a widget for
photos. You can choose a file at a given location and store the full
file-path in the database. This works fine until you move to a different
machine - e.g. from desktop to server. In that case you need some script
to modify the paths, or use a database view to do that.
It would be more convenient if QGIS would support the file upload to a
Webdav server or store the data relative to the project file and let the
administrator to the sync between desktop and server.
Regarding the QGIS web client:
It is possible to have HTML content in the attribute tooltips. With this
mechanism you can also link photos to features. I use a Postgis view for
that purpose. You can see an example of this at
http://webgis.uster.ch/wsgi/webgisLauncher.wsgi?uuid=bc5f2215-0c93-49f2-9e4d-4f0bfc185975
- this lists public toilets in the city I work at - note that not all of
the features have a photo linked.
I also have a strong interest in improving the situation for photos,
videos and other linked media. Specifically I am also interested in an
automated upload of the chosen media to one or more locations using
scp/sftp or Webdav, or in the database. We can ask Jürgen Fischer if he
would be available to improve the photo widget in that respect.
Best greetings,
Andreas
Am 25.11.2013 21:16, schrieb Niklaas Baudet von Gersdorff:
> Hi,
>
> is there a way to include images (png, jpeg, ...) into a QGIS project
> file and link to an entity? I'd need this feature to link builing
> surveys to buildings. In the next step, they should also be visible via
> qgis-web-client*.
>
> * I hope, this is the right mailinglist for questions about the web
> client. I'd guess it's an official project by QGIS?!
>
> If there's no possibility to do that, I'd maybe try to implement it
> myself. I don't know whether it's possible for me to do this in QGIS
> core but I guess I could work it out to put a link into a field called
> e.g. "img" and let the web client not only show the link but the actual
> image.
>
> Are there any hints about the first part of my question? Maybe also
> about the second one? If this feature is not implemented yet, any hints
> according to where to start coding are very appreciated. :)
>
> Cheers,
>
> Niklaas
>
> P.S.: Because I'm working for a research project
> (http://assip.project.tuwien.ac.at) I get some money for maybe coding
> this feature. ;-) So, the existing initiative from my side is quite
> serious. :-)
>
More information about the Qgis-user
mailing list