profile graph in ArcGIS pro 2.0

7005
12
Jump to solution
11-16-2017 07:22 PM
junewong
New Contributor II

I am using ArcGIS pro 2.0 with 3D analyst extension, and i have created a tin layer including elevation data.

But i have no idea why the profile graph is showing zero ? The blue profile line is created by ready-to-use tools "Profile"

 

When i was using ArcMap, profile can be created by using 3D analyst toolbar.

Thanks.



Tags (1)
0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

As Dan already mentioned, this will require you to run Interpolate Shape—Help | ArcGIS Desktop first and then create the profile graph

View solution in original post

12 Replies
DanPatterson_Retired
MVP Emeritus

Profile graph.... doesn't it require 3D line geometry?

XanderBakker
Esri Esteemed Contributor

As Dan already mentioned, this will require you to run Interpolate Shape—Help | ArcGIS Desktop first and then create the profile graph

junewong
New Contributor II

Thanks!

And the next question is how can i export the graph to excel?

the export icon as shown is only for images.

and the attribute table only contains shape_length.

did i miss any steps? i am new to Arcgis Pro.

Many thanks again!

0 Kudos
DanPatterson_Retired
MVP Emeritus

FeatureVerticestoPoints with an Add Geometry Attributes to get the coordinates then

Table to excel depending on your license levels of course.

or FeatureClassToNumPyArray then standard numpy savetxt to get it to a csv format which allows for x, y, z to be read in

junewong
New Contributor II

Hello Dan,

after working with Feature vertices to points, the attribute table is like this,

am i working right?

thanks.

0 Kudos
DanPatterson_Retired
MVP Emeritus

you now have the points... at this point you can proceed with

  • the Add Geometry attributes to get the point information to add X, Y and Z values
  • and calculate the cumulative distance using the field calculator on a new double field. (or in a secondary program)

If you add a field called SeqDist type double, appropriate precision and scale, set your program to python parser use the below and you can now graph distance versus the Z value

def dist_cumu(shape):
    global x0
    global y0
    global distance
    x = shape.firstpoint.X
    y = shape.firstpoint.Y
    if x0 == 0.0 and y0 == 0.0:
        x0 = x
        y0 = y
    distance += math.sqrt((x - x0)**2 + (y - y0)**2)
    x0 = x
    y0 = y
    return distance

# in the expression box use... python parser of course

# dist_cumu(!Shape!)
junewong
New Contributor II

hello dan,

But i have failed to do this. do i miss any steps?

i am currently using the arcgis pro (trial version: advanced level with all extensions) before getting the full license.

many thanks again!!

Running script AddGeometryAttributes...

Failed script AddGeometryAttributes...

Traceback (most recent call last):  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\AddGeometryAttributes.py", line 376, in <module>    addGeomAtts.execute()  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\AddGeometryAttributes.py", line 60, in execute    fields = self.CreateOutputFields(fc, geomProperties)  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\AddGeometryAttributes.py", line 310, in CreateOutputFields    arcpy.da.ExtendTable(fc, "OID@", narray, "_ID")RuntimeError: This operation is not allowed while editing

Failed to execute (AddGeometryAttributes).

0 Kudos
DanPatterson_Retired
MVP Emeritus

looks ok, go old school and add 3 double fields, X, Y and Z.. Use the simple field calculator expressions

!Shape.centroid.X!, !Shape.centroid.Y! and !Shape.centroid.Z!

It is a featureclass I assume and not something else

Also, I trimmed of 3 lines for the function, so add them as in this image to initialize the start values for the distance calculation

CalebAnderson1
New Contributor III

Just what I needed, thanks!

0 Kudos