Select to view content in your preferred language

Near 3D - Delta Z calculation

2850
5
Jump to solution
04-16-2017 01:00 AM
JustinOdell
Frequent Contributor

I have two point feature classes, both containing negative Z values, and I wish to compare the Z values of near features.

When I run the tool, I notice that the algorithm actually adds the difference between the Z values. For example:

Dataset A has a feature with Z value of "-5.5".

Dataset B has a feature with Z value of "-4.5".

These two features are considered "near".

When running the Near 3D (3D Analyst) tool, it calculates the field "NEAR_DELTZ" to be "+10.0" (i.e. -5.5 - 4.5 = +10.0), instead of my expected delta of "1.0".

Is there a way to calculate the Z value between two negative values, without having to recalculate the fields to have one positive and one negative?

0 Kudos
1 Solution

Accepted Solutions
JustinOdell
Frequent Contributor

I see where I went wrong.

Looking at the attribute table, there were multiple fields for Z values. I made the assumption points on land were positive Z and points in the water were negative Z. On further examination, the negative Z values in the attribute table were simply inverted with the Field Calculator or Excel, but the feature geometry retained positive Z values. I tested this by calculating the geometry of my features and realised my "depths" were actually "elevations".

I resolved the issue by using the "Adjust 3D Z" tool to 'reverse' the sign of the feature Z geometry. Recalculated the 'Near 3D' values and got the expected result.

Put this one down to user error.

View solution in original post

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

There is one outstanding bug, if your X,Y are in Geographic Coordinates

and there are ...other bugs...

You may want to look since you don't specify there version of ArcMap either

0 Kudos
JustinOdell
Frequent Contributor

Thanks for the info Dan. I am on ArcMap version 10.4.1.

My datasets are in grid coordinates (projected), so not affected by the geographic coordinate bug.

Surprised to see there are so many bugs with this tool. Alternatively, is there a better way to compare Z values of nearest points? 

Ultimately I'm looking to run analysis between the two layers to find a mean value by which I could block shift one dataset to meet another.

I know there is the cut/fill tool if I build rasters. But it'd be nice if the analysis can be done at the vector level.

0 Kudos
DanPatterson_Retired
MVP Emeritus

At least you have a version >= 10.4 because ...this bug... made the results just plain wrong unless a search radius was specified

XanderBakker
Esri Esteemed Contributor

Do you know if the right "near" feature is returned? If so, you can calculate the Delta Z using the Z of the geometry and the Z of the near feature. If have used it in the past and did not encounter any problems, but in my case Z values were positive. See: https://community.esri.com/people/xander_bakker/blog/2016/07/09/creating-a-3d-tree-with-arcpy-for-3d... 

0 Kudos
JustinOdell
Frequent Contributor

I see where I went wrong.

Looking at the attribute table, there were multiple fields for Z values. I made the assumption points on land were positive Z and points in the water were negative Z. On further examination, the negative Z values in the attribute table were simply inverted with the Field Calculator or Excel, but the feature geometry retained positive Z values. I tested this by calculating the geometry of my features and realised my "depths" were actually "elevations".

I resolved the issue by using the "Adjust 3D Z" tool to 'reverse' the sign of the feature Z geometry. Recalculated the 'Near 3D' values and got the expected result.

Put this one down to user error.

0 Kudos