Hot answers tagged

14 votes
Accepted

Visualize PolygonZ shapefiles in QGIS

You don't need any plugin to see PolygonZ shapefile in 3D. Built-in 3D Map Viewer ("View > New 3D Map View") shows polygons in 3D based on Z values of its vertices. Note that 3D view ...
Kadir Şahbaz's user avatar
13 votes

Finding minimum-area-rectangle for given points?

I just implemented this myself and posted my answer over on StackOverflow, but I figured I'd drop my version here for others to view: import numpy as np from scipy.spatial import ConvexHull def ...
JesseBuesking's user avatar
13 votes
Accepted

Remove 3D geometry in shapefile using OGR

Write your data into a new shapefile with ogr2ogr and force geometry type into 2D with the -dim switch. ogr2ogr -f "ESRI Shapefile" output_2d.shp input_zm.shp -dim 2 The -dim setting is not limited ...
user30184's user avatar
  • 61.9k
13 votes
Accepted

Assign 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 ...
ndawson's user avatar
  • 27.3k
13 votes
Accepted

Convert GPS coordinates into 3-dimensional cartesian coordinates (x,y,z)

To do 3D transformations, you need 3D CRS: EPSG:4326 (2D) -> EPSG:4979 (3D) <Geographic 3D CRS: EPSG:4979> Name: WGS 84 Axis Info [ellipsoidal]: - Lat[north]: Geodetic latitude (degree) - ...
snowman2's user avatar
  • 7,141
11 votes
Accepted

Generating STL (3D) file from raster ASTER GDEM data?

I know QGIS has a plugin that export DEM to STL using DEMto3D, and I tested on a DEM and it worked. The description of the plugin mentioned that clearly: DEMto3D is the first tool that links GIS (...
ahmadhanb's user avatar
  • 40.3k
10 votes
Accepted

Changing layer properties for 3D View using PyQGIS

You should use setRenderer3D method of QgsMapLayer. layer.setRenderer3D(renderer) QgsVectorLayer inherits that method from QgsMapLayer.
Kadir Şahbaz's user avatar
9 votes

Convert 3D WKT to 2D Shapely Geometry

A simple approach is to use shapely.ops.transform, because that function is smart about using the return values to determine whether to create 2D or 3D shapes. This approach will however allocate new ...
Gijs's user avatar
  • 191
8 votes

Convert 3D WKT to 2D Shapely Geometry

I had the exact same problem as Rusty Magoo, but for multipolygons and polygons. Therefore I decided to build on answer of gene and wrote the following function, which works for all types of ...
Rauni's user avatar
  • 344
8 votes
Accepted

Creating 3D points in PyQGIS?

For QGIS v3.x You can use QgsPoint directly: zPoint = QgsPoint(-74, 4, 2600) # x, y, z zPoint.z() # Prints 2600.0 Should you need a QgsGeometry object, just use: my_geom = QgsGeometry(QgsPoint(-74, ...
Germán Carrillo's user avatar
7 votes

Importing 3D DXF file into QGIS with z information as attribute value?

Miro's answer will work fine, but if you just want to add a Z value to your attributes table (perhaps for labeling in a map or some other reason), I would start as he suggests: v.in.dxf - to import ...
MappaGnosis's user avatar
  • 33.6k
7 votes

Creating 3D model in QGIS?

QGIS 3.0 will support rendering of 3D models out of the box. Install the latest nightly build of QGIS using OSGEO4W or another installer for your platform. Add 3D Canvas from main menu View > New ...
Peter Petrik's user avatar
  • 1,345
7 votes

Cesium JS Line Length

You could use Cesium.EllipsoidGeodesic#surfaceDistance to calculate the distance in meters, and then convert to kilometers. var startCartesian3Point = Cesium.Cartesian3.fromDegrees(48.862165, 2....
Kaji's user avatar
  • 81
7 votes
Accepted

Conversion from Point 2D to Point 3D with measures

You can alter the type and use, what I believe are called regclasses, to specify the type of geometry (and its SRID). So, assuming your table is called points, you can do, ALTER TABLE points ALTER ...
John Powell's user avatar
  • 13.6k
7 votes

Create paper topography anaglyph map that can be visualized in 3D using red-green glasses

what you're talking about is an anaglyph map. it's possible using standard QGIS symbology here's an example I did a while back. The buildings were given a size attribute (probably using $area) ...
Steven Kay's user avatar
  • 20.2k
7 votes

Visualize PolygonZ shapefiles in QGIS

It seems that PolygonZ doesn't work in Qgis 3D view but working pretty nice in qgis2threejs plugin for me: Just make sure that your shape is a real PolygonZ file.
Felis Pimeja's user avatar
7 votes
Accepted

French point cloud data won't render properly in QGIS 3.22.3

In reality QGIS does not read the las/laz files directly. The number of points is too huge for this. When you load a las/laz file, QGIS converts it into entwine format using, a specific utility (hence ...
Atm's user avatar
  • 1,379
6 votes

How to find the concave hull for a cloud of points in 3D space?

A convex hull is unique, whereas there are many possible concave hulls. So you cannot say "the concave hull" but "a concave hull". There is possibly a minimal volume concave hull, but this is not the ...
galinette's user avatar
  • 161
6 votes

Can QGIS import Multipatch geometry type?

In QGIS try using GDAL/OGR to read shapefiles and in GDAL: ESRI Shapefile MultiPatch files are read and each patch geometry is turned into a multi-polygon representation with one polygon per ...
gene's user avatar
  • 54.2k
6 votes
Accepted

GeoJSON: PolyhedralSurface geometry type not supported

Well if you want to have just top and bottom, ST_Extrude is overkill. You can just use a combination of ST_Force3D(ST_Translate(..) http://postgis.net/docs/manual-2.2/ST_Force_3D.html , http://...
LR1234567's user avatar
  • 10.3k
6 votes
Accepted

How to create a 3D shapefile with QGIS from values stored in the attribute table

I guess if you have None as a value for the v.extrude command, it's because your data is not in the right format (string instead of real for example). See below, it works for me : In case you need, ...
gisnside's user avatar
  • 7,768
5 votes
Accepted

Contour lines with imported shapefile using Blender GIS - wrong Z values

Solved! I've e-mailed the developer (Dominique Lyszczarz), and sent him the SHP. Turned out it was a bug in the add on. He corrected it and now it's working fine! I've added some images to ...
Marcos Saito's user avatar
5 votes
Accepted

Cesium JS Line Length

So, there is a Cartesian3.distance function, however, the answer here is not as simple as just calling this on all the pairs of points in positions. The problem is the line in your example has ...
emackey's user avatar
  • 1,464
5 votes
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 ...
J.R's user avatar
  • 14.5k
5 votes

Can we create 3D buffers around point data in QGIS?

While I am not aware of a plugin which creates spheres (even if it should not be too difficoult to write), I would suggest you investigate a different, possibly more elegant route. Instead of creating ...
RafDouglas C. Tommasi's user avatar
4 votes

3D subsurface modelling

Geomodelr might be what you are looking for. Geomodelr allows you to create cross sections from boreholes, or use geophysical data in the form of images. For geophysicists it's particularly cool ...
Ricardo Serrano's user avatar
4 votes

Finding minimum-area-rectangle for given points?

Thanks @whuber's answer. It is a great solution, but slow for big point cloud. I found convhulln function in R package geometry is much faster (138 s vs 0.03 s for 200000 points). I pasted my codes ...
Bangyou's user avatar
  • 279
4 votes

Features to 3D from 2D in QGIS

I am using the QGIS 2.14 in portuguese, but I'll try to show you the steps with pics bellow. 1- Click in save as 2- On the "save window" choose the option "inclui dimensao-z" in english is equal to ...
Guilherme Gandra Franco's user avatar
4 votes

Viewing LiDAR data from web browser?

plas.io is pretty nice and very easy to get going quickly. I presume the performance to be dependent on the client's ram and cpu. I had no trouble with ~350mb raw .las file in Firefox. .laz files will ...
4 votes

Why is my DEM in ArcScene flat, not 3D?

A DEM is simply a grid of values representing elevation. To visualize the elevation in "3D" in ArcScene, right-click the DEM layer and go to properties. Under the Base Heights tab, select the "...
Barbarossa's user avatar
  • 5,787

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