Distance to nearest hub output not correct

5156
5
01-11-2015 09:10 PM
vegan_wiz
New Contributor III

Hello everyone. I'm having an issue with distances not being correct in the attribute table of a distance to hub analysis. I'm getting results with very small numbers, which I know are not correct. Here's some basics on the project:

 

Using QGIS, but I think this may not matter for this question.

 

Question to answer: Distances between a population centroid per tract to nearest store that accepts food stamps.

 

CRS on the fly is enabled. Disabling this still doesn't fix the issue presented here.

 

Study area is Clark County, Nevada in the USA.

 

My layers, all using EPSG:3718 - NAD83(NSRS2007) / UTM zone 11N:

 

Layer 1: Food stamp outlets (points)

Layer 2: Population centroids per tract. (points)

Layer 3: Census Tracts. (polygons)

Layer 4: Counties. (polygons)

 

Source point layer: Population centroids. Destination hub layer: Food stamp outlets. Measurement unit: Meters.

 

After running analysis: Output lines appear correctly in the canvas with same CRS as other layers by default. See output attribute table in the picture. Again,

the HubDist column numbers should not be that small. Any ideas on the issue?

. QDBjg.png

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Your data are in decimal degrees you have to use the Project tool to get the data physically in planar coordinates, apparently, the Define Projection was used to say what you want it to be in.  It would be advisable to physically project the data should you want to continue working in such coordinates.  You can as a poor workaround, set the projection of the data frame to the desired projection then get the X and Y coordinates  returned in the coordinates of the data frame.  It is one of the options when calculating geometry in the field calculator

0 Kudos
vegan_wiz
New Contributor III

Thank you. I have reprojected the data to NAD 83 Nevada East, as I was informed this is the correct CRS to use in my area. But nothing has changed, whether I enable CRS on the fly or not.

If no solid solution is found, I'm wondering if I can convert those decimal degrees to miles (with accurate results of course). I was looking up the conversion, and it appears to be 1 decimal degree of latitude is 69 miles, while 1 decimal degree of longitude is about 49 miles. Any advice if this is possible?

0 Kudos
DanPatterson_Retired
MVP Emeritus

In order to "Project" your data you need to

1  define the coordinate system of the original data which was probably in decimal degreed, perhaps a WGS84 or a NAD83 Geographic coordinate system

2  Once 'It" know what "it" is, then you used the Project tool in Arctoolbox to project the data, using the desired coordinate system....this will produce a new file

3  If you left the file in the same dataframe as it was originally it, that data frame has the old coordinate system, hence, the "good" data gets projected on the fly back to the "bad" coordinate system

4  To fix this...Insert, Data frame and add the "good" file into it...the first file that is added to a data frame sets the coordinate system for it...if everything worked as planned you should have your file

to summarize...a file needs to know what it is before you can make it something else...when you have made it into its new self, then add it to a new data frame...otherwise it will revert back...visually, but not physically....to its old wayward ways

vegan_wiz
New Contributor III

@Dan Patterson Okay, it's still not working. Here's what I did:

1. I produced a new file for each layer. I chose the NAD 83 HARN Nevada East State Plane, using the Transverse Mercator projection.

2. I started a NEW GIS project, and set the project the same projection and CRS as above.

3. I loaded the two new files in step 1.

4. I ran the distance analysis.

5. The attribute still shows "Distance" as decimals, such as 0.03.

0 Kudos
DanPatterson_Retired
MVP Emeritus

in step 1 does nothing but potentially make things worse.. If your explanation is correct, then you told the file that it is something that it isn't   Files are quite forgiving and will willingly accept anything regardless if it makes sense or not.

I produced a new file for each layer. I chose the NAD 83 HARN Nevada East State Plane, using the Transverse Mercator projection.

Go back to step 0...just add one file to a new project in a data frame with nothing else...don't define anything...except move your mouse around the screen and look at the coordinates.  If I guess wildly, your coordinates will appear in decimal degrees but it probably said that "this file doesn't have a coordinate system...blah blah ... and can't be projected" or similar, and warning was dismissed.  If you didn't get a message, then one of two things could be the case

1  it was defined correctly and your units are in decimal degrees and should make sense for your region

2  it was not defined correctly and your units don't make sense

Until you can resolve that issue, you can't proceed with the advise that I gave you in the previous post.

0 Kudos