1 / 19

A PYTHON SCRIPT TO PAN-SHARPEN IMAGERY & SUBSET IT WITH A QUARTERQUAD SHAPEFILE FINAL PROJECT

A PYTHON SCRIPT TO PAN-SHARPEN IMAGERY & SUBSET IT WITH A QUARTERQUAD SHAPEFILE FINAL PROJECT CHRIS CURLIS GEOGRAPHY 376 AMERICAN RIVER COLLEGE SPRING 2010 NATHAN JENNINGS, INSTRUCTOR MAY 14, 2010. The goal of this project was to create a python script which

michelec
Download Presentation

A PYTHON SCRIPT TO PAN-SHARPEN IMAGERY & SUBSET IT WITH A QUARTERQUAD SHAPEFILE FINAL PROJECT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A PYTHON SCRIPT TO PAN-SHARPEN IMAGERY & SUBSET IT WITH A QUARTERQUAD SHAPEFILE FINAL PROJECT CHRIS CURLIS GEOGRAPHY 376 AMERICAN RIVER COLLEGE SPRING 2010 NATHAN JENNINGS, INSTRUCTOR MAY 14, 2010

  2. The goal of this project was to create a python script which would pan-sharpen a Landsat 7 image and subset the new sharpened imagery by quarterquad. A shapefile was first created of those quarterquads which were of interest because they had no gaps from the SLC malfunction. The final products are: A full pan-sharpened Landsat 7 TM scene A set of shapefile boundaries for each quarterquad of interest A set of pan-sharpened TM quarterquad images

  3. LANDSAT 7 IMAGERY Due to scan line corrector malfunction, imagery has gaps on either side but there is a path in the middle of the image with no gaps.

  4. Statewide grid of quarterquads overlaying Landsat 7 TM imagery.

  5. Close up of gap and gap free area in image

  6. A statewide quarterquadshapefile was used To identify which quarterquads have no gaps

  7. A statewide quarterquadshapefile was used To identify which quarterquads have no gaps This shapefile(NoGaps.shp) was created by visually selecting q-quads with no gaps in imagery.

  8. Arc Toolbox has a tool for creating pan-sharpened imagery using coarser (30 meter) multispectral imagery with finer (15 meter) panchromatic imagery The toolbox was used to study and generate a python script example of pan-sharpening

  9. The parameters needed for pan-sharpening. Greatest weight is given to the infrared band of imagery. The weights can be set or defaults used based on pan-sharpening type.

  10. The python script checks for a pre-existing pan-sharpened image and deletes it. The variables are from modelbuilder exported script. The script creates a new pan-sharpened image of the full Landsat 7 scene.

  11. Next a search cursor is created that loops through all the records in the table for NoGaps.shp A portion of the script checks for the existence of the entire “Outputs” directory which has over 100 files and deletes it. a new “Outputs” directory is then created.

  12. Two of the fields in the NoGaps.shp table are combined to name the mask shapefiles and the subset pan-sharpened images: “USGSID” and “Qdrnt” since “QQNAME” has spaces in it.

  13. This “try” statement of the script begins looping through the FID values using “while” and gives a name combining “USGSID” and “Qdrnt”. The selected quarterquads become new individual shapefiles and these shapefiles are used with “extract by mask” on the pan-sharpened Landsat 7 TM scene to create individual quarterquad images. Using row = rows.Next(), the script continues looping until all FID’s have been selected and new files created. The script then prints: “Script completed…all quarterquads have been clipped”

  14. The script begins:

  15. The script finishes:

  16. 30 meter resolution multispectral Landsat imagery

  17. 15 meter resolution panchromatic Landsat imagery

  18. 15 meter resolution pan-sharpened imagery quarterquad overlaying 30 meter Landsat imagery SUCCESS!

More Related