Solved! Go to Solution.
Caleb's suggestion sounds good to me. I'm assuming you created the centroid points okay? If so, you need the distance from these points to the green line, correct? So I suppose the green line is in a line feature class, you can execute Near with the centroid points as input and the line feature class as the near feature(s). If that is failing, can you elaborate more on what is going wrong?
Then would it make sense to convert the polygon features to line for purposes of this Near analysis? I'm assuming you have that capability (do you have this advanced license or other means to convert?).
This way you can 'force' the computation of distance to the boundary of the poly - I think this is what you're asking. Otherwise, without this intermediate step (converting the poly boundary to line), ArcGIS has no way of knowing that you mean, either the interior (part of the polygon) or the boundary (also part of the polygon).
If this doesn't quite make sense, look over more carefully the docs on Near (which are very good, including illustrations [although not of your special case]):
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001q000000
You know how to do 'join by attribute', correct? The key is to have a common field values with which to perform this join...
So how is this done? You can 'preserve attributes' in converting Feature To Line. I think choosing that option will result in the 'old' FID written to the 'new' line fc with the fieldname, 'FID_<fcName>'. So you could join by attribute back to the orig fc FID using this preserved FID. Test this to be sure it behaves as you expect. Below is a rough outline of how it's done:
- run Feature to Line on poly fc with 'preserve attributes' on (this may be 'on' by default)
- if your orig poly fc name is 'impact', let's just say, then look in your Feature to Line output for a field 'FID_impact'...
- visually inspect and verify the line features' FID_impact values match the poly features' FID.
- join by attribute FID_impact to FID....or to permanently join the fields to the target poly fc, use the Join Field tool
Check this out:
Join Field
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000