POST
|
Jake: That's too bad. Although it didn't work, I learned several things along the way. One of which would be, in the future, to include a sample of my dataset right up front. Thanks for your work on this, though. Joe
... View more
11-21-2013
05:15 AM
|
0
|
0
|
583
|
POST
|
Thanks again for your assistance, Jake. I followed the process you outlined, and the python script ran without error, but I did not get an output file with the new 3D features. Would the output from the script have been a new feature class, or would it have updated the input lines_buffer feature class? Also, I assumed that the "r" after the equal sign in the line env.workspace = r"C:\Default.gdb" is a typo? I added and populated the Elevation field, and then ran the Buffer tool, with Z enabled as an environment variable. The resultant polygons, however, do not have Z values. when one is edited, the sketch properties show 0 for all vertices. The line_lyr feature class was empty at the conclusion of running the script. One thing I haven't mentioned is that although the polylines do not overlap in 3D space, there is a great deal of overlapping in 2D. Also, the map units for the polylines are in meters, but I buffered them to only 0.005 m (5 mm, for a total polygon width of 1 cm, because they represent bones from an archaeological site). Would either of these "strangenesses" cause trouble for the script and the ArcTools it uses? Thanks Joe Hi Joe, The following workflow should work: 1. Add a field of type Double called 'Elevation' to your lines feature class 2. Right-click on the field > Calculate Geometry > Max (or Min) Z of Geometry 3. Run the standard 'Buffer' tool on the lines feature class. Before executing the tool, be sure to go to the Environment Settings > Z values > 'Enable' Output has Z values 4. The output will contain the 'Elevation' field. Using the below python code, you can iterate through each polygon and adjust the Z value using this field's value: import arcpy
from arcpy import env
env.overwriteOutput = 1
env.workspace = r"C:\Default.gdb"
fc = "lines_buffer"
with arcpy.da.SearchCursor(fc, ["Elevation"]) as cursor:
for row in cursor:
vertexElevation = row[0]
arcpy.MakeFeatureLayer_management(fc, "lines_lyr", "Elevation = " + str(vertexElevation))
arcpy.Adjust3DZ_management("lines_lyr", "NO_REVERSE", vertexElevation)
... View more
11-20-2013
05:32 AM
|
0
|
0
|
583
|
POST
|
Jake: I will try that! And also learn some Python at the same time! Thanks, I'll let you know how it works.
... View more
11-18-2013
11:28 AM
|
0
|
0
|
583
|
POST
|
Yes, each vertex has its own Z value. There are 2-4 vertices per feature, and they are relatively straight (a few bends, but nothing even close to closed or even semi closed loop).
... View more
11-18-2013
06:56 AM
|
0
|
0
|
583
|
POST
|
I have about 1000 polylineZ features that I would like to convert into polygons of a constant width, and the same length as the line. The buffer tool created 2D, not 3D features, and the 3D Buffer tool created multipatch features. When viewed in ArcScene, I would like the features to look like the polylines, only with width, and no thickness. Ideas? Thanks!
... View more
11-17-2013
11:55 AM
|
0
|
10
|
2991
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|