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
1 vote
1 answer
51 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 ...
user avatar
2 votes
1 answer
38 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 ...
user avatar
0 votes
0 answers
24 views

Google Earth Engine Raster Difference Loop

So I'm really not able to figure out how to generate a raster difference map and iterate it through the entire image collection. I have an image collection that I added an "NDVI" band to ...
user avatar
  • 121
0 votes
2 answers
77 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, ...
user avatar
1 vote
1 answer
56 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 ...
user avatar
  • 111
1 vote
1 answer
133 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( &...
user avatar
1 vote
0 answers
66 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, ...
user avatar
1 vote
0 answers
54 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 ...
user avatar
3 votes
1 answer
48 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 ...
user avatar
  • 1,054
6 votes
0 answers
64 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 ...
user avatar
  • 1,903
4 votes
1 answer
152 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
  • 12.4k
1 vote
0 answers
96 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 ...
user avatar
  • 103
0 votes
0 answers
63 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 ...
user avatar
  • 710
0 votes
2 answers
139 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). ...
user avatar
1 vote
2 answers
144 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 ...
user avatar
1 vote
1 answer
25 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 ...
user avatar
  • 155
1 vote
1 answer
92 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 ...
user avatar
5 votes
1 answer
95 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 ...
user avatar
1 vote
0 answers
137 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 ...
user avatar
2 votes
1 answer
85 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 ...
user avatar
  • 181
1 vote
0 answers
62 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 ...
user avatar
4 votes
1 answer
319 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 ...
user avatar
  • 155
2 votes
0 answers
115 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 ...
user avatar
  • 155
1 vote
2 answers
83 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 ...
user avatar
2 votes
1 answer
69 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 ...
user avatar
  • 451
1 vote
1 answer
336 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&...
user avatar
  • 276
4 votes
3 answers
3k 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 ...
user avatar
0 votes
0 answers
138 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 ...
user avatar
0 votes
1 answer
279 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 ...
user avatar
  • 155
2 votes
2 answers
191 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 "...
user avatar
2 votes
1 answer
243 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 ...
user avatar
0 votes
1 answer
232 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) ...
user avatar
  • 21
4 votes
1 answer
305 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 ...
user avatar
1 vote
0 answers
36 views

Difference tool QGIS shows too many Differences

After running QGIS Difference Tool, I get a lot of differences, but I don't know where they are coming from. The input files are almost similar... Input Image (overlay input almost the same, but from ...
user avatar
  • 69
2 votes
1 answer
98 views

Finding differences between polygons in PostGIS

I have another redistricting question. The datasets and queries available on my GitHub, but I will include the queries here, too. I am working on two complete datasets: 1) A PLAN - composed of ...
user avatar
4 votes
1 answer
80 views

How can I process vector difference between 1 group layer and 1 polygon layer?

I have one layer group called 'left_buffer', containing 40 buffered polygon layers (name: 1,2,3,...,39,40). I want to use difference vector tool between 'left_buffer' and 'bldg' layer, but I'm getting ...
user avatar
  • 309
1 vote
0 answers
62 views

Inaccurate difference operations in GEOS

I've noticed large inaccuracies in the Django GEOS API's difference operation, see the example below. In [3]: geom1 = GEOSGeometry('{ "type": "Polygon", "coordinates": [ [ [ -19.51171875, 37....
user avatar
  • 111
2 votes
2 answers
170 views

PyQgis difference iteration

I use Qgis. I have two layers that are two circles with the same center. One larger and one smaller. I want to do the difference between the two circles BUT only if they have the same "objectid" (the ...
user avatar
  • 41
5 votes
2 answers
743 views

Doing difference between two layers in PyQGIS?

I'm developing a plugin where I would like to get some features from one layer (a), do a difference on them with the entirety of a second layer (b), and put the results into a layer I've created in ...
user avatar
  • 814
1 vote
1 answer
221 views

Quicker function than dissolve and difference

I'm on QGIS (v. 3.6) trying to create a map of Florida's hydrography using the NHD "Water Areas" shapefile. Methodology is to fix any invalid geometries in the NHD data, dissolve the layer, and then ...
user avatar
2 votes
0 answers
44 views

Algorithm "qgis:difference" returns multiple heterogeneous outputs

I use the qgis:difference algorithm but it returns multi-type outputs. Sometimes it's a QgsVectorLayer but sometimes a str such as : output_.... My question is : when the algorithm returns an empty ...
user avatar
  • 829
0 votes
1 answer
377 views

Extracting difference between two shapefiles (not symmetrical difference) using ArcGIS Desktop?

I have a shapefile with polygons that portray survey areas (Pink areas in picture below). I receive a new updated shapefile with additional survey areas, and thus new polygons (Green areas in ...
user avatar
5 votes
1 answer
3k views

Vector difference between two polygon layers by attribute

Is there a way to do a 1:1 difference between two polygon layers based on a similar attribute? The layers have the same number of features with a shared attribute. I've tried the native QGIS ...
user avatar
  • 537
8 votes
1 answer
4k views

Function in R to get difference between two sets of polygons comparable in speed to QGIS

I have two very large polygon shapefiles for which I need to calculate the difference between the two shapefiles. One is a shapefile of forest polygons, the other is a shapefile of road polygons. I ...
user avatar
  • 1,825
2 votes
0 answers
54 views

How do I select rows in an attribute table of a vector layer grid which are outside of another vector layer?

So what I am working on is accessibility analysis, I want to know how many percent of the population of a country have access to certain health services within a given driving time. For example is it ...
user avatar
  • 33
-1 votes
2 answers
753 views

Difference between two polygons in Earth Engine

I have a reservoir and its buffer (see below). I want to do the difference between the 2 so that my buffer is just a contour around the polygon. I tried the 2 following scripts but cannot get the "...
user avatar
  • 1
1 vote
1 answer
229 views

Using "Difference" geoprocessing tool on Big Data taking a very long time

I am using QGIS Bonn 3.2.3. I've recently been using the Difference function to calculate a list of points and it is taking a terribly long time. I was wondering if you could point out any obvious ...
user avatar
3 votes
1 answer
4k views

Comparing two shapefiles(layers) and display the differences in features in MapContent object in GeoTools

I am working with GeoTools libraries to implement GIS features. Here, I have two different shapefiles and I want to generate a new separate layer containing the differences between the two shape files....
user avatar
0 votes
0 answers
141 views

reverse clip (erase) for spatial point data frame (R) [duplicate]

I am trying to recreate the suggestion from this link but instead of using it on a sPolygondf, to do the same for a sPointdf. All is well, but I get an unexpected output - when I do the difference ...
user avatar
  • 276