Hi may i know is there a limit of mosaicdatasetraster .sqlite file that i can create using the sdk if i still not buy it yet? I try to create a new sqlite file but it does not retrieve my raster map from the local directory that contain raster map. May i know why after it create the sqlite file it will close the application?
private async void createMosaic_Click(object sender, RoutedEventArgs e)
{
try
{
// This will be qlite gdb which will get created and will hold all your rasters. string rasterType = "*.tif"; \\change to format of rasters in your folder. string filterType = ".tif$"; string localFolderPath = "C:\FolderWithRasters";// path to folder containing raster files
// specify the spatialrefernce of your mosaic raster dataset
// Create a new mobile mosaic dataset.
MosaicDatasetRaster rasterMosaic = MosaicDatasetRaster.Create(destinationSQLiteGDB, "Raster.tif", SpatialReferences.Wgs84);
// When the new mosaic dataset is ready, add some raster files.
rasterMosaic.LoadStatusChanged += (s, q) =>
{
// If loaded successfully, start adding rasters
if (q.Status == Esri.ArcGISRuntime.LoadStatus.Loaded)
{
AddRastersParameters parameters = new AddRastersParameters
{
InputDirectory = rasterPath,
Filter = "*.tif"
};
rasterMosaic.AddRastersAsync(parameters);
}
};
await rasterMosaic.LoadAsync();
//if (!System.IO.File.Exists(destinationSQLiteGDB))
//{
// rasterMosaic = MosaicDatasetRaster.Create(destinationSQLiteGDB, "myMosaicRasterds", sr);
// await rasterMosaic.AddRastersAsync(new AddRastersParameters() { InputDirectory = @"C:\Users\User\Desktop\User Stuff\New folder", Filter = "*.tif" });
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message, "Error");
return;
}
}