mosaic dataset add raster duplicates?

876
2
07-25-2011 09:38 AM
gisscconsulting
New Contributor
This ESRI code snipple shows how to add raster to mosaic dataset

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_add_rasters_to_a...

However, it won't consider exist ones. If you run the method the second time, duplicate records added.

There is "AddNewRasters" in IMosaicDatasetOperation interface
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//001q0000018r000000

However, the documents related to that is none.

Any one have successfully used this "AddNewRasters" method in .net?

Are there a way to remove an item from mosatc dataset using .net?
0 Kudos
2 Replies
RobertBerger
New Contributor III
Greetings,

To exclude duplicates on load you need to set the property in IAddRasterParameters:
IAddRastersParameters AddRastersArgs = new AddRastersParametersClass();
... setup crawler etc...
// Exclude duplicates
AddRastersArgs.DuplicateItemsAction = esriDuplicateItemsAction.esriDuplicateItemsExclude;

Hope this helps.

Robert
0 Kudos
gisscconsulting
New Contributor
esriDuplicateItemsAction.esriDuplicateItemsExclude;


It worked just as it said. Thank you
0 Kudos