# Calculating distance from points to nearest “eastern” polygon using ArcGIS Desktop?

I am using ArcGIS 10, and trying to do the following:

I have a layer file of points (industrial facilities), and I would like to calculate the distance from each point to the nearest "eastern" polygon (U.S. state). I know there are tools for calculating distances from points to polygons, but I don't know how (or, if you can) specify direction of the polygon.

-
Do you need the nearest state that you hit on a line due east from the facility? Or the nearest state that is at all to the east (but could be farther north or farther south)? – dmahr Mar 29 '12 at 20:54
A solution appears at forums.arcgis.com/threads/…. – whuber Mar 29 '12 at 21:04
do you have an ArcInfo licence? – Matthew Snape Mar 30 '12 at 9:53
Responses to the comments. I would like the distance that is due east. I do have an ArcInfo license, but I should add that I am a bit of a novice when it comes to ArcGIS. – David Apr 4 '12 at 10:07

Perhaps do a distance to all polygons (not sure if this returns a line or just a distance) then filter them by the angle of the line greater than 45 but less than 135 (everything easterlyish). Then order by distance and select the top 1... that is the logic, now you just need to code it.

-
How does this solve the problem? The whole point is that distances are completely different than distances in a specified direction. The only information a distance from a point to a polygon provides (even when the closest point on the polygon is also known, and the bearing to it) is a lower bound for the easterly distance. – whuber Mar 30 '12 at 14:32

It determines the distances from input point features to all points in the near features within a specified search radius.

Or Near (Analysis) It determines the distance from each feature in the input features to the nearest feature in the near features, within the search radius. If you do not have Advanced license then try Hawth's Analysis Tools for ArcGIS.

-

At this scale, we're dealing with the curved Earth, and that makes this a somewhat tricky problem.

I'm assuming your points are all west of the Prime Meridian, and that you're looking for distances to states at constant 90 degree bearings (i.e., traveling eastward, always along a latitude parallel).

For each point, you could get it's lat/long, and make a new corresponding point at that latitude, and at zero longitude (the Prime Meridian). Make that point with an attribute field that the original points contain too, and see that corresponding point pairs have the same, unique attribute value.

Make lines (rays) between the point pairs, using your line id field (http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00170000003s000000).

Convert your states to line features (http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00170000003t000000).

In a geographic coordinate system (e.g., WGS84) where parallels are all straight and west-east, calculate the intersection points of each line with the state lines.

Use field calculations to get the lat/long of your starting points and intersection points, along with their unique ids from your lines, into the attribute tables. See that intersection points also carry their state name attribute. Export these to csv.

The shortest distance from your start points and the intersections is not along that constantly-90-degree line, it's along the Great Circle arc between the pair of points. Use a tool like this one (http://gis.harvard.edu/tools/software/great-circle-distance-batch-calculator) to calculate the distances. You'll have multiple intersection points (two or more) per line; the one at shortest distance for that line is your closest one, and the state it belongs to is your closest state to the east.

-