Tag Info

New answers tagged

2

I don't think using Intersect is a good idea as you only have uploaded 1 point file. If you had a line layer with the roads involved, you could very easily intersect the buffers with the roads. An alternative may be to use a Query (Layer > Query...) to filter out the buffers you desire based on the Severity Index. Use something like: "VL_GRAVIDA" >= 20 ...


3

While I'm a big user of both shapely and fiona, I wouldn't go this approach. This is a task of writing an effective SQL statement. Using ogr2ogr with an SQLITE dialect, you can process this from a command line. Change directory to one before the shapefiles, so that all of the shapefiles are in one directory called data. OGR treats directories of shapefiles ...


2

Some issues in your code: you only use correctly one table as input whereas, you should use both input bufSHP and ctSHP you want to make an intersection between a list of shape and a filename with shapes.intersection(ctSHP) whereas you have to do an intersection between two shape elements See below a possibility, I choose to use Rtree to optimize, ...


1

I think you are going to have to break (as a node) the road at the polygon edges to do this in vector space. 1) Use Identity Tool in ArcGIS and this should do the trick. Just option that is something like Just ID Remember to recalculate lengths in the attribute table after the identity (just to be sure) It will add the polygon details (in this case thee ...


1

There are a couple of options. Option 1 You could do the query exactly like you have it, then add your linestring using GeoJSON on the client. You'd use CartoDB.js to draw you polygon layer and then use Leaflet to add the GeoJSON layer on top. Option 2 Use a multilayer visualization. The bottom layer you could have as you polygons (styled accordingly. ...


0

The Microsoft Developer Network help docs seem promising. Here is an example from the help on to test for intersection: DECLARE @geom1 geometry; DECLARE @geom2 geometry; DECLARE @result geometry; SELECT @geom1 = GeomCol1 FROM SpatialTable WHERE id = 1; SELECT @geom2 = GeomCol1 FROM SpatialTable WHERE id = 2; SELECT @result = @geom1.STIntersection(@geom2); ...


2

You need to think in terms of analytic geometry or vector geometry: I illustrate the approach with the first example (same with the others) with PyQGIS here but you can also use Shapely. You need to create a segment in the direction of line1 and calculate the point of intersection with line2. 1) Find the azimuth of line1 (How do I find vector line bearing ...


1

I can't give you python code (haven't used it for a while), but I hope that I can help you with a logic. To clarify: "Line" extends in both directions infinitely. If it does have ends it is called a "Line Segment". You will need to write 2 simple functions (I can post source code in Java if you need it): intersectionOfTwoLines(line1StartPoint, ...


0

A workaround would be to re-add the attributes after doing the clip, while converting from SpatialPolygons to SpatialPolygonsDataFrame. clip = gDifference(spdf1,spdf2, byid=TRUE) row.names(clip) = c("p1","p2") spdf3 <-SpatialPolygonsDataFrame(clip,data=as.data.frame(spdf1@data)) spdf3@data variable1 variable2 p1 232 235 p2 242 ...


4

There is few resolutions of this issue, maybe there are few better ones but this two should do also: 'By hand' (in steps) Cut every line with another line which intersects it Create table road_1 as Select row_number() over() as ID, input.name, (st_dump(st_split(input.geom, blade.geom))).geom as geom from roads input join roads blade ...


0

You can use PostGIS ST_NODE function or if you have PostGIS > 2.0 and want to do a cleaner job considering topology, you can follow instructions in this blog


0

For some project i had the same need. Much more than keeping the data.frame, we had to put in place further code to manage output geometry type, and proceed to some cleaning (e.g. clean geometry collections), to have some complete intersection geoprocess. In case you still need to do such a task in R, you can try the RFigisGeo package: #install RFigisGeo ...



Top 50 recent answers are included