Jump to content
Sign in to follow this  
Joshua Hale

Converting Shapefiles to 3D contours or loci

Recommended Posts

I have created a shapefile of 2d contours in ArcGIS 3D analyst from a National Elevation Data ArcGrid file and exported it to VW 2009. When I select the contours and click on the data tab I notice that there is number for contour elevation. Does anyone know of a vectorscript that will convert the 2d line or polygon to a 3D polygon with z value corresponding to the contour elevation embedded in the imported shapefile? I could do it manually, but there are too many contours.

Share this post


Link to post

I've been planning to write a script for this, but it's not a top priority. Maybe I can do something, but won't promise anything.

Share this post


Link to post

I just spotted this on VECTORLAB which may do the job.

"I wrote this procedure to process a layer of 2D polygons imported from a shapefile (.shp) . Each polygon had the polygon's elevation in an attached record. This procedure reads the elevation value to create a 3D polygon at the z height. This procedure could be made more useful; The procedure could ask for the record and field instead of constants. Also, the 3D polys are placed onto a new layer, but the 2D polys could be separated from the 3D polys more elegantly. By Frank Brault "

http://www.vectorlab.info/index.php?title=3DPolys_from_2DPolys_with_elev_in_record

Share this post


Link to post

Hi

This is just what I'm looking for but I don't know how to apply it. I loaded the script as a tool but can't get to run it to convert my shapefiles.

Bruce

Share this post


Link to post

Managed to create the tool and run it - somehow! - but still trying, seemed there were no z values noted although they are there. All came through as zeros but it did make it 3D but flat.

Share this post


Link to post

It seems that the connection to the record is broken. The code assumes that the Z value is in a record named "1' contour" and field "CONTOUR".

If you can post a sample file, I can update the code to make it work better.

Share this post


Link to post

I think there might be a better way, and that is to use the Modify by Record command. This command allows you to do several things, like moving 3D plus, extruding objects, colouring objects, and so on based on records attached to the objects.

Share this post


Link to post
It seems that the connection to the record is broken. The code assumes that the Z value is in a record named "1' contour" and field "CONTOUR".

If you can post a sample file, I can update the code to make it work better.

You're correct. There are two lines in the script that need to be updated:

kRecordName = '1''contour';

kFieldName = 'CONTOUR';

For example, if in your file the record is named record1 and the record field with the elevation data is named, ELEVATION then the lines should look like this:

kRecordName = 'record1';

kFieldName = 'ELEVATION';

Also, as Jonathan mentioned if you have Vectorworks 2014 or newer, you can use the Modify by Record command to perform this action. Using the Elevate 2D Polys option, you can convert the polygons to 3D polygons and choose the record and field used to set the elevation. You can also apply a multiplier to the field if you need to adjust for unit values.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×