Jump to content

Converting Shapefiles to 3D contours or loci


Joshua Hale

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.

Link to comment

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

Link to comment
  • 5 years later...
  • 4 weeks later...
  • Vectorworks, Inc Employee
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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...