Hot answers tagged

9

Super easy manual process. You use the tool Select by Location. Select points in B that match A Export your selection in B to a new layer C "Switch" the selection in B. You now have selected all the points in B that are not in A. You can Append the selection in B to the layer C. You then do the opposite; Select points in A that match B. "Switch" the ...


4

At the scale of your display, these lines appear to be coincident, but in reality they're not: I've exaggerated the difference between the two lines using the "Magnify Topology" tool in JTS TestBuilder, which I highly recommend for looking into cases like this. Depending on the goal of your analysis, it might be suitable to snap your vertices to a grid ...


3

I emphasize that this function might not be useful for everyone. It will depend on what you're trying to do, and your inputs, and how possible it is to do what you're trying to do given your inputs. For instance, if you have a complicated shape with concave sides, forget about it. In my case, I just wanted to cut a box filled with random points down to a ...


3

You may use the Intersect tool and define POINT as output type. Computes a geometric intersection of the input features. Features or portions of features which overlap in all layers and/or feature classes will be written to the output feature class. output type: POINT - Point intersections will be returned. If the inputs are line or polygon, ...


3

What is strange if the intersection result is a point ? The intersect predicate is Returns True if the boundary and interior of the object intersect in any way with those of the other. With a common point between the geometries, the intersects predicate returns TRUE because the boundary of the first geometry intersects the boundary of the second ...


3

I think you need to use clip not intersect from vector -> geoprocessing to clip your data to the specific boundary.


2

There is another method that you can do : Before you do, Make a backup of your layer in case if it becomes corrupt. You should be able to do the following: If you are doing a few then do this: Start Editing. Click on the Attributes Use the "Edit Tool " Drag over all of the points or a point. On the Attributes, See if there are two overlaps. If you see two ...


2

You can do a Selection by Location. If the points are in the exact same spot, setting your tolerance to zero would only give you results on top of each other. If they are approximate, you will need to adjust that tolerance to figure out which ones are duplicates. You can then either delete the duplicates and use that layer or take the unique points from each ...


2

Similar to what Zoltan has said, but you want to group by the color, which will then get you the sums for each color. SELECT sum(ST_Area(ST_Intersection(grid.geom, affected.geom))), grid.color FROM grid, affected WHERE ST_Intersects(grid.geom, affected.geom) GROUP BY grid.color; The final WHERE ST_Intersects(...) will not affect the answer, ...


2

SELECT sum(st_area(st_intersection(grid.geom, affected.geom))) FROM grid, affected WHERE grid.color = 'green' and st_instersects(grid.geom, affected.geom);


2

Sorry I didn't realize the errors were in your image. The approaches that you have tried are correct, you just have an issue with the data. Try removing the m-values from whichever dataset is m-aware. While you're going through this process, I'd make the outputs the same projection/crs just to be safe. I always feel more comfortable with these types of ...


2

A newer version of ArcGIS solves the overlapping zones problem: https://blogs.esri.com/esri/arcgis/2013/11/26/new-spatial-analyst-supplemental-tools-v1-3/


1

You just need to loop over the combinations you need. > combn(1:length(Sl),2) [,1] [,2] [,3] [1,] 1 1 2 [2,] 2 3 3 that gets you (in columns) the line indexes. So then do: MyLines = apply(combn(1:length(Sl),2),2, function(x){ gIntersection(Sl[x[1]], Sl[x[2]]) }) Then MyLines[[1]] is the ...


1

To provide a summary and answer to the issues here: Clip instead of intersect is the correct geoprocessing tool; The QGIS Voronoi tool introduced quite a few imperfections in the polygons produced, and this seems to be the culprit for the later geoprocessing not working as planned; I tried to clean up the Voronoi polygons produced in QGIS, but I found the ...


1

just tested it with my own data. UK boundary plus active GNSS stations voronoi, and I can confirm the intersection is working in my Qgis, however if I manually create a topology error in my boundaries the intersection query will work just partly. Run the topology checker maybe you can see any errors.


1

Not a proper answer but does not fit into the comment box. However, at least PostGIS does return a point for two polygons which touch at one point. SELECT ST_AsText( ST_Intersection(ST_GeomFromText( 'POLYGON (( 140 360, 140 480, 220 480, 220 360, 140 360 ))'), ST_GeomFromText( 'POLYGON (( 220 260, 220 360, 300 360, 300 260, 220 260 ))'))); ...



Only top voted, non community-wiki answers of a minimum length are eligible