Questions tagged [st-difference]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
175 views

Removing longest segment of linestring and rejoining segments

I am trying to remove the segment that has the longest length from a linestring and join the two group of segments that remain by the shortest segment between them. That was easy, using ST_Difference (...
2
votes
1answer
47 views

Checking if result of st_difference is empty

I am trying to select lines that completely touch a polygon (not at just a single point). I would assume it would be a simple case of st_isempty(st_difference(geom_a,geom_b)). However, this is not the ...
1
vote
0answers
45 views

Why QGIS/PostGIS makes Sliver / small polygon when using erase (difference) tool unlike ArcGIS (QGIS vs ArcMap)?

When erasing b polygon from a, sliver(or small) polygons occured along the a polygon boundary in QGIS(3.4.5). But ArcMap(10.3) does not make any slivers at all. I don't know which difference between ...
5
votes
4answers
569 views

Finding truly intersected polygons

Intro Short version: My goal is to find geometries intersected by a target polygon. To find overlaps - the most straightforward choice is to use ST_Overlaps or ST_Intersects. But this method will ...
1
vote
0answers
74 views

PostGIS ST_Difference is returning overlapped areas

I´m using this SQL sentence to obtain the difference of two layers, exactly I understood that ST_Difference does, that is, it should return polygons that don´t overlap and the not overlapped area when ...
1
vote
1answer
409 views

st_write fails for object created with st_difference using R?

Using publicly available sea area shapefiles bahamas: http://www.marineregions.org/gazetteer.php?p=details&id=8404 ("eez.zip") watl: http://www.marineregions.org/gazetteer.php?p=details&id=...
2
votes
1answer
265 views

ST_Intersection + ST_Difference + not overlapping Polygons

I have a PostGIS table with some overlapping polygon and need a PostGIS view where no polygon is overlapping and the data is aggregated (like in the picture). With a Union of ST_Intersection() and ...
1
vote
0answers
38 views

Select features of a shape which are not in another shape

I have a shape with some features (let's say 100) and a second shape with some of this features (50) buffered (5 meters inside buffer). I want to select and write in a new shape every feature of the ...
3
votes
2answers
413 views

Find what polygons are not fully covered by union of polygons from another layer in PostGIS

I have two tables in a PostGIS database >>> select postgis_version(); "2.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1" One represents the country borders and another one is administrative ...
6
votes
0answers
1k 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 ...
1
vote
0answers
65 views

Uploading overlapping contours into PostgreSQL?

I've got 100+ shapefiles of contours with the following fields: class (text) altitude (double) geom (geometry) And I need to upload them into a single table in PostgreSQL. Now, I've managed to ...
1
vote
1answer
224 views

st_difference (erase overlapped feature) line from polygon

I have two layers. One is MultiLineString and the other is MultiPolygon. I am trying to erase lines that are on the polygon feature With QGIS difference tool, it worked just fine This is my code and ...
0
votes
3answers
814 views

Increase spatial query performance (st_difference)

I have two link tables one is 9029 rows (and let's say this table is A) and the other is 11698 rows (and this table is B) the both tables are road link and A is for tunnel link and B is road link ...
1
vote
0answers
186 views

ESRI Polygon cutouts (neg. space) become multiple layers in PostGIS

I have a single MULTIPOLYGON from ESRI ArcGIS with 10,000+ sub-polygons in a Shapefile, some having > 1.4 million vertices. I'm importing the data into PostGIS (ogr2ogr or shp2pgsql, same results) so ...
2
votes
1answer
193 views

Bringing two lines together and getting their difference

In the photo there are two lines that are parallel to each other. I want to bring them at same coordinates and carry out the difference between them, which will be the small part of red line from the ...
4
votes
0answers
91 views

ST_Difference() PostGIS returns weird results [duplicate]

I'm trying to use the postgis's st_difference() function, but with no luck. I have a layer of polygons A And a layer of Polygons B What I want to achieve is this (created with QGIS algorithm): ...