2

I have a shapefile and I need to crop/clip it based on a rectangle of particular latitude and longitude using QGIS.

If it is possible, how do I do that?

enter image description here

3
  • @vinayan no, it use 2 shapefile in that question, I only have one.
    – egig
    Commented Aug 25, 2014 at 6:42
  • Would you be able to edit your question to clarify that your requirement is to be able to specify min/max lats and longs to form a rectangle that is to be used to clip a shapefile, please?
    – PolyGeo
    Commented Aug 25, 2014 at 6:58
  • 1
    This Q&A looks like it may also be helpful to you: gis.stackexchange.com/questions/34202/…
    – PolyGeo
    Commented Aug 25, 2014 at 7:02

1 Answer 1

3

You can create another layer, draw a box by your coordinates and follow the already referenced answer How to crop Shapefiles in QGIS?. I would myself use ogr2ogr with the -spat parameter. If you want also to clip the selected features with the selection box use -clipsrc [xmin ymin xmax ymax]|

http://gdal.org/ogr2ogr.html

QGIS Processing toolbox has a GDAL raster tool in "GDAL/OGR - Extraction - Clip raster by extent". Similar tool for vectors would be generally useful. Perhaps you could make a QGIS feature request "Add a new GDAL/ORG tool: Clip vector layer by extent".

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