Question

Managing shapefile attachments

  • 11 September 2017
  • 2 replies
  • 5 views

I have a client with an interesting request. Basically they have about a dozen shapefiles that consist of points, and all points have 1-4 attachments. What they'd like is to combine the shapefiles into one complete shapefile, and carry over the attachments as well. Unfortunately ESRI doesn't allow you to merge shapefiles, and have the attachments go with it. To further complicate it a bit, all the attachments are labeled the same: photo01, photo02, photo03, or photo04. The naming convention is generic, so simply extracting the photos and reattaching them after merging the shapefiles is out of the question, unless I somehow rename the attachments as I take them off and link them to their proper attributes as they get reattached to the merged file.

I very well could save each attachment and rename it with some kind of naming convention as i download it, but it's repetitive and mind-numbing, and it seems like a perfect candidate for automation. Anyone have any thoughts? I'm relatively new to the platform, but jump in with both feet, eh?


2 replies

Userlevel 4
Badge +30

Hi @terraspatial,

Could you share us your data?

Thanks,

Danilo

Userlevel 4

If the output absolutely needs to be a shapefile, I'd consider zipping up each dataset with the accompanying photos.

Alternativelye you could find a more sensible naming strucuture and use FME to rename both the photos and the attachment attributes, e.g.

dataset1.shp
- dataset1_photo0.jpg
- dataset1_photo1.jpg
dataset2.shp
- dataset2_photo0.jpg
- dataset2_photo1.jpg
- dataset2_photo2.jpg
etc.

If you are free to chose something other than a shape file, you could consider using a File Geodatabase with a point feature class and a raster catalog linked by a common attribute.

Reply