Skip to main content

New answers tagged

0 votes

Google Earth Engine script for cropping land use Image collection to shp and producing csv aggregate output

GOOGLE/DYNAMICWORLD/V1 product has a lot of images for Madagascar entire country and GEE can freeze without any result. So, as I saw in your filterBounds method the region of Menabe (one of 22 ...
xunilk's user avatar
  • 30k
0 votes

Clip polygon with vector points freehand

You can use the "polygons to lines" tool , then paste in the created output shapefile your boundaries which from what I understand are lines , then trim them in the boundary of the polygon ...
dimitris fotopoulos's user avatar
0 votes

Clipping raster image using coordinates from CSV file with Python

You can clip using rasterio.mask and geopandas: import geopandas as gpd import rasterio, os from shapely import box from rasterio.mask import mask raster_file = r"/home/bera/Drives/data1/gisdata/...
Bera's user avatar
  • 74.8k
1 vote

How to Output Singlepart features When Clipping in ArcGIS Pro

To do this I would use the Intersect (Analysis) tool which: Computes a geometric intersection of the input features. Features or portions of features that overlap in all layers or feature classes ...
PolyGeo's user avatar
  • 65.2k
4 votes

Clip data in GeoPandas to keep everything not in polygons

You may use the overlay function to do this by using the difference option. Example: from shapely.geometry import Point, Polygon import geopandas poly = geopandas.GeoSeries([Polygon([(0,0), (2,0), (2,...
jslatane's user avatar
  • 207
2 votes
Accepted

Clip data in GeoPandas to keep everything not in polygons

Using geopandas, the typical way to determine spatial relations efficiently (= using a spatial index) is by using sjoin. You are looking for the predicate=disjoint relation though, which is not ...
Pieter's user avatar
  • 3,169
0 votes

QGIS Clipping raster with vector-getting all touching pixels

As of now (2024) it seems, gdal:cliprasterbymasklayer, which is based on gdalwarp retains only pixels, whose center-point lies within the clipping mask. I needed to have only pixels that do not ...
Beni's user avatar
  • 356
0 votes

How to use ogr2ogr -clipdstsql?

I found the key is to only go one step at a time. $ ogr2ogr zxl.buf.csv :memory: -lco GEOMETRY=AS_WKT -sql \ "SELECT ST_Buffer(ST_GeomFromText('POLYGON ((...))'),-.001,1) AS WKT" $ ogr2ogr ...
Dan Jacobson's user avatar
0 votes

How to use ogr2ogr -clipdstsql?

I would write everything into the main SQL. I did not test with real data but at least this query does not throw errors SELECT ST_Intersection ( geom,ST_Buffer( ST_GeomFromText('POLYGON ((0 0,0 1,1 1,...
user30184's user avatar
  • 67.3k

Top 50 recent answers are included