2

The situation is: There are many photos (between 900 to 3000), geotagged and I can see them on MapInfo. The photos are of certain objects and there may be 2 to 8 photos for each object. These objects are also visible in MapInfo as a separate layer. Something I do with them is I go through each one to find the best photo and delete the rest so only one photo per object exists.

The way each photo is currently being assigned to an object is by physically moving the icon over the object. The point in doing that is to ensure that the assigned photo is closest in distance to the assigned object. An algorithm later updates the tables of each layer based on a shortest distance method.

There is no field in the photo layer to say which object it belongs to, and there is no real obvious geometrical pattern between the photos and objects. The only way to tell which object the photo belongs to is by visually inspecting the photo and then doing some kind of data entry for that photo.

Here is a sample of what the map looks like. enter image description here

The problem is, sometimes I make an error (perhaps by rushing or losing concentration) by thinking that two photos of the same object but from different angles are photos of two separate objects. So the consequence is that there are >=2 photos of the same object when there is only meant to be <=1 photo per object.

The desired outcome is that I can identify photos that belong to a particular object (by somehow grouping them) in a quick manner for the purpose of running a check to ensure only one photo per object exists after I have gone through and found the best photo icons for each object icon in MapInfo.

In other words, I want to group the photos some how that will make this statement true about a particular group of photos: 'this group of photos belong to one object'. So, when I've finished finding the best photo per object, I can run some kind of script to check that <2 photos exist in the table of the same object.

Manually inputting the data into a table in Excel would look something like the image below. This would work for what I want the data for but it is going to be too slow to be practical. enter image description here

The question is: How do I select multiple photos in MapInfo, which will then make them belong together and so I can later check to make sure only 1 photo per group exists after I have gone through and selected the best photos?

Please feel free to provide a comment if you have another idea about achieving the desired outcome.

  • Have you tried using the "Dissolve with Stats" tool in QGIS?? – The G of GIS Apr 6 '17 at 23:52
  • Although you have been a member here for a while, it appears that you are yet to take the new user tour that outlines our focused Q&A format. The tour states there should be only one question per question however in asking about both MapInfo and QGIS you are essentially asking two questions. Please edit your question to focus on just one GIS software and one question. If you need an answer for both, please ask them separately. – Midavalo Apr 7 '17 at 0:14
  • I've just had a play with it now and I think I need a field already to use that tool. The issue is about creating the field in the first place. Once that data is created, then it will be easier. – Joe Apr 7 '17 at 0:14
  • Hi Midavalo. I have updated the question and I think it is specific enough now. – Joe Apr 7 '17 at 0:31
  • How are you currently assigning a photo to an object? By that I mean, are you updating a field in the photo table or something similar? – T_Bacon Apr 11 '17 at 7:57
2
+50

I'm going to take a general method you could use, should you need to start everything over from scratch, so others can use it also. Ths method ensures you don't move objects, delete objets and keep your source database intact.

What we have :

  • Physical georeferenced objects
  • Geotagged pictures
  • No mean to tell if a picture is related to the respective objects

What we need :

  • Assign every photo to the right object
  • Assign the best photo to an object

STEP 1 : assign every photo to an object with a voronoi layer[mainly automatic]

As there is no mean to tell the link between photos and objects, below is a default manipulation to assign every picture to at least one object :

  • Create in both layers the folowing columns as an integer format :
    • OBJ_ID and PIC_ID
  • Assign a unique integer ID to every object (OBJ_ID) and another unique integer ID for every photos (PIC_ID) with RowId keyword.
  • You should have an empty column in both layer that will get later the ID from the other layer
  • Create a Voronoi layer from your object layer (see here for an example for Mapinfo).
  • Use a spatial query to assign every OBJ_ID to the photos point layer (see here for an example for Mapinfo). This operation garantees every photo is assigned to the closest object with the object ID. I'm guessing the photo and the object are distributed closest to each other. Every other case must be done manually, you're the only one that can say it's good or not.

STEP 2 : making sure the photos are assigned to the right object [manual]

  • Label every photo with the OBJ_ID that has been assigned in STEP 1
  • Label every object with at least its own OBJ_ID and maybe more (object type maybe?) to help you out with screening pictures.
  • Change the OBJ_ID in the photos layer if you see the picture is not rightfully assigned to make sure they have the same ID as the objects linked.

Easier way (can be done in QGIS I think) : choose which picture you want to keep by seeing a thumbnail of them instead of clicking them : you need to style your picture with a thumbnail image and data defined fields with a picture name field AND the object number so you can see instantly if a picture is not rightfully assigned to the object.

You can aswell go through Excel to do this operation if needed, as long as at the end, you have the right ID's in the respective layer tables.

BONUS TIP

  • If you want to make sure you do everything, you could assign a special Finished column (0/1) to filter every photo you validated. This symbolisation could make the "done" photos visually disappear.
  • You can also create a vector square grid where you fill the grid when every picture has been processed in the grid cell by changing the field value to 1, for example.

At this point, when this is finished, you should have every picture assigned to the right OBJ_ID.

STEP 3 : choose the best photo for an object (can be done in one time with STEP 2)

Now you have a link between photo points and object points (i.e you have many OBJ_ID in the photo layer). To filter your photos, you need to assign the "best" photo PIC_ID into your object layer . Important : you need to have one PIC_ID/object.

At this point, when this is finished, you should have every object assigned with the right PIC_ID.

STEP 4 : Display only 1 photo/object

When you have finished, you need to query your photo layer where PIC_ID in the object layer = PIC_ID in the photos layer.

You can adapt this generic method method to fit your needs. The real solution is just STEP 4 :)

My personnal advice is to avoid using Mapinfo for this, it's easier to do in QGIS with data defined field example :)

I'm not at the office right now. If something is difficult to catch, I'll post some images for ilustration.

  • How do I get QGIS to show thumbnails of photos on the canvas? – Joe Apr 18 '17 at 1:12
  • I didn't try it yet, but i'm rather sure it can be done a way or another. In the meanwhile, you can use this method : gis.stackexchange.com/questions/23955/… – gisnside Apr 18 '17 at 13:23
  • The way i think you can do it is by mass-converting your photo in little SVG thumbnails witht the same name. You'll need to have your photos names into the layer (there's plugins for converting geotagged photos to points+ names like photo2shape). You then use a svg marker icon in your symbology then probably use a date defined formula to display them. See also Evis maybe ? – gisnside Apr 18 '17 at 13:27
  • Got it : hovering an image and displaying the content can help you maybe ? nathanw.net/2012/08/05/html-map-tips-in-qgis See also here : youtube.com/watch?v=JnQk0NRqCyM – gisnside Apr 18 '17 at 13:34

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.