[KPhotoAlbum] Extending the database schema
Johannes Zarl
isilmendil at gmx.net
Fri Feb 24 14:27:10 GMT 2012
Hi,
I have been thinking about a few wishlist items that would need to extend the
current database schema in one way or the other.
The first group of wishes is about tagging a certain region inside the
database (e.g. tagging a person and his/her location in the photo, marking a
landmark/sight/plant/whatever):
https://bugs.kde.org/show_bug.cgi?id=292900
and its more popular duplicate:
https://bugs.kde.org/show_bug.cgi?id=170801
and another duplicate:
https://bugs.kde.org/show_bug.cgi?id=223053
(I can't find the "mark as duplicate" button for some reason)
The same mechanism could also be used in principle to create text-annotations
or some type of hyperlink inside the description ("Look closely at that detail
in [Region A]...").
Speaking in terms of the XML document, I guess this would be most easily
accomplished by adding some type of annotation sub-elements to the image
elements?
E.g:
<image file="foo.jpg" Persons="100,8"/>
could become
<image file="foo.jpg" Persons="100,8">
<annotation Persons="8" boundingbox="10,10,30,30"/>
<!-- or maybe more fancy: -->
<annotation text="Look here!" type="svg">
<svg>....</svg>
</annotation>
</image>
The second type of extra information would be to add information to whole
categories, as would be required for associating gps information with
locations:
https://bugs.kde.org/show_bug.cgi?id=110974
Similiar to the above example, I guess the easiest way would be to add a sub-
element to add to the "value" tag of the category. A geotagged location would
then look like this:
<Category name="Locations">
<value value="Some Place" id="42">
<!-- a simple point -->
<geodata type="coordinates" lat="..." long="..." acc="..."/>
</value>
<value value="Some Region" id="43">
<!-- could be handy if deriving geodata from gps coordinates of already
tagged images, or when getting the data from an external source (marble?): -->
<geodata type="region">
...
</geodata>
</value>
</Category>
Drawback: The "coordinates" type could certainly be done without adding
external dependencies, but more complicated stuff would probably need Marble-
support to be compiled in.
So now to my questions:
Would these changes to the database-file be acceptable? Did I overlook
something / would you do the changes differently? Is somebody already working
on the wishlist items mentioned above?
And regarding the SQL backend:
Does anybody use it? Is there somebody who maintains it? If the answer to both
questions is "no": Should we disable this feature for now and avoid potential
confusion in the KPA versions shipped with the various distributions?
Johannes
More information about the Kphotoalbum
mailing list