shrug-l: Model - Closest Point Tool

Griffin, Jason jgriffin at co.pinellas.fl.us
Fri Dec 30 09:30:32 EST 2011


Please see attached...

This should do it (Made it this morning) :)

All you need to know is the highest ObjectID in your dataset, then run the model, and use this number for the second parameter.  This tells the model how many times it needs to run, and is very important not to use the total record count because the id field is not always in sync.  If your dataset uses FID, or OID instead of ObjectID you will just need to edit the two Make Feature Layer tools in the model.  After it's done running you will have a "Merged_Pivot_Table" inside the database.  From there you could join it to your dataset, or do whatever you need w/ the values.

Happy New Year!

Jason Griffin
Pinellas County Business Technology Services
(727) 453-3613
(727) 600-6634
jgriffin at pinellascounty.org<mailto:jgriffin at pinellascounty.org>
All government correspondence is subject to the public records law.


From: shrug-l-bounces at lists.dep.state.fl.us [mailto:shrug-l-bounces at lists.dep.state.fl.us] On Behalf Of Griffin, Jason
Sent: Friday, December 30, 2011 8:33 AM
To: Bret Whiteley; shrug-l at lists.dep.state.fl.us
Subject: RE: shrug-l: Closest Point Tool

I think you might be able to get away with the Near tool, and/or some creative iterating.

I found a python script a few years ago that creates spider lines from one point to many other points which might work for you also, but if I remember it correctly you might have to run it for each source point.  If that is the case you could update it w/ ArcMap 10's model iterators to do that for you.  After you run it for all of your source points you could then merge all of the data together in a table and then use the Pivot Table to cross-tabulate the data which would give you one line for each point, and one row for each point.  I'd attempt this in a file geodatabase so you can have long field names if you need it, and so the outputs will automatically have the shape length field but I think the tool adds a distance.

It is Arc Script Id 14908 if my attachment gets stripped.

I'll check my old models to see if I have anything else...

Good luck!

Jason Griffin
Pinellas County Business Technology Services
(727) 453-3613
(727) 600-6634
jgriffin at pinellascounty.org<mailto:jgriffin at pinellascounty.org>
All government correspondence is subject to the public records law.


From: shrug-l-bounces at lists.dep.state.fl.us [mailto:shrug-l-bounces at lists.dep.state.fl.us] On Behalf Of Bret Whiteley
Sent: Wednesday, December 28, 2011 2:35 PM
To: shrug-l-request at lists.dep.state.fl.us; shrug-l at lists.dep.state.fl.us
Subject: shrug-l: Closest Point Tool

Shruggers,

I have a point shapefile with 44 features in it.  I would like to know the distance from each feature to each other.  It would be best if the results are returned in a matrix.

I have ArcEditor 10, with Spatial Analysis.  It appears that i might have to write a script to fix this with, but i cant imagine there is not an out-the-box tool,

Any help is greatly appreciated.

Bret.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20111230/10220fbf/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PointDistance.zip
Type: application/x-zip-compressed
Size: 36158 bytes
Desc: PointDistance.zip
Url : http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20111230/10220fbf/PointDistance.bin


More information about the SHRUG-L mailing list