Topography from Points


Hi guys,

I need to model a terrain topography from the elevations in a .csv file. The .csv contains a 1000 by 1000 array of elevations of points at 1.0m plan spacings (i.e., a million points).

The point coordinates are defined in relation to the lower-left corner, so to obtain the x/y plan coordinates I had to define two sequences. To get a column array of the z elevations I used Excel.ReadFromFile and then Flatten. At this point I now have 3 separate lists with x, y and z defined.

I then used Point.ByCoordinates to create my terrain points and Topography.ByPoints to generate the topo surface. In parallel I also used List.Create to combine x, y and z into a new list which I can export to a .csv .

Altough the graph I put together worked and I was able to generate the points it took a considerable amount of time! As for the topo surface, I pretty much gave up after 4 hours running time… Was this to be expected given the number of points I am using?

Bearing in mind that I have also generated a .csv with all the point coordinates would it be preferable to import this file to Civil3D and generate a TIN surface instead of trying to use Revit?

Can anyone give a few tips/pointers on how to speed up the process? Any help would be much appreciated.


Why dont you use the Revit way of creating a topo?



Not sure this will actually speed up considerably the calculation speed, but might help a little.

Try having the least outputs as possible. Dynamo keeps in the RAM of the computer each object you created. That means that when you flatten your lists, tranpose them (etc.) you are creating as much objects as the unique objects you have TIMES the number of time they are repeated.

Try to have the maximum of in line operations (e.g. func1(func2(func3(…))) ; or Topography.ByPoints(Point.ByCoordinates(List.Flatten(…)))).


Hi Rijsmus,

Please bear in mind that my initial data is an array of elevations only, I still need to define the x/y plan coordinates in relation to the array’s origin. I don’t have a file with the terrain contours unfortunately…


“Bearing in mind that I have also generated a .csv with all the point coordinates ???”


Thanks Mellouze, I’ll give it a go.

Just using Dynamo to create the .csv with all the coordinates was already a big help, but I reckon I’m probably better off importing the .csv file to Civil3D. Perhaps using ReCap to bring down the number of points to a more “manageable” size is worth having a go?


OK, got it. I could use the .csv and import to Revit, but would that be any faster than doing the operation from within Dynamo? From your experience are point clouds with a million points too much to handle in Revit?


1km x 1km for a topo is big.


Your best bet: Import the CSV into civil 3D and make the topo that way. Once done, translate that into Revit via the topography link capability enables by BIM360 Design and Revit 2019.1.

Other option: process the topo in small pets and weave them together. This will hopefully get the topo to process, but you may have issues with performance.