Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to calculate the distance between points in layer with distance matrix tool. And keep getting strange results no matter what. Like this
MASTER ------------SLAVE ---------------- DISTANCE --------- SHOULD BE
Metrotown ---------Knox Mountain ------ 0.036069979------------ 48.2 km
Metrotown -------- Central --------------- 0.048071058------------- 29.3 km
Metrotown -------- Rosedale ------------ 0.050883421------------- 60.1 km
Metrotown -------- Kelowna -------------- 0.051697257------------ 340.4 km
Metrotown -------- Ocean Park --------- 0.054471001------------- 29.1 km
Metrotown -------- Langley -------------- 0.055017692------------- 18.7km



First my thought was that the distance is in degrees not in meters. So I tried different CMSs but it didn't change anything. Than I tried to duplicate layer and calculate distances between points between two layers. But nothing changed. NAD83 CMS gave me another unrealistic result ( smth like 5665565, 5675656, etc) Is it even possible? What CMS I should use?

I even tried to do this in postgis with ST_Distance and still getting same results.

Thank you!

share|improve this question

closed as too localized by whuber Dec 20 '12 at 3:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
See also gis.stackexchange.com/q/20291/7913 –  lynxlynxlynx Dec 19 '12 at 18:55
    
I saw this post. It didn't make things clearer. I tried k=2 it gives same irrelevant results. –  Vadim Dec 19 '12 at 19:24
    
Although this is, on the face of it, an exact duplicate of gis.stackexchange.com/q/20291/7913, I would urge leaving it open--at least in the meantime--because it is clear these distances are not in decimal degrees (they are too small); moreover, there is no apparent relationship at all between the numbers in the distance and should be columns: make a scatterplot and see! –  whuber Dec 19 '12 at 19:44

1 Answer 1

You may have to actually reproject your data to a new equidistant CMS, not just use the on-the-fly projection. Try that, and see if it helps!

share|improve this answer
    
It seems unlikely this problem is due to a choice of coordinate system: there is no consistent relationship between the true distances and the computed ones. Even if it happens to be fixed by reprojecting the data, that would not explain the bizarre results that have been obtained. –  whuber Dec 19 '12 at 19:45
    
I did reproject it to 4 different CMSs. Most of them showing absolutely same thing. One ( Nad 83 - UTM 10) shows another irrelevant results like 665565, 5675656, etc –  Vadim Dec 19 '12 at 19:49
1  
Ok. Looks like the layer is screwed up. I created test layer with 5 points and in NAD83 UTM 10 it's working fine. Thank you for your help. Not sure what to do with this layer now but probably it's not a common problem. Thank you for your help again –  Vadim Dec 19 '12 at 20:43

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