I am in the process of creating a script to pull daily .asc files from a ftp server, convert them to a raster format, and push them into a mosaic raster dataset. Ultimately, the raster dataset will be updated with a new image every day, and I would like a time slider to appear when the dataset is viewed in ArcMap.
I think I will want to use:
AddRastersToMosaicDataset_management(in_mosaic_dataset, raster_type, input_path,
{UPDATE_CELL_SIZES | NO_CELL_SIZES},
{UPDATE_BOUNDARY | NO_BOUNDARY},
{NO_OVERVIEWS | UPDATE_OVERVIEWS},
{maximum_pyramid_levels},
{maximum_cell_size},{minimum_dimension},
{spatial_reference},
{filter}, {SUBFOLDERS | NO_SUBFOLDERS},
{INCLUDE_DUPLICATES | EXCLUDE_DUPLICATES},
{NO_PYRAMIDS | BUILD_PYRAMIDS},
{NO_STATISTICS | CALCULATE_STATISTICS},
{NO_THUMBNAILS | BUILD_THUMBNAILS},
{operation_description},
{NO_FORCE_SPATIAL_REFERENCE | FORCE_SPATIAL_REFERENCE})
This seems to be used for a 'batch' of raster files, however (e.g. fiter='*.tiff'). I will only be adding one raster at a time (1/day after processing the received .asc files). It is not clear to me exactly how / where I'll add the time information. The rasters will all be overlapping, so having a time slider is rather critical… or it won't be so interesting!
Does someone have suggestions on how to accomplish what I am trying to achieve?
Best Answer
I am now using an python+arcpy script for adding the raster to the Mosaic DataSet and then updating the value in the time field.
For this, I am using some Python time/date time Manuipulation to get the correct expressions. My code is as follows: