2

I learned (thanks!) to use the join feature built into the layer properties, but in my case it doesn't work because data do not match perfectly. Infact shape refers to geotagged photos, csv is a log file which contains orientation data (azimuth); I would like to join them by date field (day, hours, seconds): I would need to join the "nearest" data, non spatially but temporally!

This is the case: I geotag photos made with my digital camera using Geosetter; I want to add orientation: how? sitis.mobi/geolog give me the idea: to record orientation of the smartphone put in the front pocket (by means a "sensor logger" application). Sensor loggers produce a csv with timestamp and data: you can set log frequency, but obviosly camera and logger timestamp are different. I need to join closest data by date: like "nearest point" in spatial data! It will be very useful to join smartphone sensor data to photos made with quality camera!

  • Could you post a few examples of your data (attributes) ? – gisnside Aug 27 '17 at 19:22
1

Never faced a problem like this before, and it seems difficult to resolve without coding. Maybe, you could import both the shapefile and the csv in a geodatabase (i.e. PostGIS), and then use SQL and nested queries to create the result you want. The query could use the functions for managing dates and times of the DBMS in order to get the difference in seconds from a date in the 'shapefile' table and all the dates in the 'log' table: you only need to do it in a nested query, order the results (ascending) of the nested query based on this calculated value and then take the first record you get and insert it in the main query, executed against the shapefile table. This procedure is not simple, but could allow you to solve the problem.

  • ,actually your procedure is not simple, espetially for me! Anyway, I was looking for a tool, simple ad fast, because I'll need to use it a lot of times .... – Fabiog Apr 7 '13 at 22:39
  • You could write a Python to do the same thing and reuse the code. I don't know if there are tools for joining records on a GIS based on the 'nearest' date, I suspect there aren't. – diegogb Apr 8 '13 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.