Automatically draw/place labels with photos in ArcGIS Pro

01-18-2022 04:40 AM
New Contributor III

A question in two (related) parts - help with either would be greatly appreciated!

Part one: is there a way to automate the drawing and placing of 'labels' for points, consisting of a caption  and an image? The caption would be taken from an attribute field in the point layer, and the images are currently stored as an attachment to the points, but I've also downloaded each of them to a local folder and have a table which cross-references points and attached images, so could add an attribute field to the point layer with the corresponding image locations. Ideally the 'labels' (scare quotes because the ones below aren't actually labels, rather images and text boxes in a layout) would look something like the screenshot below, although I recognise that I would be unlikely to achieve that level of placement via any automated method - the example below was produced by manually placing each image/textbox/callout line.


I have 744 photos to map in this way, so am very keen to automate the process as much as is possible, even if not fully.

Possible solutions I've considered:

  • Pop-ups have the basic idea of what I want, i.e. a way of automatically combining an image (from attribute field or attachment) with a caption (from attribute field) for each point. I've been working in Pro so far, but could use ArcGIS Online (which is probably more pop-up-focused) if it achieved what I want to. But from the searching I've done so far, I don't think it's possible to have multiple pop-ups display at the same time when saving/printing an AGOL map, eg Re: Exporting Info Pop-up Data - Esri Community. In any case, this also wouldn't be ideal from a cartographic perspective, as the pop-ups would likely obscure other points.
  • Labels seem like the obvious choice, since they already come with a powerful placement engine, but I haven't been able to find a way to incorporate images into them the way I would like. All the approaches I've looked at online to using images in labels focus on using images as point symbols (e.g. using a supermarket logo to label the supermarket) but don't provide a way to combine these images with text in the way I'd like.
  • A script to draw/place the images - I think developing a tool which draws the relevant image/caption for each point within a layout would be fairly straightforward (although I haven't done so yet), but automating the placement of these in a satisfactory manner would be a lot more challenging.

Part two: is there a way to automate the creation of features to use as pages in a map series that produces a satisfactory result given the constraints detailed below?

Because I'm trying to map 800 points with 744 corresponding photos, I'll need to split the map over many different pages. In the past I've used the Grid Index Features tool in Pro to generate pages to use in a map series, but because this constrains the pages to a grid, I often end up manually adjusting the placement of the pages. For example, a polygon may be split between two pages if it sits on their boundary, but the polygon would fit comfortably inside a single page, so I delete one page and move the other so the polygon is in the centre. When I only have a few pages it's not the end of the world to use this process (recently I did this with 40 pages, post-cleanup), but I suspect I will have so many pages that it will take a very significant time to move them about manually as I have done in the past, so if it's possible to automate the process somewhat that would be very useful.

I've included this question here and not in a separate post because the placement of the labels discussed above will affect the placement of pages: i.e. there could be a page which neatly fits twenty points, but does not have the space for twenty corresponding photo labels. In an ideal world there would be a tool which knows which points will need which photo labels, and where these will be placed, and which uses this information to optimally split the map into pages which neatly fit the requisite points/labels.

I suspect that if I constrained the whole map to the same scale, there would be one area of dense points which needs to be very large-scale, but which would be unnecessarily zoomed in for the other areas. So an optimal solution would be able to take a list of acceptable zoom levels, and use the 'best' scale out of these (i.e. zoomed out where possible but zooming in allowed where an area is particularly point-dense). But I recognise that this would be challenging to implement in an automated fashion.

The other problem with a map series approach is that I don't know if it's possible to turn on/off layout items like photos/textboxes in different pages of a map series according to the page number (this wouldn't be an issue if I find a way to make labels work), so I may have to make a separate layout for each page of the would-be map series.

For reference: these are the majority of the points (the data aren't public so I've turned off the basemap and any other layers, but the image below is ~8km across):


This is a more zoomed-in view of the bottom of the image shown above, which is particularly dense - about 1km across:


Thank you if you've got this far - I doubt anyone will have a complete solution, but any help would or suggestions will be hugely appreciated!

2 Replies
Occasional Contributor

For this part:

Because I'm trying to map 800 points with 744 corresponding photos, I'll need to split the map over many different pages. In the past I've used the Grid Index Features tool in Pro to generate pages to use in a map series, but because this constrains the pages to a grid, I often end up manually adjusting the placement of the pages. 

Instead of using a Grid Index you could create a polygon layer and add page numbers to it and us this as your grid. Be sure to add a scale field so you can control the scale if each page if desired. This would more like a Strip Index but with different sized polygons to fit your data.

Once upon a time I built a grid within a grid. First a page would display with several features on it, then there would be several other small polygons within that one page that would "zoom in" and show the detailed view of each feature.

0 Kudos
Esri Notable Contributor

With regard to the first item of pictures/text as labels - this was an ArcGIS Idea back in 2012 and answered by @KoryKramer 6/16/21 with a solution of sorts using ArcGIS Pro 2.7 and higher.  This workflow would symbolize your points with the image and then you have a label popup for the image marker.  Further there was an Enhancement Request (ENH-000091753) - please provide a functionality to label features with attachments or pictures from a raster column.  Not sure if this had any traction for development.

0 Kudos