Can you import multiple geocoded png files as point symbols?

1871
18
Jump to solution
11-17-2021 06:12 AM
DavidZiegler
New Contributor III

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? 

0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

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:

  • Input: Table (Excel/CSV/etc) with X, Y, LogoPath
    JohannesLindner_4-1637221174704.png
  • import table into ArcGIS Pro
  • right-click on the table -> Display XY Data -> save as point feature class
  • add field LogoData (BLOB)
  • read the logos into the feature class with this python script (run in ArcGIS Pro Python window)
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()])
  • symbolize the layer
    • Single Symbol
      JohannesLindner_1-1637220903978.png
    • Allow symbol property connections
      JohannesLindner_2-1637220954812.png
    • Picture Marker, map File to LogoData, set size
      JohannesLindner_5-1637221378139.png

       

Result:

JohannesLindner_3-1637221107529.png

 


Have a great day!
Johannes

View solution in original post

18 Replies
JoeBorgione
MVP Emeritus

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?

That should just about do it....
0 Kudos
DavidZiegler
New Contributor III

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. 

0 Kudos
JohannesLindner
MVP Frequent Contributor

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:

  • Input: Table (Excel/CSV/etc) with X, Y, LogoPath
    JohannesLindner_4-1637221174704.png
  • import table into ArcGIS Pro
  • right-click on the table -> Display XY Data -> save as point feature class
  • add field LogoData (BLOB)
  • read the logos into the feature class with this python script (run in ArcGIS Pro Python window)
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()])
  • symbolize the layer
    • Single Symbol
      JohannesLindner_1-1637220903978.png
    • Allow symbol property connections
      JohannesLindner_2-1637220954812.png
    • Picture Marker, map File to LogoData, set size
      JohannesLindner_5-1637221378139.png

       

Result:

JohannesLindner_3-1637221107529.png

 


Have a great day!
Johannes
DavidZiegler
New Contributor III

I am going to try this. Thanks for providing this--I hope it works. I may come back to ask you questions. 

0 Kudos
DavidZiegler
New Contributor III

Ultimately, after several errors on my part, IT WORKED!

0 Kudos
DavidZiegler
New Contributor III
  • add field LogoData (BLOB)

[Johannes, what does this mean?]

0 Kudos
JohannesLindner
MVP Frequent Contributor

@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.


Have a great day!
Johannes
DavidZiegler
New Contributor III

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. 

0 Kudos
m3
by
Occasional Contributor

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.

0 Kudos