0

Basically, I have a bunch of photos from a field data capture software that I am exporting into Arc. I need to create a map for these photo locations labeled in the the order the photos were take.

I will have to sort on the timestamp, add a field and then sequentially number the field based on the sort.

This is a map that will be created after each inspection is done, so I would like to automate the process as much as possible.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
gnarkilleptic
  • 115
  • 1
  • 9
  • 2
    It can certainly be done. Have you tried anything yet, or found any documentation that looks like it might help with what you need? – maverickGIS Dec 20 '16 at 13:41
  • I was able to figure this out in model builder. I used script I found on an ESRI technical article here: http://support.esri.com/technical-article/000011137. – gnarkilleptic Dec 20 '16 at 14:28

1 Answers1

2

I solved this using ModelBuilder for anybody who is interested in doing something similar. Using the code in this ESRI blog: http://support.esri.com/technical-article/000011137. If you run it straight from a field calculation, it will not order sequentially based on your sort. However, if you use ModelBuilder to run the sort tool then add a field and calculate it with that code it will sequentially number the added field based on your sort output.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
gnarkilleptic
  • 115
  • 1
  • 9
  • 1
    You don't need ModelBuilder to run the Sort tool. Sort creates a new data layer with the data ordered appropriately. With Filegeodatabase and Shapefile types you always have a sequential number, managed by the system, it is named Objectid or FID. – klewis Dec 20 '16 at 16:36
  • I realize that Arc creates an OID field for giving features a unique identifier. This does not relate to my issue as I was working on creating a new sequentially numbered field based on a timestamp. I got this to work in ModelBuilder. If you sorted the attribute table in ArcMap itself and ran the script, It would not order the new field based on that sort. – gnarkilleptic Jan 25 '17 at 16:32
  • 1
    Sorting the table view in ArcMap is not permanent. I ran the Sort Tool, on a Date field, then ran the autoIncrement() function. The new Sequential ID's exactly match the ObjectID. It seems easier to Calculate the Sequential ID from ObjectID, after the Sort Tool. The Python autoIncrement function is worth saving for other problems too. – klewis Jan 25 '17 at 18:13