[Qgis-user] trimming unwanted areas
Alex Mandel
tech_dev at wildintellect.com
Fri Feb 3 13:47:58 PST 2012
On 02/03/2012 06:51 AM, Chuck Young wrote:
> I have MfrSID raster layer and two Tiger file vector layers. The image
> file is for the north half of the county and the vector files (roads and
> water) cover the entire county. I have imported them all into the
> SpatiaLite database. What I need to do is trim off the data that is
> outside the area I need to work with. Is there a method to select the area
> I want to keep or the area I want to delete, and remove the unwanted
> portions. I know I can go to each entity and break it and delete the
> portion that is not needed but there are thousands of entities and this
> would take a lot of time.
>
> Thanks!
>
> Chuck
>
Chuck,
Did you want to cut just vectors or also rasters? The method is slightly
different for each of those. The basic approach is to create a vector
layer that serves as your mask; this can be a simple box (the is a
plugin to make a perfect box if you don't want to draw by hand). Step 2
is to clip your other layers using the mask layer.
Vector->Geometry Management->Clip
Raster->Extraction->Clipper (This is GDAL Translate underneath)
If you have multiple layers to do and want to automate that might take a
little python or some command line with GDAL/OGR.
An alternate method is to use the selection tool (Rectangle), once you
have the data selected you want to keep, do a "save selection as" to
create a new file of just the selection.
I don't think there's a plugin to just do all this for a stack of layers
(sounds like a good idea), we could all it cookie cutter...
Thanks,
Alex
More information about the Qgis-user
mailing list