# Tag Info

Accepted

### Assigning z values to depth curves in QGIS

It's super-easy in QGIS 3.0: Run the "Set Z Value" Processing algorithm Click the button on the right of "Z Value", and select Field -> "DYBDE". Run the algorithm. The z values for the geometry's ...
• 27.7k
Accepted

### Z value is lost when converting QgsGeometry to PointZ with PyQGIS

What you want is: p = QgsPoint(1,2,3) print(p) #<QgsPoint: PointZ (1 2 3)> g = QgsGeometry(p) print(g) #<QgsGeometry: PointZ (1 2 3)> p2 = g.constGet() print(p2) #<QgsPoint: PointZ (1 ...
• 3,855

### QGIS: use geometry from different layer in symbology expression

Your question is very similar to what I've done here recently. I used expression: if( within(\$geometry,geometry(get_feature(layer,attribute,value))), result_when_true, result_when_false ) In your ...
• 1,070
Accepted

### Calculating real length and slope of roads

The built-in \$length function will only get you the 'horizontal' length along the line, not the true length allowing for the slope. To calculate this: Take your vector layer you created using 'Points ...
• 671

### Adding z-value attribute to lines

You can use the Field Calculator to create a new elevation field, using a way similar to the point layer. The operation will give you a punctual information extract from the raster. In the line ...
• 3,868
Accepted

### Creating and reading z values (coordinates) with pyshp?

If you examine GeospatialPython.com: Working with Elevation Values in Shapefiles (the blog of Joel Lawhead, creator of the Pyshp module) When you read 3D shapefiles the elevation values will be ...
• 55.1k
Accepted

### Projecting raster z-values from foot to meters?

When you project a raster from a coordinate system with a linear unit in feet to one with a linear unit in meters, it only changes the x and y units, not z. If you are working in ArcGIS and have the ...
• 192

### Difference between two Z-values extracted using "Extract -Z values" tool in QGIS 3

Short answer: Q3 in the field names is just a output column prefix you specified. So, Q3first is z-value of the first point of the line/polygon. Q3q3 is the third quartile of the all z values of ...
• 77.2k
Accepted

### Using Z-Values instead of attribute Z?

I think you are mixing up to concept : elevation (z value) and height (elevation relative to the ground). For exemple an object may have a Z value (as a z coordinate) representing elevation of the ...
• 16.4k
Accepted

### Create cross section from 3D Polyline in QGIS

Result, visulized in 3D map view (red lines), based on your sample data: How to achieve this: Split the lines where 3D Line and Cross_section_to_generate intersect. Use Menu Processing > Toolbox &...
• 72.2k
Accepted

### Adding z value vertices from a point layer to a line in QGIS

You can get Z-values directly from your raster using Menu Processing / Toolbox / Drape (set z value from raster). This will output a new line layer: a copy of your initial line with z-Values for each ...
• 72.2k
Accepted

### Buffering with consideration of both distance and height using QGIS

Solution: basic idea Create a grid within 50 m from every point and check for each cell if its elevation is within the range of +/- 5 m from the elevation of the point. Step-by-step guide on how to ...
• 72.2k
Accepted

### Deleting duplicate points by attribute in shapefile using QGIS

Use Select by expression with the following expression, then use Extract Selected Features. Explanation: The expression uses overlay_nearest() with a very small distance (tolerance value) to get an ...
• 72.2k
Accepted

### How to auto-update field on geometryChanged() signal?

This is a simplified example. You can of course add the QMessageBox functionality back in, if you wish. p = QgsProject.instance() lyr = p.mapLayersByName('points')[0] # change for the name ...
• 17.4k

### How to auto-update field on geometryChanged() signal?

As much as I love using pyqgis, here is another option. You can set a default value for your Z field, and use the raster_value function in an expression to sample the elevation from the DEM raster. ...
• 21.8k

### Interpolating Z at polyline vertices between known Zs

Z-values can be added to the vertices of lines by an operation called drape. This is normally done from a raster. Thus we have to get a raster, containing the interpolated z-values. What is a bit ...
• 72.2k
Accepted

### Cannot solely remove M value of Shapefiles

Shapefiles with Z contain also always M. See the technical specification of PointZ from https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf. Same applies to other geometry types with Z. A ...
• 66.8k
Accepted

### Move points to a Z-value?

Drape them onto the DEM: Drape (set Z value from raster) This algorithm sets the z value of every vertex in the feature geometry to a value sampled from a band within a raster layer.
• 74.3k

### Elevate points from imported DXF file to heights in LAS databse

You cannot modify a DXF with ArcGIS. If you import it to a GDB, you can then use Add Surface Information to assign the LAS dataset's elevation to your features.
• 9,684
Accepted

### Z-value Error in ArcGIS Collector

It looks like you can set a default value for the z values through the admin API which might resolve your issue. Check out this support link http://support.esri.com/en/technical-article/000014234
• 2,503

### Assigning attributes values to PointZM and convert to LineZM Geometries in QGIS?

There are multiple ways to get to your LINESTRINGZMs. Two of those are: ogr2ogr (not in QGIS) Since I find it most straight forward here, I suggest a one-step solution using ogr2ogr, hoping that you ...
• 30.3k
Accepted

### How to get z coordinate of a point using pyqgis

with QGIS 2.X, you can access to GeometryV2 by doing something like this: geometryV2 = feature.geometry().geometry() It's not really straight forward... but it's the way to do it with QGIS 2.X then ...
• 2,895

### Dropping z-value from geometry and transfering it to new field

Extract Z values which "Extracts z values from geometries into feature attributes." Right-click the layer - Export - Save Features As and untick "Include z-dimension"
• 74.3k
Accepted

### Adding z-value to the triangulation output from the TIN interpolation in QGIS

You have points with z values and also lines that have z value (based on the points as vertices). You want lines with z values but with more vertices more points with z data. First solution : the ...
• 3,048
Accepted

### Adding Z-dimension point to layer

Try replacing "Point?crs=" with: "PointZ?crs="
• 74.3k

### Using Set Z-Values in QGIS Processing Modeler

If you know the name of the field, you can use an expression with the field name set as default, just select edit, and you'll get an expression builder window. Otherwise, you can use a pre calculated ...
• 3,485
Accepted

### QGIS Drape (set Z value from raster) to set Z-value along all pixels under a geometry (not only vertices)

You can: Buffer the line with a small distance, like the pixel size*2 Clip the raster with the buffer Raster pixel to points Shortest line between features, points as source, input line layer as ...
• 74.3k
1 vote

### set z-value from table

In case your lines are two vertice segments, this simply translates into UPDATE <table> SET geom = ST_SetSRID( ST_MakeLine( ST_MakePoint( ...
• 30.3k
1 vote

### Cannot read pixel value from DTM raster with QGIS

I think it is because you use WMS layer which can be served like a tiled image - not "real" DTM. Why not to use SRTM or EU-DEM? SRTM http://dwtkns.com/srtm30m/ EU-DEM https://www.eea.europa.eu/data-...
• 1,738
1 vote

### Cannot read pixel value from DTM raster with QGIS

I believe the reason you cannot access the values from this DTM is because it is being served as a WMS, which QGIS is unable to obtain data from. Sometimes some WMS work as WFS if this one does, the ...

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