Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

share|improve this question
1  
So the timestamps in the CSV and the geotagged photos layer are not same? Was the system out of sync? I'm asking because I'm wondering which work-arounds could be applied since there is no existing automatic tool as far as I know. –  underdark Apr 5 '13 at 20:49
    
i have no idea how to solve the step which fails, but i wonder if there might be a complete different approach to reach your goal. What should be the final outcome of your operations? And what are your data sources? Do you have a GPS-track maybe?. Recently i've been dealing a lot with geotagging, using tools like Geosetter and ExifTool to manipulate data and use them in QGIS. –  Bernd V. Apr 6 '13 at 10:55
    
@under 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! –  Fabiog Apr 7 '13 at 23:08
    
@Bernd Please read my comment: maybe you can help me! –  Fabiog Apr 7 '13 at 23:14

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
,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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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