New answers tagged

1

I don't know about the tools you mention but you can try a query like this one : select id, st_distance(poly.geometry, line.geometry) from poly, line where poly.id=line.id That should do the job ... You input the query in QGIS DB Manager : You choose Database / Database Manager / Database Manager then Virtual Layers / Qgis Layers. Adapt the query to your ...


1

Calculate Statistics on the Euc Dist raster (to populate maximum), In the Raster Calculator: "eucdistraster".maximum - "eucdistraster"


3

You're correct that this UoM is called decimal degrees, and partially correct that the value varies depending where you are on earth. One degree of latitude is always about the same width. One degree of longitude varies depending on what latitude you're at. The accepted answer to this question explains it well: Calculating longitude length in miles? The ...


0

Going to answer my question based on the reply found here. Apparently it is a bug, and the current workaround is to use: myGeod.geometry_length(np.array(shapelyObject.coords)) instead of myGeod.geometry_length(shapelyObject) Will update when a final solution is available.


3

Using your test data, this: > gDistance(sp_poly, sp_pts) [1] 3.605551 returns the distance from the polygon to the nearest point, but if you add byid=TRUE: > gDistance(sp_poly, sp_pts, byid=TRUE) 1 1 3.605551 2 5.000000 3 6.403124 4 7.810250 you get a matrix of distances - each row is one of your points. If you have more than one polygon ...


1

Create a scratch layer (line). Apply a label with this expression: 'dy = ' || to_string( y(start_point( $geometry))-y(end_point( $geometry))) || ' , dx = ' || to_string( x(start_point( $geometry))-x(end_point( $geometry))) It will look like: dy = -0.7004608294930876 , dx = -0.9370199692780339. You can change the text as you want, eg if you want it to ...


2

Here is an example code which subclasses QgsMapToolEmitPoint to create a custom map tool which should do what you want. It also implements the QgsRubberBand class to draw a temporary line on the map canvas to track your start and endpoints. You can paste this script into a new editor in the python console and click 'Run script'. You will see the cursor is ...


-1

If you are using EPSG:27700 and all you want to do is measure distances any errors will depend on the accuracy of the data. If this is OS data the errors will be very small.


1

The distance-distortion in the map projection will be independent of the software (ignoring blunders); it is instead dependent on the projection used, and is also spatially variable. Ordnance Survey National Grid is a Transverse Mercator projection chosen that the distances on the ground are identical to distances in the grid along two meridians: two lines ...


0

You could try TRACC produced by Basemap? Although the licence is expensive, it does handle road network travel times and public transport travel times.


0

You can try Openrouteservice.org, where the results are downloadable in the GeoJSON file. Afterwards, you can easily manipulate them i.e. in the interactive map builder like GoogleMyMaps. http://www.mkrgeo-blog.com/how-to-make-isochrone-map-in-google-mymaps-quickly/ Apart from Openrouteservice.org in this article, you will find another useful tool. I would ...


2

If you raster's projection unit is meter, then the output unit of the proximity raster will be meters if you specify georeferenced units. In case your raster's projection unit is not meter (e.g. is degree because it is on WGS84), you'll want to reproject your raster to another coordinate system (such as UTM, for example).


0

ValueError: Expecting input points to be (N, 2), got (1, 63) This is a problem with the 'shape' of your array. It suggests the code is expecting something like this.. a list of coordinates, where each coordinate is an array (or tuple) of length 2. [[x1,y1],[x2,y2], ... ,[xN,yN]] but somewhere, your code has 'flattened' the array, so it looks like this [...


2

The problem is that your pipeline diagram is a raster image rather than a vector. A human being can easily look at that image and see lines and points, but a computer can't. QGIS doesn't know where the lines and points are, so it doesn't know where you want to measure from and to. In order to use QGIS to measure the lines, you'll need to convert them into a ...


0

You should be able to use the Shortest Path (Point to Point) located in the processing toolbox. Before running the tool, make sure your lines are separate segments between each intersection ( I used the split lines with lines tool for this part). The pinkish line shown below is the result received.


3

If i understand your question correctly and those lines are two separate objects in attribute table simple $length expression in field calculator should do the trick. Edit: Great answer by CSK below. I've asked about blueprint format because i had same issues with sewer drawings few years before. Back then I came up with two partial sollutions. 1) Some ...


3

the <-> operator will use the index only if it is within the order by clause. You can rewrite your query select a.id,closest_pt.id, closest_pt.dist from tablea a CROSS JOIN LATERAL (SELECT id , a.geom <-> b.geom as dist FROM tableb b ORDER BY a.geom <-> b.geom LIMIT 1) AS closest_pt;


Top 50 recent answers are included