data extract contours length and z value

data extract contours length and z value

Anonymous
Not applicable
3,057 Views
13 Replies
Message 1 of 14

data extract contours length and z value

Anonymous
Not applicable

hello,

I have to do a slope analysis that breaks up each slope range like normal, but then I have to give a table that displays contour elevation as well as length of contour from within that slope range.

Is there anyway to get dataextract to produce this? I cannot get dataextract to produce z value when I run it.  Nor can I find a .lsp that would take many polylines and produce an .csv or .xls file that has layer, color, length, and z value.  these polylines are extracted contours from a surface and they have only one z value for entire length.

 

thanks a bunch

Jason

0 Likes
Accepted solutions (1)
3,058 Views
13 Replies
Replies (13)
Message 2 of 14

Neilw_05
Mentor
Mentor
You can always extract the contours as polylines and then run Data Extract. See the Extract features tool under the Surface Utilities menu.
Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 3 of 14

Anonymous
Not applicable

yes that is how i created the contours into polylines. extract from surface.

data extraction does not give z values when run ( nor x or y for that matter)

 

to simplify, 

i have surface--->create slope analysis

now i have overall slope analysis from site.

i need to know the lengths of contours from with in the slope ranges and their elevations.

 

say i have 4 slope ranges, i managed to get a polylines around those ranges from the slope analysis and extract contours from surface and then extrim outside of that specific slope range to give contours only within that slope range (say 15%-25%).

 

how do i extract that data of the contours with in that specific slope range into a xls or csv to create a table to show

elevation 750 contour   length=xxx

elevation 751 contour    length=xxx

etc.

Message 4 of 14

Pointdump
Consultant
Consultant

Hi @Anonymous,
Welcome to the Autodesk Forums.
Use MAPEXPORT and a little fancy footwork in Excel. Can you post your drawing?
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 5 of 14

Neilw_05
Mentor
Mentor

You might want to use Map Queries vs. Data Extraction. Map queries give you more control such as performing spacial queries, alter properties queries, report queries etc. Even better would be to export the contours and boundaries to shape files and use GIS tools to perform your analyses.

 

If you are not familiar with those tools then you are better off just using the tools you know unless this is something you do on a regular basis.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 6 of 14

Neilw_05
Mentor
Mentor

Data extraction gives the lengths and elevations of polylines. Not sure what XY values you need. This isn't something I've had to do so I don't fully understand your workflow. From what you described, you have created boundaries around the slope ranges from the surface analysis and are using those boundaries to clip the contours into regions, then using DE to generate tables with polyline lengths and elevations for each region. I don't understand why you are not getting the elevations and lengths of the polylines. I've never had an issue with extracted contours or DE for that.

 

PS. once you have clipped the contours into regions, you can put them on layers according to the range (i.e. 0%-2%). Then in the DE tables, include the layer names so you can sort the contours in EXCEL by range. Then you can calc totals for each range.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 7 of 14

Anonymous
Not applicable

thank for the replies guys,

@Pointdump ,

not sure posting dwg would help, may be more confusing, presently i have the one range isolated on screen and that is what I am doing the DE from, just the trimmed contours

 

@Neilw_05,

here is snip of what my dataextraction looks like, there is no coords (x,y,z) that i can pick to extract? I get length, no problem. not sure what i am doing wrong, i had them as regular polylines and as 3d polys, no Z value

 

regarding the 'PS" yep, i have all ranges from slope on separate layers and i have isolated them to DE them into and xls file.

 

 

again thanks for the help

0 Likes
Message 8 of 14

Neilw_05
Mentor
Mentor

Go back through your object properties fields in the DE settings. As long as you are only extracting polylines you will see a field for elevation. If you have mixed polys, lines, 3D polys, etc., that option my not be available since it doesn't apply to the other objects. I don't have time to run any tests but it seems to me the Elevation field should still show up, it just won't have any values for objects where it doesn't apply. I could be wrong, that is why I suggest limiting the object selection to 2D polys.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 9 of 14

Anonymous
Not applicable

this is odd, when i explode the polylines, and DE i get x,y & z values, but when go back and join or pedit join them back together, the DE, i lose x,y,z values....

 

@Pointdump 

mapexport to xml sorta works, no kidding on fancy xls footwork......kinda looking for a bit more automation...

0 Likes
Message 10 of 14

Neilw_05
Mentor
Mentor

A polyline can have numerous vertices so there is no X,Y properties in the extract aside from the start and end point. Why do you need the XY?

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 11 of 14

ChicagoLooper
Mentor
Mentor
Accepted solution

You can do it. It's a 3-step process. Here's how it's done.

 

PART 1:

Extract your contours from the tin surface then change the properties of the surface to '_No Display.' Your contours will appear as lines in modelspace. To test, select a single contour and verifiy it has an elevation value displayed in the Properties Palette.  Use MAPEXPORT command to export all contours to Shapefile. Name your shapefile Contours_Interval-1ft (your interval may vary) and save it in your project folder (see image-101).

 

Image-101Image-101

 

The MapExport consists of 3 tabs, complete all tabs exactly shown below.

 

On the SELECTION Tab, select the options shown (see image-102). After you have clicked the Select manually button, use a crossing window  to select your contours.

Image-102Image-102

 

On the DATA Tab. Follow the sequence exactly as shown below (see image-103).

 

Image-103.Image-103.

 

On the OPTIONS Tab, verify the coordinate system you've assigned to modelspace as shown (your coordinate system may vary). Click OK and your shapefile will be created. See image-104.

 

Image-104Image-104

 

__________________________________________________________________________________

 

PART 2:

Start a clean, brand new drawing and assign the appropriate coordinate system. Use the MAPIMPORT command to import the new shapefile you created in Part 1. MapImport=>Browse to the shapefile then click OK (see image-201).

 

Image-201Image-201

 

Select all the options exactly  as shown below (see image-202). After the MAPIMPORT operation, your contours will appear in modelspace. If you have correctly performed the MapImport as instructed, the contours will be placed on separate layers where each layer hosts a specific elevation. Your drawing is now ready for Data Extraction.

 

Image-202Image-202

 

-----------------------------------------------------------------------------------------------------------------------------

 

PART 3:

While still in the same drawing, use DATAEXTRACTION command on the contours you imported in Part 2.  When you use DataExtraction you will be presented with eight (8) pages or 'dialog windows.' The parameters of windows 2 through 5 are shown below (refer images 301 to 304). Window 5 what extension to use to save to the data in xls format--the DataExtraction procedure cannot save to xlsx (see image-305). The end result is a spreadsheet (see image306). The column named Layer in the spreadsheet represents contour elevation.

 

Image-301Image-301

 

Image-302Image-302

 

Image-303Image-303

 

Image-304Image-304

 

Image-305Image-305

 

Image-306Image-306

 

 

NOTES:

The key to this exercise is to leverage the Data. Each contour line has an elevation value and length, both can be 'harvested' from the Properties Palette and stored as Data. Shapefiles not only have the capability to store that data but they can also can invest the data in order to gain analytical advantage This makes the combination of shapefile and MapImport an ideal medium to isolate and organize drawing entities beyond the typical plain vanilla DataExtraction routine.

 

By itself, the DataExtraction procedure won't be able to meet your specific needs. Creating a shapefile from the extracted contours will allow you to 'capture' elevation values. When you combine the shapefile with MapImport, it provides you with the elevation and length information you need.

 

Chicagolooper

EESignature

Message 12 of 14

ChicagoLooper
Mentor
Mentor

Disregard. Duplicate post.

Chicagolooper

EESignature

0 Likes
Message 13 of 14

Anonymous
Not applicable

@ChicagoLooper 

yep,

that is basically what i did as per @Pointdump 's pointing at MAPEXPORT, i went a little different route to using the .shp file but i exported .xml, chose the polylines i wanted and chose the specific data then import xml into .xls just as you described in your awesome tutorial

 

cumbersome but effective. and i am glad someone else has ran into this...thanks all for the help

0 Likes
Message 14 of 14

kyle_k_johnson
Participant
Participant

kyle_k_johnson_0-1740488960217.png

I do not see elevation?

 

0 Likes