I have a hundreds of company logo png files that I am trying to batch import as point symbols. I haven't had much luck batch importing them to XY points (seems you have to do it individually...way too many for this).
However, could one geocode (associated XY coords) with the png files (via some software, or other) and then import them as point symbols?
Solved! Go to Solution.
You could assign geotags to the logos and run GeotaggedPhotosToPoints, creating an attachment tables from the logos and then symbolize the points with the attachments (see last point of the list below).
This might be simpler and can be done completely in ArcGIS:
with arcpy.da.UpdateCursor("NameOfLogoLayer", ["LogoPath", "LogoData"]) as cursor:
for row in cursor:
with open(row[0], "rb") as f:
cursor.updateRow([row[0], f.read()])
Result:
How wide-spread geographically are you points? You could georeference the images if you can figure out ground truth monuments. Do this images have some sort of xy notation?
Joe, I have found programs that can assign lat-long (i.e. from an excel sheet with XY and png file columns) to each png file.
You could assign geotags to the logos and run GeotaggedPhotosToPoints, creating an attachment tables from the logos and then symbolize the points with the attachments (see last point of the list below).
This might be simpler and can be done completely in ArcGIS:
with arcpy.da.UpdateCursor("NameOfLogoLayer", ["LogoPath", "LogoData"]) as cursor:
for row in cursor:
with open(row[0], "rb") as f:
cursor.updateRow([row[0], f.read()])
Result:
I am going to try this. Thanks for providing this--I hope it works. I may come back to ask you questions.
Ultimately, after several errors on my part, IT WORKED!
[Johannes, what does this mean?]
@DavidZiegler Create a new field in the point feature class with the name "LogoData" and the field type BLOB (Binary Large OBject).
Fields of this type can store byte data, so everything you can think of. Images, PDFs, Excel, Word, music, video, etc.
We're going to use it to store the logo files directly in the feature class.
Johannes has provided an effective path here to putting multiple company or other picture (png or other) logos on a map. I can't thank him enough.
Adding blob attachments as a label looks like a simple 3 step process, however no matter what I try, I just get the "broken image" icon. I'm on 2.9.9 and tried it on 3.1 with the same result. Is there some other setting I'm missing.