New answers tagged

0

I thought I'd add my experience here. I've been working with situations where I might need to merge hundreds or thousands of polygons and the Union solution didn't quite cut it - the time to get the intersection of 1 polygon in 1 layer against a couple of hundred polygons in 1 other layer took ~15 secs. I managed to cut it down to 0.08ms by adding each ...


1

I use the following code to find the intersection between two networks as polylines, I turn them in GeoJSON and then calculate the intersections with turf, iterating every feature of the collection. var map = L.map('map').setView([37.501010429493284, 85.80322265625], 7); ...


2

but this is will not provide me the order and how many times municipalities are crossed. Assuming every row in Rivers table is a linestring with an entire river. Here's a query that will get you how many municipalities are crossed, the subquery t , will get you all the municipalities that each river crosses but yes they will not be in any guaranteed ...


3

I would use Spatial Join GP tool for this. Target features: study areas (green solid polys); Join features: tracts (red color) Choose JOIN_ONE_TO_MANY. All other options - default. This is what you will get: Study area 3 (TARGET_FID field) intersects tracts 9 and 36 (JOIN_FID field). Study area 4 doesn't intersect any, hence JOIN_FID = -1. In case ...


1

Perhaps a bit late to the party, but for future reference: a simple Spatial Join will do the trick. Define a Merge rule to the concatenate the IDs of multiple features into a single field. Target features: Polyline layer Join features: Polygon layer Join type: One-to-One Field map: right-click a textual ID field of your Polygon layer and set Merge rule ...


2

Not sure if this is what you're looking for, but if you use the Marker line Symbol layer type, you can set marker placement and rotation: The rotation field can be set by expression or field, and is relative to the angle of the line. Please let me know if I've misinterpreted your question


5

I do not understand why beginners try to start with the GDAL/OGR Python bindings (not very "Pythonic" and difficult) when other easier alternatives are available. With your script, you need to know osgeo.ogr and the SQL dialect of SQLite. The solution proposed by Mike T is powerful but not "classic" and performs only the intersection of shapefiles. What ...


0

This may not be the fastest solution... But I usually just cheat by joining all the features of the other table. Create table blah as select d.* from data_i_want d, (select st_union(geom) geom from not_in_here) n where st_disjoint(d.geom,n.geom); Nice and snappy if the not_in_here table isn't that complex.



Top 50 recent answers are included