1

I wanted to find the distance from a point (lat 36N long 12E) to all the polygons in my shapefile. People on this forum helped me out and said that I should create an "XY layer" with only that point, and then use the 'spatial join' tool to find the distance from the polygons to the point.

When I use 'spatial join' it says that the "XY layer" I created doesn't have a defined projection. So I tried to define the projection, but no matter which Coordinate System I try, it fails to do so. (My polygon shapefile is defined under the GCS_WGS_1984 coordinate system).

I'm new to ArcGIS and am using ArcMap 10.1.

2

Here is what I would do.

  1. Create a spreadsheet with the following two columns:

    lat lon

    36.000 12.000

  2. In ArcGIS go to: File > Add data > Add xy Data and load your spreadsheet

  3. In the wizard define projection as GCS_WGS_1984

  4. Export your layer as a shapefile and load it into ArcMap

  5. Load your polygons

  6. Open ArcToolbox, go to Analysis tools > Proximity > Near

  7. Choose your polygons shapefile as Input features

  8. Choose your point shapefile as Near feature

  9. When the process is done, open the attribute table of your polygons. The distances are in the NEAR_DIST field

(Note that the distance is in map units, that is decimal degrees.)

0

Open a new ArcMap session

Add your Polygon Shapefile

Add your point data as a text file using comma separated values, making a table like so:

Long,Lat

12,36

Turn the text (table) data into a point by right-clicking on the table and selecting "Display XY Data", choosing fields as appropriate. Note - The default coordinate system should be the same as the one for your Polygon Shapefile.

Use the Generate Near Table Tool to get your results. Unchecking the default of "Find only closest feature" will find the distance (and/or angle, etc) of each polygon.

If your coordinate system is geographic then make sure to set the distance method to "GEODESIC". I believe the values given in the new table will be meters.

That should give you what you need though I find it easier to work in a projected coordinate system for getting answers like you're asking for. Make sure it's a Equidistant Projection for getting the best answer with PLANAR distances (as opposed to GEODESIC distances). If you do move to a projected coordinate system, change the projection of your Polygon Shapefile first and then start at the top (i.e. Open a new ArcMap session...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.