Closed bigfoot90 closed 7 years ago
You want save location (latitude and longitude) by name (like a tag) and assign them to a images or a video? How would you do so? Could you describe the process? It seen possible but require a define workflow.
You can do a similar solution with the bath manager. It does not same the location but you can assign the same location to multiple items.
I known about the bath manager, I'm using it alredy. But currently I need to save the coordinates to an external file for reusing the same the next day.
I was thinking about something like this (like the album selector): Where I can select an existent location, or write a name if you want to save as new, or leave empty if you do not to save.
Also add a tab in the plugin page for managing saved locations (for update, create, or remove).
Thanks for the details. To resume:
If so,
The hierarchy is a plus, can also be done in a second step.
I think the hierarchy structure should be stored separed from locations.
The hierarchy is implemented by adding a single column to the database table -
A couple of hierarchy benefits:
It is an enhancement to original request, but would likely be easier to implement initially than to add on later.
Not sure I understand what you mean in by hierarchy. Would you be able to give a user case? What do you refer as locationParentId? Currently on any map you can search for a place by name using the leaflet-search plugin. https://github.com/xbgmsharp/piwigo-openstreetmap/blob/master/template/osm-map2.tpl#L302
Example data:
{ "locationRecords":
[
{ 0, 51.082333, 10.366229, "Germany", null },
{ 1, 52.518825, 13.403164, "Berlin", 0 },
{ 2, 52.530880, 13.382780, "Mitte", 1 },
{ 3, 52.533442, 13.391129, "Friedhof der Sophiengemeinde", 2 },
{ 4, 52.535048, 13.390174, "Berlin Wall Memorial", 3 }
]
}
All locations with parentId 3 are within Friedhof der Sophiengemeinde, and may be textually identified as "[locationName], Friedhof der Sophiengemeinde". This also implies the full hierarchy "[locationName], Friedhof der Sophiengemeinde, Mitte, Berlin, Germany". Everything with parentId = 3 is also within parentId = 2, parentId 1, and parentId = 0.
Thanks for the details. I did understand the data dump. My question is what do you do with that? To me it looks like some kind tag use to find items by human text instead of GEO bond. Do I miss something?
That is exactly what it is.
Using named locations at all is about human based searching, and use patterns. As a tourist I will remember, perhaps, the city, the train station, the name of the place I had lunch. And that is how I will organize my photos.
I did not explain that well.
As a tourist, I may visit both Berlin, Germany, and Berlin, Maryland, United States. It is important the software help me avoid mixing these up.
It does make sense to save place and search or used then. However so far using the search bar on the any worldmap, you can look for place and get to the location like Berlin or Paris. If you want to save place and search for it out side a woldmap then it need to be tag (keyword) by place. This is the goal of my next plugin TagThings. Unless you are looking to search for your own place on the worldmap, it should be another plugin. I don't mind doing it, we need to be clear on the goal and the usage.
I thought it as two separate tables. Let me explain.
In my example First Ave, New York, NY
is an Location
, and United States
would be a Group
and not a Location beacause it does not have any specific coordinates.
You can have as many locations as you want in a group.
Another example:
Last, you can also keep all in the same plugin, but you should let the user to choose if (and what) Locations
/Groups
import into the database (maybe using some external service).
Thanks for the details. Sound great and nice idea for the plugin TagThings.
OSM plugin display a map. I try to keep things simple. I wish to improve the worldmap to make the carrousel like Google Maps or DuckDuckGo.
Should we consider all location First Ave, New York, NY
as tags to be searchable.
@xbgmsharp Can your plugin have the location tags separed from other tag types? For example: when tagging photos, I don't want to have the locations mixed with photo's tags, and when searching a location I want to view location tags only.
I was thinking in using the PWG tag system. I don't see the point of creating a new one. What do you have in mind?
What if I add the location name in conjunction of the tag groups extension, http://piwigo.org/ext/extension_view.php?eid=781
It would create a tag/keyword group name location
and a key the actual location name like First Ave, New York, NY
or what ever name return the reverse GEO Base API. Still need to find one.
Geonames.org is not free of charge, there API limitation. I am looking for a reverse GEO Base API free of charge. There is a free dump but it is 250Mo. http://www.geonames.org/export/credits.html
I can use http://nominatim.openstreetmap.org which is free of charge. You can even set the zoom level for result. Zoom 18 return the exact address where zoom 1 return the county level only. For example: http://nominatim.openstreetmap.org/reverse?format=xml&lat=48.858366666667&lon=2.2942166666667&zoom=18&addressdetails=1
Using your sample lat and lon it would be, http://nominatim.openstreetmap.org/reverse?format=xml&lat=51.082333&lon=10.366229&zoom=12
<addressparts><city>Mihla</city><county>Hainich-Werratal</county><state>Thuringia</state><country>Germany</country><country_code>de</country_code><continent>Europe</continent></addressparts>
Using my sample data, http://nominatim.openstreetmap.org/reverse?format=xml&lat=48.858366666667&lon=2.2942166666667&zoom=12
<addressparts><city_district>7th Arrondissement</city_district><city>Paris</city><county>Paris</county><state>Ile-de-France</state><country>France</country><postcode>75007</postcode><country_code>fr</country_code></addressparts>
Funny Berlin has a continent
parameters where Paris does not.
So to summarize, in addition to the tag groups extension, http://piwigo.org/ext/extension_view.php?eid=781
Location
be default, it would be editable. Would be the same as the header name from the picture page.city
by default and can be could be change to any address parts return by the reverse geo code, eg: city_district
, city
, county
, state
, postcode
, country_code
,continent
.county
, state
, postcode
, country_code
, continent
be a hierarchy top level.What do you think, would that match you need? Do you prefer a separate table to be only admin accessible or the tag/keyword to be also available for user.
It can be visible by the user, but I don't want to have it mixed with other tags (on the public and andmin sides too)
To avoid being mixed with other tags, I suggest to use the keyward/tag group. Would that work? Otherwise not sure how to represent it.
Using the keyward/tag, would also avoid to create an admin tab for managing saved locations (for update, create, or remove)
Can you try to implement this?
Yes I can I have a Proof of concept on my dev box using the keyward/tag group.
Eew, OSM's xml looks very amerocentric. You should note that nominatim.openstreetmap.org is strictly limited to 1 request/s (86 400 per day, much more than Geonames) - but Mapquest makes the same api available[1] without the limitations. Info available from openstreeetmap here.
I use the OpenStreetMap plugin whose interface in batch manager is not comfortable. I would love to have a better location tagging tool.
Thanks for feedback so far I used the mapquest Ali to avoid the limitation. I did test with places outside of us and it does works fine.
Could you clarified what you mean by
I use the OpenStreetMap plugin whose interface in batch manager is not comfortable. I would love to have a better location tagging tool
How do you see it?
Several of the ideas already raised here:
But also
Thanks for the feedback.
search for location by name (text field entry)
- first search my locations
- second search a geolocation database
I will check if it possible using the search plugin. Not you can have multiple search query from the same search box. As of today, you can search by place from a geolocation database, see file, https://github.com/xbgmsharp/piwigo-openstreetmap/blob/master/template/osm-map2.tpl#L302
my list of locations as menu
I'm currently saving the location are store are keywords inside a group. Therefor it is accessible via the Keywords page. Install the TagGroups plugin to see the future release, it will be a dependency.
map selection (current batch manager map size is too small vertically)
This is done see issue #53 and commit 16b7d0343d962aa67d14c5ebd4955207a7087b1a Please ensure you update to the latest github source to ensure you have the latest feature and fix.
check for exif location data in images.
Could you detail, PWG parse the EXIF data and insert it in the database. I read the data from the database.
update images with exif data when provided.
Again this is a PWG core feature. Re-sync you photos and it will update database.
Ah, just discovered this: http://piwigo.org/doc/doku.php?id=dev:changes_in_2.6&s[]=exif#gps_metadata
Piwigo 2.6 adds two fields in piwigo_images table : latitude and longitude. These fields are automatically filled with EXIF metadata if available and if $conf['use_exif'] is true.
They are not currently used in the core but they are available for read an write by any plugin.
When updating from 2.5, a migration task tries to get values from lat and lon fields used by Map & Earth and Open Street Maps plugins (the task also drops these two old fields).
It would be useful, especially from the OSM in batch manager interface, if a button to trigger metadata sync were available. Perhaps a radio button to also sync when saving geolocation?
I will try to install github master today to test.
A button to force sync when saving geolocation, does not make sense as the user input override the EXIF metadata and because the metadata are not write back to the image. I can add a button to trigger metadata sync on the photo page and the batch manager. Please create a new issue for this.
In addition to the tag groups extension, http://piwigo.org/ext/extension_view.php?eid=781
So far I created a new tab on the admin section.
From a user point of view, you can see all tags in the tag/keyword page.
1) I commit a first draft of Geo reverse address part to keywords/tags. You need to install the tag groups extension, http://piwigo.org/ext/extension_view.php?eid=781
2) I realize that it is not exactly the original request. The original request:
To do so the plan was:
I can still do it by mimicking the keyword/tag page and create a separate table.
3) As of now, I created a new tab on the admin section.
You can create you own keyword/tag, like: location:Home and assign it to your gallery items
So far the missing part would to like the keyword/tag to a latitude,longitude to assign it in the admin panel to match the original request.
4) Tell me what you think?
Just update the Reverse GeoCode Tags via commit ea21ee6c881ecf766790b8cfef0056f746824103
Next the 'My places' admin page
The commit the admin 'Place' page in order to add,edit,delete. Please update to the latest git version and feedback.
You can now assign place on the photo edit. If that work for you, I will port the code the batch manager Please update to the latest git version and feedback.
Sorry for the long absence. Currently my Piwigo GAllery is down, so I can't test the plugin now. I'll test it as soon as possible.
@xbgmsharp I've resurrected my piwigo gallery, how can i try your plugin version? Is this safe for may data?
@xbgmsharp What is the state of this?
@xbgmsharp This works like a charm; Thanks you infinite
Add the possibility to name a location, and then reuse that location for future photos. Thanks you.