1

I have a mosaic dataset of 421 images and I want to extract just a few of them to give to a client. Rather than click through the folder selecting the files (because they are not contiguous) I want to transfer is there a way to use the list of selected footprints (using selection features in ArcGIS) to automate the copying? If there is I'm running into a total mind blank and have not found anything close to what I'm trying to do.

Possibly something I could use in Total Commander 8 or CMD prompt (i.e. xcopy/robocopy, etc) because ArcGIS would be too slow I think.

EDIT.

I also have Global Mapper 14 to use of the explorer options aren't feasible.

2

Personally I'd create a mosaic dataset (or VRT) and extract the area of interest from that.

VRT is supported by Global Mapper but will be quite slow, I would go with the mosaic dataset for this operation.

Both of these raster types are links only to their respective rasters so don't take very long to create as the rasters themselves aren't being copied. Mosaic datasets will create overviews and will take a bit longer - but that's probably worth it.

Extracting from ArcGis can be done in a few ways:

To get a list of all the rasters in all subfolders you can use Dir in DOS like this:

DIR c:\where\images\are\*.tif /b /s > c:\some\path\TiffFileList.txt

Which instructs command to find all the files with .tif extension in this folder and all subfolders and write just their full path to a file c:\some\path\TiffFileList.txt - obviously substitute your own paths and extension if not tif. If your paths contain spaces they will need to be quoted like DIR "c:\path with spaces\*.tif" /B/S > c:\some\path\TiffFileList.txt or the instruction will get confused.

Then open the text file, copy the contents and paste into load rasters for a mosaic dataset or use -input_file_list c:\some\path\TiffFileList.txt for GDALBuildVRT.

If you know which rasters you want to copy you can open up the file list in Excel, delete the rows that you're not interested in, insert a column and fill with copy then save as csv - open the csv in notepad and replace the commas with spaces then save as .bat and you've got a batch file to copy rasters... put the batch file in the location you're wanting to copy the files to and double click. You might run into problems if you have duplicate file names or spaces in your paths though.

  • [quote]If you know which rasters you want to copy you can open up the file list in Excel, delete the rows that you're not interested in, insert a column and fill with copy then save as csv - open the csv in notepad and replace the commas with spaces then save as .bat and you've got a batch file to copy rasters... put the batch file in the location you're wanting to copy the files to and double click...quote] This worked perfectly, thank you. I just copied 63 200MB rasters in less than 5 minutes to another drive. – wiebe712 Nov 18 '14 at 14:44
  • You're welcome. That technique I have been using for pseudo batch processing since before ArcGis 8.0 on Windows NT. You can do more than copy functions by building up command line instructions in Excel (or open office equivalent) and then replacing commas in notepad. It's a handy technique when you need to perform functions that would be too difficult to script but still can be done in command line. – Michael Stimson Nov 18 '14 at 21:49
3

Given a mosaic dataset, you can select the footprints of interest and then in the table of contents right-click the footprint layer > Data > Download Selected Rasters... which then allows you to choose which rasters to download.

enter image description here

  • I have ArcGIS Desktop Advanced (10.2) and I just got a warning about exceeding the maximum allowed per request...20 rasters at a time. – wiebe712 Nov 18 '14 at 14:43
  • That's handy to know; I was not aware of this facility Oli, +1 for that. I notice that overviews and statistics are present, can you choose not to download these files or is it only by OID? – Michael Stimson Nov 18 '14 at 21:44
  • @Michael You can choose to download just the image by itself (without the other two files) as each check box is independent but you probably would want to also have the xml file as it includes not only the statistics but the coordinate information as well. – Oli Nov 19 '14 at 4:52
0

While I realize this is a very old post. I ran into a much better solution recently. Export Mosaic Dataset Items can do exactly what you are asking. You can export by query definition or clip type (Feature Class). I hope this helps anyone stumbling on this post in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.