Tag Info

New answers tagged

2

Using QGIS, Vector -> Reserach 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 ...


3

First you need to make sure that your watershed are polygons. If not : feature to polygon. Then you can make the intersection (intersect_analysis) between your watershed and your lines. You'll end up with lines that have the fields of the waershed as an attribute table. You can then use summary statstics to have the total length for each watershed. Note ...


3

1) read your shapefile with Fiona, PyShp, ogr or ...using the geo_interface protocol (GeoJSON): with Fiona import fiona shape = fiona.open("my_shapefile.shp") print shape.schema {'geometry': 'LineString', 'properties': OrderedDict([(u'FID', 'float:11')])} #first feature of the shapefile first = shape.next() print first # (GeoJSON format) {'geometry': ...


0

I eventually created a tool at work to do this and thought I would share it if anyone is interested. It is pretty simple as I am not a programmer. The script will make a list of all rasters in the input workspace and clip them to an input feature class. Each output raster will be named the same as the original raster plus "_Clip". import arcpy #Set ...


4

You can use "select by location". See the "selection" tab in the menu. This allows you to write query like 'town' is inside 'country'.


2

Why don't you crop again with your clipper after vectorizing? That way any combined polygons derived from your raster layer will match your original clipping layer. If you don't want to add an extra step you can vectorize the entire raster layer then clip to vector layer (though this could take more computation time). Any other option I can think of would ...



Top 50 recent answers are included