Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm new to the GIS world, and using ArcGIS 10, so please forgive me if this is a simple question. I have DTED files (level 2) that I have placed into a mosaic dataset, and I'm trying to determine which DTEDs intersect a polygon in another layer. I'm using python, and used the SelectLayerByLocation method, but am having trouble getting the results from it. I can't use the CopyFeature method (which is what's in all the examples) because it's probably returning a mosaic layer instead of feature. I also tried the Copy method, but that didn't work either. Any suggestions? Here's that part of my code:

   arcpy.MakeMosaicLayer_management('CreateMosaicDataset', 'mosaic_lyr')
   arcpy.SelectLayerByLocation_management("mosaic_lyr", "INTERSECT", buffershape)
   # If features matched criterias write them to a new feature class
   arcpy.Copy_management("mosaic_lyr", "DTEDs_for_Shape")

Update...

**SOLUTION:

  # Create a Mosaic Layer from the mosaic dataset
    arcpy.MakeMosaicLayer_management('CreateMosaicDataset', 'mosaic_lyr')
    # Select DTEDs intersecting the polygon
    arcpy.SelectLayerByLocation_management("mosaic_lyr/Footprint", "INTERSECT", buffershape)
    # write selected features to a new feature class
    arcpy.CopyFeatures_management("mosaic_lyr/Footprint", "DTEDs_for_Shape")
share|improve this question
1  
please be more specific about the question. –  Brad Nesom Dec 15 '11 at 22:34
add comment

1 Answer

If you want to select the dted that is intersected by a polygon.
You probably need to utilze the footprint in the mosaic dataset.

share|improve this answer
    
When I used ArcMap, I used the footprint to find the intersecting dteds. But, how do I specify the footprint in the python script? The SelectLayerByLocation method currently runs without errors, but I don't know what to use to 'get' the results. Do you know what I need to use to get those results? When I try CopyFeatures, it says "the value is not a Feature (or Raster Catalog) Layer". When I try Copy, it says "value is not a Data Element". I'm stumped :-) –  Ruth Dec 16 '11 at 15:35
1  
Brad - Thanks so much for suggestion - it led me to my solution. I should've realized it myself, since I used the footprint when I did the selection manually in ArcMap! Here's my solution: # Create a Mosaic Layer from the mosaic dataset arcpy.MakeMosaicLayer_management('MosaicDataset','mosaic_lyr') # Select DTEDs intersecting the polygon arcpy.SelectLayerByLocation_management("mosaic_lyr/Footprint", "INTERSECT", buffershape) # write selected features to a new feature class arcpy.CopyFeatures_management("mosaic_lyr/Footprint", "DTEDs_for_Shape") –  Ruth Dec 16 '11 at 17:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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