SDF Contour Data with Elevations to Polylines with Elevations

SDF Contour Data with Elevations to Polylines with Elevations

apweng
Collaborator Collaborator
2,800 Views
8 Replies
Message 1 of 9

SDF Contour Data with Elevations to Polylines with Elevations

apweng
Collaborator
Collaborator

Hello,

 

I have a TIF DEM file that I would like to create a surface from (C3D2018).  The problem is that the TIF file is 400 million points - and much of the area is flat so I don't need all the points between the 1' contour increments.

 

I was able to use Map 3D Data Connect to TIF and extract SDF contours, but for the life of me I can't figure out how to get those contours to polylines with elevation.  This would make surface modeling for massive data sets so much better because we would eliminate the vast majority of the data in between the contours - even if we went down to 0.5' increment.

 

Any suggestions on how to convert SDF contour data with elevations to polylines with elevations would be most appreciated - thanks!

 

Andrew

0 Likes
2,801 Views
8 Replies
Replies (8)
Message 2 of 9

ChicagoLooper
Mentor
Mentor

You are better off by just adding the DEM as a definition to your surface in Toolspace.

 

Add DEM to surface as a definition in Toolspace.Add DEM to surface as a definition in Toolspace.

 

 

Chicagolooper

EESignature

0 Likes
Message 3 of 9

parkr4st
Advisor
Advisor

Like so  thanks again to Murph

 

https://map3d.wordpress.com/?s=contour

 

 

0 Likes
Message 4 of 9

ChicagoLooper
Mentor
Mentor

Thank you @parkr4st I have watched that video, several years ago, and trust me, more than once, good stuff.

 

I have some apprehension when using contours generated by AutoCAD that uses a DEM as the source file. The contours generated to sdf are not 'smooth' like you typically see in a topo map. They tend to be more angular rather than spline-like. Yeah, yeah, I know, you can easily generate sdf's from them, but just because you can, doesn't necessarily mean you should. Unlike 7-ish years ago, there are other options that are readily available besides DEMs.

 

If you want DEM or shapefile contours go >>HERE<<.  Both are readily available. Just use the interactive map to pinpoint your area of interest. You can get USGS quadrangles and lidar elevation data there too. And it's all free.

 

If I wanted as close to a realistic surface as possible without using actual field data, I go for these, not a DEM: 

  1. Shapefile contours from the Topo Map Data/Style
  2. Lidar data

The DEM generated contours doesn't give me the option to choose the elevation units. Sure the DEM will produce an sdf file for the contours but whether I select feet or meters for the elevation, it gives me the same ol' contours. For example, to get the contours expressed as feet when the native z-value of the DEM is meters, I have to apply an expression to the label (1 meter x 3.208399=feet). Keep in mind it doesn't redraw the meter-contours to feet-contours (intuition tells me it should) it merely keeps the same contour geometry and converts the label 'value' from meters to feet.  So a 1-m contour 'label' would now read 3.208399-ft. Doh? How Homer Simpson like.

 

Comparing the sdf generated contours to shapefile contours also look like a reproduction of a reproduction. Imagine your newly bought car. You want to make a duplicate key for your wife so you make a copy from your dealership provided key. Then you want to make another copy for your Dad. You take your wife's key and make a copy from hers. Next you want to make a copy for your son, for emergencies, of course, so you take your Dad's key and make a another copy. I think you see where I'm going. Instead of using your key as a 'master key' and making all 3 copies from the master, you make duplicates from duplicates, whereby the ridges of the key become less and less exact. That is what I mean regarding the sdf contours and how they look, a duplicate of a duplicate.

 

Where detail is not needed, like drawing a map for an entire county, or maybe even 1/10th of a county, DEMs are fine. You can also apply a 'theme' to a DEM (Map Task Pane>Edit the Style) and create some righteous looking mapsThat'll impress your co-workers and boss. However, for several parcels, a single parcel or possibly a fraction of a parcel, a DEM can't generate enough detail when compared to detail afforded by a shapefile or Lidar.

 

Images below demonstrate what I mean. The Blue contours were taken from Topo Map Data/Topostyle Sheet and are shapefile format. The DEM is a 1/3 arc-second in ArcGrid format which was used to generate sdf contours, they are orange. The green background is the DEM. I could give the DEM a color theme to represent elevation but I left it at default green.

 

1-You can get DEMs, shapefiles and Lidar here.1-You can get DEMs, shapefiles and Lidar here.2-Blue=elevation shapefile. the default elevation is feet.2-Blue=elevation shapefile. the default elevation is feet.3-Orange=sdf contours generated from the green DEM. Native elevation units are meters. To get feet you have to create an expression then multiply the native elevation values using the expression.3-Orange=sdf contours generated from the green DEM. Native elevation units are meters. To get feet you have to create an expression then multiply the native elevation values using the expression.4-Shapefile contours against sdf contours.4-Shapefile contours against sdf contours.

 

 

 

 

 

 

 

 

Chicagolooper

EESignature

Message 5 of 9

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

maybe this video could help you ...

 

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 6 of 9

braudpat
Mentor
Mentor

Hello

 

Thanks to @Alfred.NESWADBA for its beautiful Video !

 

After creating the right DWG with Coutours and Object Datas(with Elevation / Altitude), Alfred is doing the right job !

 

But it is much faster to elevate immediately the 2D Plines (of the current DWG) to the right Elevation / Altitude

with this nice Lisp routine "OD2DXF38" from @CADaSchtroumpf !?

 

Of course if you want an operation / calculation on the Altitude / Elevation as we can see into the Video,

you must update the Lisp routine !

 

Regards, Patrice (The Old French EE Froggy)

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 7 of 9

apweng
Collaborator
Collaborator

Hi there thanks for the response.  The problem is that the DEM is too large to start with.  

 

I can create SDF contours (with Z=0) and if I could get elevations on them they could be used for surface.  Even at 0.5' intervals I'm sure I will remove the vast majority of the data resulting in a mangeable surface size.  The data is for HEC RAS analysis so I'm not overly concerned with the appearance of the contours.

 

Andrew

 

 

0 Likes
Message 8 of 9

ChicagoLooper
Mentor
Mentor

Yes, exactly. Why are you using a DEM in the first place? A DEM is not always the best choice to make a surface. SDF contours which are generated from a DEM is not always the best choice either. (BTW, look at the SDF contours generated from a DEM, do they look realistic to you? To me, and many others, they do not.) Think about it, go beyond the mouse clicks and the associated work flow when you use contours generated from a DEM. Yes, it can be done, but just because you can, doesn't necessarily mean it's appropriate .

 

When you generate SDF contours from a DEM your are interpolating the elevations from the DEM. Then you are using the interpolated contours to create a surface. It's like making a duplicate key from the car you just bought from the dealership. After two days of driving your new car, you want to make a spare key. So you take the dealership key and make a duplicate. Three months later you want to make a third key. Which key would you use to make the third key? Would you use the duplicate key? Or would you use the dealership key? Choosing the latter would provide a good source which you can copy. Choosing the former is like making a duplicate from a duplicate.

 

Using a DEM to make a surface isn't wrong, it just more direct to use a topo contours when they are already available. Why go through the process of interpolating contours from a DEM, then use that interpolation to produce another interpolated surface.

 

If you want to make a surface and can't do it using a DEM then download topographic contours. You can download data in either gdb or shapefile format. I would choose shapefile then use MAPIMPORT to convert them to polylines with object data, of course. Then run a query and use the object data to put the contours on their proper z-value. Finally use the elevated contours to create your surface.    

 

The National Map (TNM) has free downloadable contours, see post 4 of this thread. The TNM even has DEM and LiDAR data too.

Chicagolooper

EESignature

0 Likes
Message 9 of 9

Joe-Bouza
Mentor
Mentor

All contours are interpretations regardless if the come from DEM or the USGS site. 

 

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes