[Qgis-user] Gdal Clipper plugin

Mars Sjoden aurorageomatics at gmail.com
Sat May 21 22:44:12 PDT 2011


On Sat, May 21, 2011 at 8:22 PM, Michael Kimmerly <mikekimmerly at gmail.com>wrote:

> The gdal_warp -clipper plugin in Qgis appears to be a real life-saver for
> me
> in my use of Qgis in doing NDVI analysis in agriculture where I need to
> clip
> my data to a particular farm or field that may be quite irregular in shape.
> However, I am having difficulties getting the plugin to properly trim to
> the
> extent that I want to end up with.
>
> My process is:
>
> 1. I am loading a landsat scene for my data.
> 2. Creating a shapefile layer and digitizing a polygon of the area that I
> want to analyze.
> 3. Select the polygon and save as a separate shapefile.
> 4. Perform the clipper function on the landsat raster using the saved
> polygon shapefile as my mask.
>
> Not sure if step 3 is necessary but want to make sure the mask is limited
> to
> only the polygon that I digitized. Also the mask polygon may come from an
> already existing shapefile that may have been gps'd or previously digitized
> from some other source.
>
> The resulting raster is clipped to the polygon but the extent is still the
> original landsat. From gdal documentation appears that the -crop_to_cutline
> needs to be included in the plugin. Am I correct in this or am I missing
> some step?
>
> Thanks for any help.
>

This is how I have achieved what you are seeking in my past experience;

1. Load image
2. Load vector mask for clipping of image
3. Find extent of clipping vector mask, and perform a rectangular clip of
the image
4. Perform the vector mask clip

I suppose you could always to the rectangular clip after the vector mask
clip also.

There should be a way to automate this task, retrieve extent of vector mask
and automate rectangular clip either before or after the vector mask clip.

Mars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110521/f609fc9d/attachment.html>


More information about the Qgis-user mailing list