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
15
votes
3answers
1k views

Creating lines to visualize differences between polygon features in PostGIS

I've a PostGIS table polygon_b with some polygon features. There is also a table polygon_a which contains the same polygons as polygon_b but with minor changes. Now I want to create lines to visualize ...
12
votes
1answer
14k views

Distinction between Difference and Clip tools in QGIS?

What is the primary distinction between the Difference and Clip geoprocessing tools in QGIS?
10
votes
5answers
5k views

Raster diff: how to check if images have identical values?

Is there a means to check to see if any 2 given raster layers have identical content? We have a problem on our corporate shared storage volume: it's now so big that it takes over 3 days to conduct a ...
10
votes
3answers
25k views

Analyzing differences between two shapefiles to put results into new shapefile using ArcMap

I have two polygon shapefiles of the same region from two different years (1985 and 1997) and I need to analyse the differences between the two shapefiles resulting in a third polygon shapefile ...
7
votes
3answers
2k views

Can ogr2ogr “reverse clip” (or “clip out” or “erase” or “difference”) one shapefile from another?

Is there a means in ogr2ogr to "clip out" one shapefile from another? I know ogr2ogr -clipsrc B.shp out.shp A.shp will remove any part of A.shp that is NOT in B.shp. Is there an ogr2ogr command to ...
7
votes
1answer
505 views

Graphically depict statistical difference between thematic rasters

The graph shows a regression between two raster datasets with classified tree canopy cover: class 1 = 0-10%, class 2 = 10 - 20% ...class 6 = >60% (Figure 1, Figure 2). The spatial resolution for ...
6
votes
1answer
3k 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 ...
6
votes
2answers
1k views

Comparing polygon boundaries in PostGIS

I've to compare two polygon layers, 'land_use' and 'land_parcels', in PostGIS. My aim is to create linestrings, where boundaries of 'land_use' polygons do not match boundaries of 'land_parcel' ...
5
votes
2answers
2k views

Clip polygon using buffer

I'm very new to QGIS, so apologies if this is a daft question. I've been trying to resolve my problem for a couple of days and I can't get anywhere. I have searched for similar issues here on SE but ...
5
votes
2answers
436 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 ...
5
votes
2answers
536 views

How to use ST_Difference to create linestrings from non-intersecting polygon boundaries?

There are two tables with polygon features in my PostgreSQL database. I want to create linestring features where the boundries of the polygons are not intersecting. CREATE TABLE schema.poly_a ( gid ...
5
votes
1answer
1k views

Difference between lines and polygons using geopandas

I wanted to geopandas.overlay() on lines and polygons : get the geometries from the lines that are not in the polygons. I tried using geopandas for this : result = gpd.overlay(my_lines, my_polygons, ...
5
votes
1answer
613 views

Deleting sliver polygons after difference operation in QGIS?

I'm trying to find the differing polygons between two layers in QGIS. After running the difference operation, however, I get results like this: I am only interested in the solid (blue) polygons, ...
5
votes
1answer
920 views

OpenLayers rules and context, what is the difference?

OpenLayers.Style employs two properties, "rule" and "context" which accordingly contain an array of OpenLayers.Rule and a set of methods. I have noticed that "context" can somehow substitute "rule". ...
5
votes
1answer
14k views

Difference between Geographic and Projected coordinate systems?

What is the difference between a geographic coordinate system and a projected coordinate system?
4
votes
1answer
113 views

How to use the method makeDifference in the console?

I would like to do a "difference" between 2 features in PyQGIS. I don't understand how to use the method makeDifference() as shown on the documentation here. It says the parameter to pass the ...
4
votes
1answer
294 views

A python tool like GNU's diff for shapefiles?

I often use the GNU diff tool to compare two files or even two folders for differences. I was wondering if there is a Python based tool out there that does basically the same for shapefiles? In the ...
4
votes
1answer
176 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 ...
4
votes
1answer
2k 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 ...
4
votes
1answer
77 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 ...
4
votes
2answers
1k views

QGIS Difference not working?

I'm trying to simply get the Difference between two sets of lines, but the algorithm returns a copy of either one, depending of the combination of INPUT/DIFFERENCE layer I try. Never the difference. ...
3
votes
2answers
2k views

How can I eliminate leftover border/boundary in QGIS?

I am trying to generate a shapefile which contains the unincorporated areas of St. Louis County, Missouri. I'm using two shapefiles: St. Louis County from the 2012 census, followed by St. Louis ...
3
votes
1answer
84 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 ...
3
votes
1answer
120 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 ...
3
votes
1answer
866 views

Whats wrong with the difference tool QGIS 2.14.1?

I want to get the difference between two poligons. I compare the result from Arcgis erase tool and QGIS difference. ArcGIS give me that I want, but Qgis don't. Why? QGIS not only give wrong ...
3
votes
1answer
100 views

Vector differencing fails in QGIS (due to geometric errors)

I was trying to correct the country shapefile of Uzbekistan for Gas flares: Input layer (the UZB_adm1) differenced by this layer. In QGIS the result was that the overlapping regions - where the ...
3
votes
1answer
2k 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....
3
votes
2answers
89 views

Duplicated Features in point layer

I have duplicated features in point layer (Land Marks) but these duplicate has 2 cases : they might be not all have their center above each other (some have it at center , some is a bit far but its ...
2
votes
2answers
111 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 ...
2
votes
2answers
3k views

How to erase polygon from another in QGIS

I want to erase the pink polygon from the blue polygon. I've tried clip, difference, and symmetrical difference. Clip produces an empty polygon. Difference produces just another blue polygon.
2
votes
1answer
304 views

Style features based on difference between current date and date in attribute table

In QGIS >2.18, is it possible to style features based on the age gap between the current date and date recorded in the attribute table. For instance I have purchased a significant amount of OS data ...
2
votes
1answer
220 views

How to subtract lines with thickness from polygon

I have a polygon and some lines crossing it. I want to subtract the lines with a certain "thickness" from the polygon, so it splits up into various polygons which do not touch each other anymore. You ...
2
votes
1answer
2k views

Difference Between Polygon Layers

I'm trying to get the difference between two polygon layers using the QGIS difference function. These are the two files: Dropbox When I view the attribute tables of both I can see there are 3 ...
2
votes
3answers
1k 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 ...
2
votes
2answers
97 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 "...
2
votes
1answer
459 views

Count points not in polygon in QGIS (difference between points and layers give unexpected result)

I have a layer of 130 points and another layer of driving distances as 6 polygon features When I use the count points in polygons I get a running total of the number of points in each polygon feature (...
2
votes
1answer
145 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 ...
2
votes
1answer
93 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 ...
2
votes
1answer
2k views

QGIS 'Difference' tool return empty layers

I've been using QGIS's difference tool to create some new layers. All was going well until I hit a number of layers which return a blank layer with no features when I use the difference tool. The ...
2
votes
1answer
634 views

Calculating area using dissolve and merge but getting shapefiles with empty attribute tables in QGIS?

I have a shapefile of a country with the 29 provinces. I also have shapefiles with the areas which are protected from construction (there are 4 categories for protection, within 4 shapefiles. Some of ...
2
votes
1answer
59 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 ...
2
votes
0answers
71 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 ...
2
votes
0answers
36 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 ...
2
votes
0answers
49 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 ...
2
votes
0answers
609 views

Difference or Erase layer/shp from another layer using GDAL / OGR? [closed]

Gdal is known for being the fastest library for geospatial data processing. I'm using it in my python script and I'm having issues with performance on a specific task which is Erasing a layer from ...
2
votes
0answers
193 views

QGIS difference output has same number of features

Having a problem with the QGIS Difference feature. Two inputs: a point and a polygon file. I am trying to generate a list of the points that are not covered by the polygons. I am using the "use only ...
2
votes
0answers
362 views

Using QGIS Vector->Geoprocessing Tools->Difference? [duplicate]

I'm trying to use the Vector Geoprocessing Difference Tool in QGIS to "take a bite" out of one polygon using another in another layer. The tool menu Difference icon is exactly what I'm trying to do - ...
1
vote
3answers
1k views

Creating rings from existing polygons using QGIS?

I have been given a shapefile from a client that features pivots, yet they were recorded as 10 circles overlapping. The software my company uses requires that these polygons be rings that don't ...
1
vote
2answers
43 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 ...
1
vote
1answer
145 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 ...