Setting radius in Near Table - problems with distances - ideas?

518
10
11-18-2011 11:55 AM
AustinBecker
New Contributor
I posted this in the "general" forum, but haven't gotten any replies. Thought I'd try here:

I am trying to create a near table that identifies the closest distance between each point in my point dataset and each line in my line dataset. It seems to work, but does not seem to limit by radius. In other words, regardless of the radius I enter in the dialogue box (1 mile, 100 miles, etc), the number of Objects that is created is always the same (999,666). In addition, the near distances (near_dist) are also showing up to about 300 miles, regardless of the radius I choose.

I've also had the problem of distances showing up as unreasonable. Example, I set the radius for 100 miles and the greatest distance in my near table shows up as 1.44.

I am using ArcMap 10.0. Build 2414.

Any thoughts on how to resolve this?

Thanks.

Austin
0 Kudos
10 Replies
NobbirAhmed
Esri Regular Contributor
What is the coordinate system of your data?
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
The feature count is always the same as your input (point count). Some points may find a line, other don't. You can tell by the Near_FID and Near_dist values.

Is your data in decimal degrees (not projected)? If so, the Near_dist values will also be in decimal degrees even if you specify "miles" as the search distance units. To analyse distance properly, you need to project your data before running Near tool.
0 Kudos
AustinBecker
New Contributor
Both datasets have a coordinate system of GSC_North_American_1983. I've tried running a project on both and now when I run the near table tool I get an empty table.
0 Kudos
AustinBecker
New Contributor
Also, wouldn't the feature count increase? If I have 1 point and 10 lines, a feature would be created for the shortest distance between the point and each of the lines, right?

Still hoping to get this resolved if anyone's got any more thoughts on it.

Thanks much!
0 Kudos
AustinBecker
New Contributor
Still hoping to get this resolved. Any more ideas floating around out there?
Thanks again!
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
I am not sure what you meant by "I've tried running a project on both ...". Did you project both data to a local coordinate system (UTM, State Plane..)? Can you select a few points and a few lines to try and see if you get an expected result?

I misread your question in my first reply. Now I understand that you are trying to use Generate Near Table tool (not the Near tool). You are right about the record count increase with the search distance. It will stop increase if every point has found every line. You can check how many points and lines you have and do the math. What type of output table were you creating when the record count was always 999,666? What was the size of the table file? Some files have limitations in size, for example a .dbf cannot exceed 2 GB.
0 Kudos
AustinBecker
New Contributor
Thanks Dan!

Yes, I tried a project to the same coordinate system for both files. Tried a couple of different projections. The problem has evolved a bit, in that I seem to have gotten it to work, except that the distances are calculated into some other metric (not miles or kilometers as I specify). However, when I convert the near_dis to whatever radius I specified, things seem to come out correct within a couple of kilometers/miles.

In other words, the near_dis is calculated at 1.44.... I divide these values by .0144 and get a table in which the maximum value is 100, 100 being the maximum radius I specified. Now, when I go check all the values, they seem to be more or less correct and range from 0 - 100.

Seems to work, though I wish I knew what it was doing to get the calculations that range from 0 - 1.44
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You are welcome.

Once again the NEAR_DIST values are always in the units of your input features. If your input are in GCS, the NEAR_DIST values will be in decimal degrees, which is not appropriate for distance analysis. You really should project your data to a proper projection based on the geographic location; you will then know the units of the coordinates (meters, ft). You can check the feature units by right-clicking your feature class - Properties - Coordinate System tab.

Let's say your projected data is in meters; then the NEAR_DIST values will be in meters no matter what units you specify for the search radius. We provide the list of search radius units for you to choose from is only for your convenience, e.g. you like to think of it in kilometers (km). When you specify 10 km for search radius, you may get some NEAR_DIST values of 100, 500, 800, etc. - these are in feature units, i.e. meters in this example.

In order to have a field with values in km, you would need to use Add Field to add a field, e.g. NEAR_DIST_KM and then use Calculate Field to divide the NEAR_DIST values by 1000 to get 0.1, 0.5, 0.8 etc km.

Hope this helps you understand what's happening.
0 Kudos
AustinBecker
New Contributor
Hi again Dan and all. I've made some progress on my "generate near table" issues, but now seem to be bumping up against a new problem. After a generate the near table, all of the IN_FIDs result in 0. So, I have a column with a new OBJECTID, a IN_FID (all 0's), and a NEAR-FID (which appears to now be correct once I convert from decimal degrees to kilometers).

I've tried a bunch of times and with different versions of my input files, but am always getting the IN-FIDs with all zeros.

Thanks again!
Austin
0 Kudos