Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

6

I don't think there is a plugin for that. But with a little sql, you can calculate it. If predecessor is defined by their id, then you can execute following code in the databasemanager: select a. id, b. id predecessor, st_distance(a.geometry, b.geometry) distance from fictief_point a left join fictief_point b on a.id-1 = b.id Go to Database > DB ...


4

When creating line objects the Advanced Digitizing window shows you distance (d), angle (a), x coordinate and y coordinate. To use it, switch on both the Advanced Digitizing panel and toolbar and click the icon for 'Enable advanced digitizing tools' when you are editing


3

I don't think that's possible unfortunately. What you could do is create a scratch layer with line-type geometry and create a new feature with Advanced Digitizing turned on. This will allow you to draw horizontal and vertical lines and will display the distance as well. Not exactly what you're looking for but probably the closest to it.


3

In ArcGIS, you can also set the units in the measure tool by clicking on the ∑ (sigma) on the measure tool dialog: However, this doesn't give you an option for decimal degrees. The only way that I was able to measure in decimal degrees after changing to meters was to set the coordinate system and display units, save the map, exit and reopen the map. ...


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

You can restart the interface: Configuration > system > restart interface. https://docs.qgis.org/2.18/en/docs/user_manual/introduction/qgis_configuration.html


2

When I do a right-click on the toolbar and check/uncheck the Attributes layer, it is working


2

QGIS 3 uses ellipsoid length calculations by default whereas in previous versions, this was ignored and instead planimetric distance calculations were used. If you measure the lines using the expression: length($geometry) You should get the values you were looking for (5000m and 2000m): Before you use your code, set your project ellipsoid measurement to ...


2

From the Project tab, select Options. In the Options window, under the Project heading, click Units Expand Distance Units and click the radio box beside which measurement option you want to default.


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 ...


1

I modified the code from gdal.VectorTranslate returns an empty file from osgeo import gdal gdal.UseExceptions() openOptions = ['ADJUST_GEOM_TYPE=NO'] srcDS = gdal.OpenEx('input2dshp.shp',open_options=openOptions) ds = gdal.VectorTranslate('output3dshp.shp', srcDS=srcDS, format = 'ESRI Shapefile', layerCreationOptions = ['SHPT=ARCM']) #Dereference and close ...


1

From a quick test it seems like you can create a new BaseUnit people and use it as you'd expect. import si.uom.NonSI; import si.uom.SI; import systems.uom.common.USCustomary; import tec.uom.se.quantity.Quantities; import tec.uom.se.unit.BaseUnit; import tec.uom.se.unit.MetricPrefix; ... BaseUnit<Dimensionless> PEOPLE = new BaseUnit<>("people");...


1

About the projection You defined an equidistant cylindrical projection. That's not bad, although it is a projection that has not been seen in the maps for a long time. In that projection (unlike the Mercator projection, which is also cylindrical), the deformation occurs in the longitudes, provided they are seen as straight lines. Coordinates in that ...


1

One method would be to make a copy of your polygons into a file-geodatabase and then convert the polygons to lines using the Polygon to Line tool. You could then use the Split Tool in the Editor toolbar to manually split the lines at the points that you want to measure from/to. As your data is in a file-geodatabase, in the attribute table there will be an ...


1

Make sure that you're applying lengthGeo to the feature's geometry, not the Leaflet layer. Say my_leaflet_line is your Leaflet polyline layer, you should do lengthGeo(my_leaflet_line.feature.geometry), not lengthGeo(my_leaflet_line). my_leaflet_line.feature.geometry is where the original GeoJSON coordinates are stored, and that's what lengthGeo is built to ...


1

The more suitable code for this purpose uses itertools python module for avoiding unnecessary repetitions in distance determinations. Distances that match the requirement (< 500) are grouped in a list for posterior mean determinations. Another list of indexes was used for verification purposes. Next code: import itertools import numpy as np layer = ...


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