Skip to main content

Questions tagged [differences]

A "difference" operation is a geoprocessing operation that completely removes one overlapping polygon and the intersection of that polygon from the other. It uses one polygon to "take a bite" out of another.

Filter by
Sorted by
Tagged with
2 votes
0 answers
37 views

How can I detect which geometries degenerate into lines on running QGIS difference tool

I run difference tool between two area layers. Sadly, it failed with "Could not add feature with geometry type MultiLineString to layer of type MultiPolygon" It seems that some of geometries ...
reducing activity's user avatar
2 votes
2 answers
65 views

Splitting polygon that is result of difference function between two polygons in QGIS

So I have this polygon (picture 1) that will be used to make its bounding geometry as shown in the second picture. After making this bounding geometry, I wanted to make the difference polygon from ...
Yosua's user avatar
  • 21
4 votes
1 answer
182 views

Difference of two polyline layers in QGIS

I have an original polyline layer and a modified one representing only a part of the original network. In an example case I cut 10 meters at start and end of each feature using Geometry by expression ...
winnewoerp's user avatar
  • 1,504
2 votes
1 answer
106 views

Why do a line and polygon still intersect after using st_difference() in R?

I have a line that intersects a polygon, and I would like to get only the portion of the line that does not intersect the polygon. Using sf::st_difference() does indeed trim the line, but the result ...
jccborders's user avatar
1 vote
1 answer
98 views

Difference tool retains records of deleted point features (without geometry)

I was using the Difference tool in QGIS version 3.22 on a points layer with a polygon overlay. This failed. I read this problem is commonly reported in 3.22 and upgraded to 3.30.3, as advised. Now, on ...
hmnoidk's user avatar
  • 707
0 votes
1 answer
37 views

Multiple subtraction raster in QGIS

For each year from 1951 to 2021 I have two rasters: one precipitation (P) and the other evapotranspiration (E). I want to do P minus E for each year--so I would like one output of the subtraction (P-E)...
Antonio Barone's user avatar
2 votes
1 answer
108 views

How to create one raster layer from two raster layers in which priority is given to one of the raster layers' values (the smaller in extent)

I have two raster layers of elevation data. One, of a larger extent, - 'warped' - is to 25m definition. The other, of much smaller extent - '194555-1_25cm_DSM' - but within the bounds of the larger ...
WestCorkPalaeo's user avatar
2 votes
1 answer
76 views

Remove parts of line that are not contained within multiline

PostgreSQL 14.6, Postgis 3.2 I have two tables, new_geom and original_geom new_geom is a derivation of original_geom that merged some lines that touched and had the same properties. It worked fairly ...
Avocado's user avatar
  • 295
1 vote
0 answers
108 views

Calculating 2 or 4 new marginal bounding boxes from 2 overlapping bounding boxes in Leaflet?

The Scenario I have a web map that calls for data whenever the map moves. It sends the bounds of the map and returns data within those bounds. Our data source just got way bigger, so I am trying to ...
Seth Lutske's user avatar
2 votes
1 answer
151 views

Mask polygon with raster layer

I have very large raster, whih is basically merge of smaller rassters : I would like to create separate polygons for each "group" of pixels with values, to get something like this (sorry ...
ReutKeller's user avatar
  • 2,169
0 votes
1 answer
46 views

Masking two shapefiles with MultiLineString and MultiPolygon errors

I created a shapefile by converting a raster to a polygon using raster pixels to polygon tool and used this as a base layer to remove unwanted areas with difference tool. I added multiple shapefiles ...
Hasan's user avatar
  • 21
0 votes
1 answer
408 views

Comparing smoothing algorithms in R

I am comparing smoothing algorithms in R. More specifically, the raster.gaussian.smooth from the spatialEco package and the focal from the terra package. Visually, the results look similar but the ...
Nikos's user avatar
  • 1,093
0 votes
0 answers
14 views

Rasterio how to find same values in excel

I have two geographical tiff files, the difference is 20 years. There are some values ​​in the pixels of these drawings. I need to find differences between the second file and the first one. I tried ...
Даут Цицкиев's user avatar
0 votes
1 answer
141 views

Creating a layer showing difference before/after flood (raster)

I ran a supervised classification on two satellite images - (i) before and (ii) after a flood. Now even before the floods, there were pre-existing water bodies which obviously don't count as flooded ...
Madhav Warawdekar's user avatar
7 votes
1 answer
861 views

Difference function in QGIS is extremly slow

I execute the difference function in QGIS. I have used it many times before, and it worked well. For the final task I like to delete lines with my nationwide buffers. It is a lot, but I have had in ...
BAE_23's user avatar
  • 677
0 votes
1 answer
87 views

Substracting rasters with a "buffer" to ignore slight offset?

I would like your help to understand my problem and formulate the appropriate question about it. I have two maps of the same place at two different years, one from 1900, other from 1957 (British ...
JeremieT's user avatar
0 votes
2 answers
143 views

How can I get QGIS Difference tool to operate on different CRS? Or can I project a polygon to go "off the side" of the map to the other side?

I am attempting to map arctic regions. I have a predetermined area off the coast of Alaska that has longitudes both negative and positive. In a north pole azimuthal equidistant projection, it looks as ...
Shawn Cunningham's user avatar
1 vote
1 answer
232 views

PostGIS function ST_Difference changes geometry type [duplicate]

I am trying to use the ST_Difference tool within PostGIS. The intention is to take two multipolyogn layers that have some overlap and eliminate the overlap by taking the difference. The problem is ...
nerdsconsider's user avatar
2 votes
1 answer
58 views

Vector Difference Multistring lines doesn't work 100% (QGIS)

I'm trying to substract one layer with multilinestring lines from another one. However, the layer that I get does have some (parts of) lines substracted, but not all. Does anyone know another tool ...
Yelper's user avatar
  • 107
0 votes
2 answers
1k views

How to subtract two Rasters with discrete values in R?

I'm working with these two rasters: clc_forest18 class : RasterLayer dimensions : 16000, 12000, 1.92e+08 (nrow, ncol, ncell) resolution : 100, 100 (x, y) extent : 4e+06, 5200000, 1200000, ...
Fabio Castelli's user avatar
1 vote
1 answer
625 views

Cut smaller polygons out of larger ones in using R/sf

I've got a set of polygons containing overlapping geographical levels, both regions and cities. This is a simplified example: I want to cut the cities out of the regions. So in the example above, I ...
Oliver's user avatar
  • 111
1 vote
1 answer
1k views

NBR difference in Google Earth Engine

I want to use two NBR images(NBR1 and NBR2) for the differenced Normalized Burn Ratio (dNBR). But I can't identify the error of dNBR output. Code snippet: var NBR1 = landsat8_1.expression( &...
willy1104's user avatar
1 vote
0 answers
76 views

What could explain the bizarre discrepancy in the geometry between these two 3D maps?

GPS location: 33.67619789331771, -117.68029382324094 MapBox GL JS screenshot: Google Maps screenshot: What could explain this? It should be noted that, for the places I actually know in real life, ...
Castruita's user avatar
1 vote
0 answers
1k views

Trimming polygon based on its intersection with another polygon using shapely [closed]

I have two polygons intersecting with one another (x1 and x2). How can i trim x2 by the area it intersects with x1, such that x1 and x2 no longer overlap and x1 area/shape remains constant. from ...
The Oracle's user avatar
3 votes
1 answer
247 views

Creating field with difference between areas of two layers in QGIS

In QGIS how can I get the difference between the areas of two layers through field calculator? And is there a way to automatize it so every time a new feature is added the difference updates? Layer 1 ...
Felippe M.'s user avatar
  • 1,092
7 votes
0 answers
346 views

Increase tolerance of QGIS processing tools

I have 2 line layers in QGIS 3.22.0 and I create a 10cm-buffer around line layer A (red) perform a difference of line layer B (blue) with the buffer of layer A (light red) As a result I get 1 ...
Enzo Baldini's user avatar
  • 2,347
5 votes
1 answer
694 views

ST_difference resulting in multiple overlapping polygons and no difference

I have a dataset with two layers of polygons: Layer A: Areas of interest from the corine land cover inventory dataset Layer B: Road network resulting from buffered linestrings that were aggregated by ...
nicobuelk's user avatar
0 votes
0 answers
129 views

QGIS - clip buffered areas based on field value

I have several irregular, adjacent polygons which I first need to buffer, and then remove overlapping areas based on a field value. This is where I start: irregular polygons with the relevant field ...
Erik's user avatar
  • 16.5k
1 vote
0 answers
360 views

Google Earth Engine subtraction (difference) of two geometries

I am trying to create a feature collection containing the difference (subtraction) between a larger geometry (e.g. the state of California) and a few smaller geometries within the larger area (e.g. a ...
Mohamad's user avatar
  • 113
0 votes
1 answer
239 views

QGIS 3.18 difference doesn't work with points as the input layer

I am trying to run the difference algorithm with points as the input layer and a polygon as the overlay layer. I've tried many different point layers and polygon layers and it keeps giving me the ...
brink's user avatar
  • 820
0 votes
3 answers
505 views

Deleting sliver parts of single polygon using QGIS

The polygon highlighted in red is a single polygon that has slivers directly attached to it. I used the Difference tool on two polygon layers which lead to slivers / fuzzy polygon parts (see picture). ...
Homerun_'s user avatar
  • 125
1 vote
2 answers
382 views

"Difference failed" error when using difference tool with point layers as input and overlay in QGIS

Is it possible in QGIS 3.16 to use the geoprocessing tool "Difference" with point layers as input and overlay? The documentation seems to indicate that it is. However, when I do a test with ...
Aquamarine's user avatar
  • 1,276
1 vote
1 answer
80 views

Diffing many geometries from single area

Using the JTS library, I create a square Geometry representing water and diff from it large numbers of geometries representing land. At high zooms (think, Scandinavia), this can take a long time. Most ...
ChaimKut's user avatar
  • 155
2 votes
1 answer
325 views

Difference tool failing for QGIS map layers

I had tried to run the "Difference algorithm" on two layers. However, the process constantly fails with a message: GEOS geoprocessing error: difference failed". When I tried running ...
Grubbmeister's user avatar
6 votes
1 answer
208 views

Getting the 'composite' of two polygon layers

I have two table of polygons, and I want to 'flatten' them into one table, and have the result tell me which areas are in one table of polygons, which in the other table of polygons, and which are in ...
TheRealJimShady's user avatar
1 vote
1 answer
2k views

QGIS Difference Algorithm: multilinestring won't work with multipolygon layer

I am working with two vector layers in QGIS (location: Indonesia). I want to 'subtract' the area of layer 1 ('Forest_buffer') of layer 2 (Scenario_1). I am using the Difference algorithm. Layer 2 is ...
Femke Pragt's user avatar
2 votes
1 answer
361 views

Compare two layers and find the percentage of the shared areas that are different between them

I have two shapefiles that identify flood zones for the same general area but in different years. The maps, however, do not cover exactly the same geographical areas (e.g., shapefile 1 covers counties ...
flucoe's user avatar
  • 301
1 vote
0 answers
153 views

PostGIS - ST_Difference creates extra line segment

I have some line of sights from one point, collected into a multilinestring. I want to cut the multilinestring using PostGIS' ST_Difference and a border-dataset (a single multipolygon). I used this ...
Jonas Olsen's user avatar
4 votes
1 answer
1k views

Using PostGIS to find the overall difference between two (large) polygon datasets

I need to get the Difference of an input layer with ~30k polygons and an overlay layer with ~500k polygons (of which ~200k intersect the input layer). I am trying to learn PostGIS to do this, as it ...
MDB's user avatar
  • 175
2 votes
0 answers
307 views

PostGIS: Using ST_CoveredBy (or similar) to speed up Difference on large datasets?

I need to get the Difference of a single large-area polygon (input layer) and a very numerous set of polygons (overlay layer). The overlay layer has ~500k polygons, of which ~200k intersect the input ...
MDB's user avatar
  • 175
1 vote
2 answers
289 views

QGIS v/s MapInfo - Differences in Distance Measurements

Distance calculated in different software (MapInfo and QGIS) has given me differences in distance values. To be more precise, it's mostly happening when the distance is more than 25 miles. I doubt ...
Rakesh Giri's user avatar
3 votes
1 answer
927 views

Difference tool for rasters

I am using QGIS 3.16.0 and I need to find the difference between two rasters that overlap in some areas (basically I need the areas that are not overlapped). First, I tried polygonizing the smaller ...
Paris's user avatar
  • 591
1 vote
1 answer
965 views

Select points outside of polygon in Google Earth Engine

I understand how to get the points that fall inside a polygon with GEE: // Load a feature collection and a area of interest var dataset1 = ee.FeatureCollection("link/to/any/point/dataset/on/gee&...
Momchill's user avatar
  • 294
8 votes
4 answers
6k views

GEOS geoprocessing error when using difference tool in QGIS

I am using QGIS version 3.14.0. I have about 20 polygon .shp-files with overlaps between files. All are in the same projection. I've been using the difference tool to remove the overlaps and then ...
Sam Coggins's user avatar
0 votes
0 answers
306 views

"difference" between two rasters using raster calculator QGIS

I am struggling to find the right equation to use in the raster calculator to achieve my desired result. Essentially, I have two rasters, with an overlapping portion. See img below: I want to only ...
Derek Eden's user avatar
0 votes
1 answer
727 views

QGIS difference operation with XYZ tiles

I have a regular layer from a database containing WKT polygons. I'm also using a XYZ Tiles layer of Google Maps. I would like to perform the Vector > Geoprocessing Tools > Difference operation ...
ChaimKut's user avatar
  • 155
2 votes
2 answers
652 views

Difference between two features in same polygon in QGIS

I have a polygon and some features are below another features. If I would have two different polygons I would use the "Difference" tool so it would take the overlapping feauters to the "...
Sebastian Fallas's user avatar
2 votes
1 answer
472 views

Difference in geometries of shapefiles

I have the geometry of the outline region as part of one shapefile (which is only one feature and there are other features in it apart from this). Other polygon regions' boundaries which are colored ...
hashalluring's user avatar
0 votes
2 answers
484 views

Using QGIS Difference with Point and Polygon

After installing a fresh QGIS 3.10 version on a Windows computer I recently saw an unexpected behavior of the "Difference" feature from QGIS. (on one of my old computer with QGIS 3.4 it is different) ...
Freddy's user avatar
  • 21
4 votes
1 answer
664 views

Calculate difference of two LineString

The tool I'm developing is written in Java with Spring Boot, using PostgreSQL as database (PostGIS extension). I also make use of GeoTools. I want to calculate the geometrical difference between two ...
joninx's user avatar
  • 205