Select to view content in your preferred language

How to calculate distance of multiple points?

13654
24
08-21-2017 11:11 AM
JoseBarrios2
Deactivated User

Need help on how to calculate distance of multiple points. I have two layers : an input feature(office) and near feature ( projects). I want to know the distance of the projects for each office. The near tool won't work  (It calculate the distance to all points)  unless  I run the tool for each office...any ideas?

Thanks,

0 Kudos
24 Replies
JayantaPoddar
MVP Esteemed Contributor

Near Tool

Calculates distance and additional proximity information between the input features and the closest feature in another layer or feature class.

Point Distance

Determines the distances from input point features to all points in the near features within a specified search radius (you could keep it empty).



Think Location
0 Kudos
JoseBarrios2
Deactivated User

The near tool and point distance calculate the distance to ALLL point (projects) and I need to calculate the distance to the points that belong to each office. The only way around is exporting the projects that belong to each office ant run the near tool for each set of projects...I have 120 offices and 5000 projects ...

0 Kudos
AbdullahAnter
Honored Contributor

Could I ask you What was the layer that you set as Input features and what was the Near Features in the tool?

0 Kudos
JoseBarrios2
Deactivated User

My INPUT is office location (point) and my NEAR is projects locations (point). Some offices are very close on location and some offices travel very far for projects so I can not use the search radius. For every office there is a set of projects and I want to know the max, min and average distance of those projects!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Jose... I was also questioning whether the data were all in one file, two files (ie origins in one and projects in another) or more (origins in one file and each project in another)

0 Kudos
JoseBarrios2
Deactivated User

Hi Dan,

I have two data sets (.shp) and a common key field ID ( with one - to many). There are  about 400 project for each office. Both layers are on the same projection (USA_Contiguous_Equidistant_Conic) and  the offices cover very large distance (more than 100 miles) lots of over-lapping.  Basically I am covering the entire southeast of US and the Caribbean.

0 Kudos
DanPatterson_Retired
MVP Emeritus

This can be done but the ease at which it can be done depends on the format of your data.  

Are all the locations in the same file? ie the origins and their associated destinations or are they in separate files.

or are the origins in one file and all the destinations in another file which has a key to associate each destination with one origin?

Are all the files in a projected coordinate system?

Do they cover great distances (ie 10's, 100's 1000's of kilometers)

Any substantive information on the existing data structures and input coordinate systems would be helpful.

0 Kudos
ChrisDonohue__GISP
MVP Alum

Another option is Generate Near Table—Help | ArcGIS for Desktop 

I guess a big question going forward with this is the sorting down of the results to just the applicable projects for each office, as many of the possible solutions (Pointdistance, Generate Near Table) would provide output of all the Offices to all the Projects, generating one large table, which would be unwieldy.

Is there currently in your data field(s) that identify information on which Projects belong to which Offices?  If that relationship mechanism could be identified, it may be very possible to generate the desired output so it is limited to just the projects for each office; however, we would need to know how that is structured so as to come up with an effective solution.   Possibilities include employing Modelbuilder or Python as part of the data processing.  For example, one could loop through each office and only find the distance the projects associated with that office.  Again, it would be dependent on how the data is structured.

What is ModelBuilder?—ArcGIS Pro | ArcGIS Desktop 

Chris Donohue, GISP

0 Kudos
JoseBarrios2
Deactivated User

YES. I have a common field that identify each office and link to projects. My Phython skills are very limited

JB

0 Kudos