Select to view content in your preferred language

Irregular/Custom Time Steps in ArcMap

04-26-2019 11:22 AM
New Contributor

I want irregular “Time Steps” in ArcMap. As a result, I am wondering if there is a way to edit existing tools in ArcMap. I am essentially trying to make custom “Time Steps” for the “Time Slider” tool.

My “Time Data” has irregular “Start” and “Stop” dates, so the standard “Time Step Interval” does not work well at all in this situation. For example, it wants specific, regular periods of time and if you choose something mathematically equivalent to "even years" and something happened in '99, it won't show up for either '98 or 2000. In addition, my “Time Data” has relatively random dates over a period of ~350 years and a smallest delta t of ~9 days, so this doesn't work well. To show every date with data, I would have to display every single day within that ~350-year period. Obviously, this would not lend itself well to the data. I would like to be able to have Time Stops for every unique date, or more generally for every date that I so desire.

Firstly, as of 10.6 at least (no experience prior, sorry), if you right-click an ArcMap layer and click "Properties" you'll be in the "Layer Properties" pop-up menu. From here you can click the "Definition Query" tab and then the "Query Builder..." button below the text box. This allows you to pick a column of the "Attribute Table" and then hit "Get Unique Values" to figure out how many possible values there are. In other words, if your column in the "Attribute Table" has the values [1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 6, 8], then if the "Get Unique Values" button was run on it, it would return the values [1, 2, 3, 4, 6, 8].

Programmatically (assumptions here), there is a built-in mechanism to "Get Unique Values" from a column in the "Attribute Table." The way I'm assuming this works is that the column pointed to in the "Attribute Table" is run through and before it is "written down" in the "Unique Value List", the list is checked to make sure that information isn't already there. Therefore, it only "writes it down" once. So, now we have our list of "Unique Values." Again, there must be a built-in function (and subsequent populated list) that allows for “Unique Values” to be found from a column in the “Attribute Table” that I would like to be able to access.

Further, in order to enable the “Time Slider Tool,” one has to right-click an ArcMap layer and click on “Properties” and then the “Time” tab. From here you’re presented with the option to “Enable time on this layer.” My data has both a start and end time field so that is the option I select next and then I point the “Start Time Field” and “End Time Field” to the columns in the “Attribute Table” to which they correspond. You can then specify the “Time Step Interval,” which, again, for me is irregular. The way I’m assuming this works programmatically is that ArcMap generates a list of dates to look at based on the “Start Time Field,” “End Time Field,” and “Time Step Interval.” In other words, if your “Start Time Field” said 1900, your “End Time Field” said 1950, and your “Time Step Interval” said 1 year, the list would be [1900, 1910, 1920, 1930, 1940, 1950] (or something close based on if the “End Time Field” was inclusive or not). Therefore, there must be a list that is being accessed by the “Time Slider Tool” after that tab and its relevant options are applied to the data and translated into a list.

These thoughts are further reinforced by the discovery of the “Time Slider API Reference” webpage found here:

in which it seems to confirm that there is a “timeStops” array with “An array of dates representing the stops (tics) on the TimeSlider.”

I have no experience with implementing python (or other) programming into ArcMap and have little idea how to do so. With that being said, this seems to be an easy problem to address if I'm pointed in the right direction and have the relevant access. If anyone can point me to anything that might be able to help me or has any interest in helping me solve my problem please let me know.

Tags (2)
0 Kudos
0 Replies