Hot answers tagged

10 votes

Clipping buffers to joined polygons in QGIS

You can follow these steps: Buffer tool (distance: 100 ft) Intersection tool (input layer: buffers, overlay layer: parcel) Select by Location tool (select from: intersection, predicate: contain, by ...
Kadir Şahbaz's user avatar
5 votes
Accepted

ogr2ogr: -clipsrc or -clipdst?

If you read more carefully https://gdal.org/programs/ogr2ogr.html you will notice that the texts are not the same. -clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent the specified bounding box ...
user30184's user avatar
  • 64.7k
5 votes
Accepted

Cropping georeferenced map JPEG within QGIS

Create the drawn blue polygon as a true polygon, then just use Raster - Extraction - Clip raster by mask layer.
John's user avatar
  • 1,799
3 votes
Accepted

How to use ogr2ogr's spat_extent keyword to clip a layer of a GPKG file?

It looks like there is a regression in GDAL 3.8 that breaks the clipping. I filed a bug report for it here: https://github.com/OSGeo/gdal/issues/9013 As a workaround, you can disable usage of the ...
Pieter's user avatar
  • 1,629
3 votes
Accepted

Clipping lines from intersecting polygons with sf in R

Use st_difference: > dd = st_difference(line_df, poly_df) > plot(dd) Note that for this to work as a "clip" to the polygon you need the polygon as a single feature, otherwise the ...
Spacedman's user avatar
  • 63.4k
3 votes
Accepted

What Does It Mean To "Clip" A Polygon?

"Polygon clipping" in GIS means to take one polygon, A, and a clipping polygon, B, and compute the bits of A that are inside B. For example you might have a polygon of forest, and a polygon ...
Spacedman's user avatar
  • 63.4k
3 votes

Clip grid to extent of map in QGIS in Layout View

First of all set the extent, to do this set a expression in each of this parameters (X min, Y min, X max and Y max) in the Extents menu of the map properties. click the icon () in front of each of ...
Mayo's user avatar
  • 3,887
2 votes

Naming clipped files from layer mask?

If you've split the grid into individual layers that are saved in a directory, then you can select that directory (using Autofill...) as the Mask layer field for Clip raster by mask layer tool in ...
Tom Brennan's user avatar
  • 4,652
2 votes
Accepted

Clipping a raster with a multipolygon using rasterio in Python

Is this what you are looking for? I used this example integrated with a for loop. Note that rasterio.mask.mask(src, shape, crop=True) needs to be changed to [shape] due to shapes (iterable object) – ...
Binx's user avatar
  • 1,340
2 votes

Defining national borders in TIF file and cutting away excess map in QGIS

Take a look at: https://geosupportsystem-se.translate.goog/2021/10/20/qgis-och-blender/?_x_tr_sl=sv&_x_tr_tl=en&_x_tr_hl=en&_x_tr_sch=http A nice example of how to combine QGIS and Blender ...
BERA's user avatar
  • 71.4k
1 vote

Only Clipping part of a vector layer with QGIS

Setting: With Line Layer --> Lines to Polygons: With new Polygon from Lines AND Polygon --> Symetrical Difference With Result of Symetrical Difference --> Multipart to Singleparts Delete ...
Xeppit's user avatar
  • 1,282
1 vote

Clipping with added "buffer"

In ArcgisPro you can use the Select by location tool on your point layer with the realitionship Within distance and the city layer as Selecting Feature. Than Export Features with the selected rows ...
Xeppit's user avatar
  • 1,282
1 vote

Clipping with added "buffer"

Buffer your city by 500m Use your buffered city to Clip your point layer Use that resulting layer of city+500m bus stations for your analysis.
ycartwhelen's user avatar
  • 2,392
1 vote
Accepted

QGIS: Clipping lat/lon points to raster file based on threshold value

You can do this directly, without creating any "boolean" raster using raster calculator. Get the raster value for each point and select those with a value < 2. Use Select by Expression on ...
Babel's user avatar
  • 70.6k
1 vote
Accepted

Rasters not having the same total area for classes within the same study area

I also do not believe this is an Origin/Nap issue. I believe that the reason for this is that the SLOPE calculations were performed after the DEM was clipped to the study extent. Because the slope ...
JasonInVegas's user avatar
  • 1,800
1 vote

Rasters not having the same total area for classes within the same study area

I do not believe that this is an origin/snap issue. Although, it is always prudent to set an analysis environment to control for cell size, origin/snap and mask. There are many operators that result ...
Jeffrey Evans's user avatar
1 vote

Raster clip using REST API with shapefile polygon

You can use the provided WPS cropCoverage process which take a raster and a polygon.
Ian Turton's user avatar
  • 81.1k
1 vote

Raster band values affecting analysis in ArcMap

In ArcGIS for Desktop you can trick the renderer by copying the statistics of the larger raster, to do so: Export the statistics of the raster you're trying to match to an XML file Instructions Set ...
Michael Stimson's user avatar
1 vote

Clip raster to certain pixel size in multiple mannualy selected locations in QGIS

Your best option might be gdal_translate using the -srcwin option. With that option you can set the offset (in row-column) and the size (in pixels) to subset the input raster. But you will need the ...
Micha's user avatar
  • 15.6k
1 vote

Google Earth Engine

You need to share your code as follows. In it there are two different date ranges: yours and one where there are images. var pt = ee.Geometry.Point(37.9988, -1.3799); //Kitui, Kenya Map.centerObject(...
xunilk's user avatar
  • 29.9k
1 vote

How can I snap to an existing raster in QGIS?

I wrote some code, which is the best solution I'm aware of at this stage when nice alternatives aren't available (e.g having pixel coordinates that are all divisible by 10cm or something) import numpy ...
Buff Fox's user avatar
  • 119
1 vote

Joining (merge, union) non-overlapping vector polygons with QGIS

Finally, I got almost an "ideal" result for my polygons to what I expected - it was the Concave Hull QGIS function, also available in PosGIS and other systems. It worked well for other ...
Alexey Unagaev's user avatar
1 vote

Mosaicing non-overlapping rasters in QGIS

You can exclude neatlines. You can fill nodata value with GDAL's 'fill nodata' tool. It will calculate values by interpolation. You can explore variables for interpolation.
Hemixa Patel's user avatar
1 vote

Calculate statistics from croppped WMS in OpenLayers

Currently the only way to access pixel values in bulk is in a layer's postrender event where you could use event.context.getImageData(), or via an ol/source/Raster (which would need threads: 0 to ...
Mike's user avatar
  • 12.4k
1 vote
Accepted

ArcGIS Pro and Map Clipping

The clue is in the word, extent. Extent is the "bounding box" to the display which of cause is a rectangle. So you are clipping back to the rectangle, the "custom" part is that ...
Hornbydd's user avatar
  • 43.3k
1 vote

Clipping in/with Sentinel Hub API

As Vince has said you cannot create a "perfect" circle using a raster as pixels are not circular. However, using the Sentinel Hub Process API, you can return an image with circular ...
William Ray's user avatar
1 vote
Accepted

Unable to transform edge error when clipping ImageCollection in Google Earth Engine

Seems to be a bug, but you can work around it by clipping the individual images before you call toBands: var modis_evi = ee.ImageCollection('MODIS/061/MOD13A2') .select('EVI') .filter(ee....
Noel Gorelick's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible