Tag Info

New answers tagged

-2

Any drawing app that uses co-ordinate geometry formula should allow you to simply import your images and draw over the areas of interest. Consider SketchAndCalc.com for accurate area or perimeter calculations of irregular polygons.


1

Vector solution: Intersect or Union the two layers. Both functions should be available in all three of the softwares you have tagged. Note that Intersect returns only the areas of overlap, while Union returns both areas of overlap and areas that are one layer and not the other. Hence Union will allow your results to total 100% of inputs, while Intersect may ...


1

I had a similar problem. I came to a probably strange solution to select the outlets. I took the river polyline and converted it to a raster. All river-cells got the value 1. Then I made a Cost-Distance analysis from the river mouth with the river raster as cost surface. So each point of the resulting raster represents the distance to from the cell to the ...


0

How about this (assume test is your linestring table): First nodify the linestring, e.g. create vertices at each intersection while keeping the original vertices in tact. CREATE TABLE node AS SELECT id, ST_Node(wkb_geometry) as wkb_geometry FROM test; Count all distinct points in the new linestrings. Substracting the initial number of vertices from noded ...


4

This method uses the intersect() function from the raster package. The example data I've used aren't ideal (for one thing they're in unprojected coordinates), but I think it gets the idea across. library(sp) library(raster) library(rgdal) library(rgeos) library(maptools) # Example data from raster package p1 <- shapefile(system.file("external/lux.shp", ...


0

Answer based on 3 polygon layers: Merge (Geoprocessing-Merge) all layers into single dataset, ALL_PGONS Intersect ALL_PGONS (Geoprocessing-Intersect). No SECOND layer, output INTERSECT Create new text field in the table of INTERSECT, call it LINKFLD Populate this field using field calculator (Python) using something like this (I assume you are working ...


0

This is exactly what the function raster::mask(x, mask) is for. It sets cells in x to NA when the corresponding cell in mask is NA. library(sp) library(raster) # Create some sample data r1 <- raster(nrows=40, ncols=40, xmn=0, xmx=2, ymn=0, ymx=2) r1[] <- seq(1, 100, length.out=ncell(r1)) r2 <- raster(outer(1:20,20:1), xmn=0, xmx=1, ymn=0, ymx=1) ...



Top 50 recent answers are included