Select to view content in your preferred language

Make mosaic dataset custom fields "allowed" using ArcPy

165
4
Jump to solution
02-07-2025 01:40 PM
JoanneMcGraw
Frequent Contributor

Hello all,

Given a file geodatabase containing a mosaic dataset, I have added and populated fields using arcpy functionality. Now, I am setting the mosaic dataset properties, but there doesn't appear to be any way to make the custom fields "allowed". There is no entry to set this property in the Set Mosaic Properties dialog in Model Builder. 

Is this not supported through automation?

Cheers,

 

0 Kudos
1 Solution

Accepted Solutions
JoanneMcGraw
Frequent Contributor

I believe I have solved my problem.

This order doesn't work:

  1. Create fgdb
  2. Create mosaic
  3. Set mosaic properties
  4. Add fields
  5. etc....

But this order does:

  1. Create fgdb
  2. Create mosaic
  3. Add fields
  4. Set mosaic properties
  5. etc....

I assume running the Set Mosaic Properties tool for the first time will simply make all fields that exist in the mosaic dataset "allowable" for querying. Adding the fields after having done that, doesn't update the property. And, it appears that subsequent invocations of Set Mosaic Properties doesn't either. I assume the tool recognizes whether it's ever been set previously and, if it was, it doesn't change it.

Anyway, this seems to have taken care of my problem. Hopefully, the info is of use to someone else.

Cheers!

 

View solution in original post

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor
0 Kudos
JoanneMcGraw
Frequent Contributor

Retired?

I don't see anything in the documentation indicating that. Is there a replacement?

0 Kudos
DanPatterson
MVP Esteemed Contributor

That is my status


... sort of retired...
0 Kudos
JoanneMcGraw
Frequent Contributor

I believe I have solved my problem.

This order doesn't work:

  1. Create fgdb
  2. Create mosaic
  3. Set mosaic properties
  4. Add fields
  5. etc....

But this order does:

  1. Create fgdb
  2. Create mosaic
  3. Add fields
  4. Set mosaic properties
  5. etc....

I assume running the Set Mosaic Properties tool for the first time will simply make all fields that exist in the mosaic dataset "allowable" for querying. Adding the fields after having done that, doesn't update the property. And, it appears that subsequent invocations of Set Mosaic Properties doesn't either. I assume the tool recognizes whether it's ever been set previously and, if it was, it doesn't change it.

Anyway, this seems to have taken care of my problem. Hopefully, the info is of use to someone else.

Cheers!

 

0 Kudos