Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample KV metadata file to generate of Exif info #117

Closed
valeriodeluca opened this issue Oct 26, 2021 · 20 comments · Fixed by #118
Closed

Sample KV metadata file to generate of Exif info #117

valeriodeluca opened this issue Oct 26, 2021 · 20 comments · Fixed by #118
Assignees

Comments

@valeriodeluca
Copy link

Dear KartaView,
Regarding the generation of Exif information from the KV metadata file:

https://github.com/kartaview/upload-scripts#2-generate-exif-info-from-kv-metadata-file

I ask if it is possible to have a sample KV metadata file to understand how the metadata file is made and what its extension is (* .txt, * .csv, etc).

I want to generate Exif info for 360 photos. Can I also insert the orientation parameter of the equirectangular photos in this metadata file?

Thanks a lot, have a nice day

@salabogdan
Copy link
Contributor

salabogdan commented Oct 26, 2021

Hi @valeriodeluca, for 360 photos we don't have such metadata files since the users don't have a way to record them using the 360 cameras.
For your particular case I can make a small improvement and fix your use-case.

@valeriodeluca
Copy link
Author

valeriodeluca commented Oct 26, 2021

@salabogdan thank you, do you need help, feedback or funds for this improving? Tell me freely :)

@salabogdan
Copy link
Contributor

salabogdan commented Oct 26, 2021

@valeriodeluca Just to make sure i get your use case can you share a full context on what you want to achieve?
I would need this in order to help you.

@valeriodeluca
Copy link
Author

@salabogdan Yes, of course.
I took automatic 360 degree (equirectangular) photos every 8 seconds with the Ricoh Theta S while riding my bike.
At the same time I recorded the GPX track with OsmAnd.
I straightened all 360 photos with Hugin.
Of each 360 photo (JPG format) I know the latitude, longitudinal and direction. I would like to add this info to the Exif of the photos with the Python script and always in Python then do the upload.

@valeriodeluca
Copy link
Author

valeriodeluca commented Oct 26, 2021

@salabogdan And to the end I'd like to have my 360 photos in KartaView like I had 360 photos in QGIS as my colleagues of Map For Future shown in this Facebook live:

https://www.facebook.com/mapforfuture/videos/1048303689276526

QGIS Plugin for 360 photos:
https://github.com/All4Gis/EquirectangularViewer

Thank you very much

Valerio De Luca
Geomatics Engineer
Map For Future
Roma
vdeluca at mapforfuture dot world
https://www.facebook.com/mapforfuture

@salabogdan
Copy link
Contributor

salabogdan commented Oct 26, 2021

@valeriodeluca
Ok, this sounds relatively easy to implement, can you share some Ricoh Theta S images and the GPX tack? I will be able to help faster like this. Maybe share them via a google drive with my email [email protected], 3-5 images are more than enough.

@salabogdan salabogdan self-assigned this Oct 27, 2021
@valeriodeluca
Copy link
Author

valeriodeluca commented Oct 27, 2021

Dear Bodgan,
Thank you for your help.
I sent you by mail my 360 photos with a GeoJSON file with these parameters:

"path": "photo\R0011773.jpg",
"direction": 236.0,
"Lat": 41.909915,
"Lon": 12.502471

If you need other tell me freely.
I have about 5000 360-photos of cycle paths of Rome and I'd like upload them on KartaView :).

Thanks again Bogdan
Valerio

@salabogdan
Copy link
Contributor

@valeriodeluca I did not receive any email from you until now, please make sure you have the correct email address.

@valeriodeluca
Copy link
Author

valeriodeluca commented Oct 27, 2021

Hi Bogdan, sorry I resent it by wetransfer. Thank you
Valerio
Wetransfer link: https://we.tl/t-WAgOqXZDiI

@salabogdan
Copy link
Contributor

salabogdan commented Oct 28, 2021

I am doing some final changes and I will try to commit them by tomorrow EOD.

@valeriodeluca
Copy link
Author

Thank you very much @salabogdan!
I hope the 360 photos and GPX tracks I sent you were useful. If I can help you in any other way just tell me.

@salabogdan
Copy link
Contributor

@valeriodeluca my local changes are adding the latitude and longitude information from the geojson file to the images but the upload will still not work because the gps does not have any timestamp information so the images can not be uploaded.
Can you add timestamp information to the geojson file? A new property for the feature or at least one timestamp for the hole trip maybe when the trip has started.

@valeriodeluca
Copy link
Author

@salabogdan sure, here you can find the geojson file with timestamp:
https://mapforfuture.world/doc/Map_For_Future_Bike_360_timestamp.geojson

I used this format:

yyyy-mm-ddThh:mm:ssZ

If the timestamp format doesn't correct I can change it.
Thanks

@salabogdan
Copy link
Contributor

salabogdan commented Nov 1, 2021

@valeriodeluca

just to make sure hh is Hour (12-hour clock) as a zero-padded decimal number e.g. 01, 02, …, 12 ? and NOT Hour (24-hour clock) as a zero-padded decimal number. e.g. 00, 01, …, 23 ?

Edit:
I will assume its Hour (24-hour clock) as a zero-padded decimal number. e.g. 00, 01, …, 23 since there is no AM or PM information in the examples

@valeriodeluca
Copy link
Author

@salabogdan yes, you do, you can assume 24 hour format with zero-padded, so it goes from 00 to 23 hour. No AM/PM info required so.
Thanks

@salabogdan
Copy link
Contributor

@valeriodeluca this issue was automatically closed sorry about this. Does everything work as expected?

@salabogdan
Copy link
Contributor

salabogdan commented Nov 2, 2021

@valeriodeluca
How to:

  • HELP
    python3 osc_tools.py generate_exif -h
  • USE CUSTOM geojson file
    python3 osc_tools.py generate_exif --exif_source custom_geojson --path <<path_to_folder_containing_geojson_and_images_folder>>
  • USE osc metadata file
    python3 osc_tools.py generate_exif --exif_source metadata --path <<path_to_folder_containing_metadata_and_images>>

@valeriodeluca
Copy link
Author

valeriodeluca commented Nov 2, 2021

@salabogdan not worrier about closing the issue.
Thanks for the new "USE CUSTOM geojson file"!

Just a question, I ask you if the geojson for the generation of the exif data must have a particular formatting for the assignment of the values of Latitude, Longitude, Direction and Timestamp.

Would it be possible to upload a sample custom geojson to this repository, perhaps in the following directory?

upload-scripts/exif_data_generators/

Thank you very much

@salabogdan
Copy link
Contributor

I have, already added a sample for the custom geojson in the readme.md file. Here is the commit 0cae266 . I will change it to look better but for now this is how it looks.

@salabogdan
Copy link
Contributor

final version of the readme example: 7ca5cea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants