2

I have two files:

National land cover data (raster)

HUC 8 (vector files of watersheds)

Both are national scale but the HUC 8 takes up a larger geographic region than the raster set so I want to cut the HUC 8 to match the smaller extent of the raster set.

How do I do this in ArcGIS Desktop 10.2.2?

2

You did not specify which software you use in your question. Based on some of your other questions you are using ArcGIS in which there are a couple of ways to solve this problem.

One would be to use Raster to Polygon to convert your raster to a vector layer. You may then need to merge or dissolve the resulting shapes into a single bounding box which you can use to clip your vector data. There are a few other questions here about converting the extent of a raster to a vector polygon, though many of them do so programmatically using Python.

A simpler method if precision isn't required is to simply draw a new polygon shape that is roughly the bounds of your raster and use that. "Roughly" can mean anything from visible overlap to zooming in to 1:5 or better at each raster corner to click the points defining your polygon.

Once you have the bounding box to clip with, there are again several options. The Clip (Analysis) tool will do it (note this is not the Clip (Data Management) tool which is for clipping rasters to a boundary).

0

Using QGIS, Vector -> Research Tools -> Polygon from layer extent gives you a polygon that you can use for clipping the other vector data to.

There is a GDAL module called gdaltindex that does the same without using other software:

gdaltindex N51E007.shp N51E007.hgt

creates a bounding polygon for a sample SRTM data file.

For a python solution to get the raster extent, see How do I extract a raster's extent in python? and How to get raster corner coordinates using Python GDAL bindings?

Note that you have to densify the geometry if you intend to use it in another projection where longitudes or latitudes get bended.

  • Hi, thank you. I will have to wait until someone with administrative privileges is in the office to install the QGIS. – WolverineTime Sep 29 '14 at 20:56

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.