Import DEM points in Rhino (formerly: CSV is oddly scaled)

Today, I have exported a point file from Qgis, which matches the pixels of a Digital Elevation Model (DEM) of a terrain.


The red line is the bounding box for the points and is approximately 1127m x 791m.
Yet Rhino imports it completely off-scale, it is elongated on the Y axis, as the extents are 1127mm x 893375mm. So apart from the meter to millimeter conversion it also changes the values in Y.

The CSV file looks as follows (X,Y,Z).

What is going wrong here?

E: This also happened when importing the data as GeoJSON using Grasshopper.

It’s been a long time since I worked with these things, but IIRC, the problem is in the projections chosen in QGIS. With the different types of spherical projections, distances (x,y) are measured in earth diameter arc-seconds and not in linear meters. The height is in meters. If you don’t get the input/output projections correct, the results can look like a line. For me it was interpreting the arc-seconds as meters, but your problem may be different.

1 Like

The weird thing is, if I use polygons and other vector information, the result is correctly exported to DXF. And I have been using the same CRS (projection system) throughout the project.

OK, I don’t know then, as I said, it’s been a long time, and I was never a QGIS expert. I find it unlikely that Rhino is misinterpreting the CSV though, unless it is somehow not formatted correctly. Check the data in the Y-column, in the image you posted of the CSV they all have the exact same value…

It is strange that the issue is just on one axis though. They are sorted on the X-axis, so the Y dimension doesn’t change for the next 791 points :wink:
Thanks for the help!

I’ll be trying a DXF export then, since that has been working fine.

Yes, but what does it do after 791? Does the Y value change? By how much? The X point values appear to be in 1 meter increments, after point 791, does the Y also change by 1 meter? (these things are normally square grids)

The changes in the Z values between points also seem to be very small (only about 3 cm total in the ones I can see in the image)…

1 Like

The Y-value changes are also in 1 meter increments. Z-values differ by about 30 meters in Qgis, so 3 centimeters should be 0.3 meters (needs to be scaled by 1000x on import), but it depends on the area, it is partially flat, partially a steep hill.

I guess I need to translate the points and get rid of the FID for DXF export to work.
E: Just export to DXF, now the extents are fine, didn’t propagate the Z-value yet, despite translating, but am close to fixing this.

Solultion:
Use the “Raster value to points” algorithm to create the points, then the “Drape (set Z-value from raster)” processing algorithm > export as DXF and the points will end up where they are supposed to in Rhino.
Optionally, use Saga’s “Add raster value to points” to colour the points with as gradient before importing into Rhino.

Although, the CSV did look correct with regards to incrementing by 1m after every grid column/ row, for some reason it was not correctly placed in Rhino.