03-09-2018 09:46 AM
I have two shapefiles: one shapefile with some points and one shapefile with a networks. I would like to calculate the minimum distance between each point and the network. Is it possibile ? Is it possible using the DISTANCE Functional Attribute?
thank you very much
03-14-2018 03:14 PM
In Aggregation you might want to use the "accumulate nearest" spatial operator option for relating information from your network lines to the points. Accumulate nearest ensures that each summary feature is associated to one detail feature (the nearest).
Let's say that for every city (points) you want to know the name of the nearest river (lines) and you want to know the distance to the river.
DISTANCE expression syntax:
DISTANCE(Geometry1, Geometry2, MeasType, UnitOfMeasure, TwoD)
The following example would calculate from the nearest river, FIRST(Detail.Geometry) to each summary city Input.geometry in projected 2D Kilometers:
The TwoD parameter is a boolean flag where TRUE() is the default which represents 2D. If you want 3D use FALSE(). If you don't specify ProjectedMeas, then TrueMeas (True Measure) is the default. The default unit of measure is meter if not specified. The measure types and units can be found in the Constants category listed along the left.
Note! Be aware that all geometry calculations done in the expression system are based on the coordinate system assigned for feature class storage. Functional calculations for distance, area, perimeter, etc.. do NOT use the GeoWorkSpace coordindate system.
Good Resource: Expression Function Packages help topic has a hyperlinked list of functions for a quick review of syntax. Some have examples.