# Maps: Does calculating distance between 2 points element in altitude?

Does Postgres' Spatial wordpress plugin, or any Spatial package for your manner, element in the altitude when calculating the length between 2 points?

I understand the Spatial packages element in the approximate curvature of the world but when one location is towards the top of a mountain and also the other location is near to the ocean - it appears such as the calculated distinction between individuals two points would greatly vary when the difference in altitude wasn't considered into consideration.

Also bear in mind when I've 2 points are in exactly the same sea altitude but a mountain is available between your 2 points - the length package should take into account this.

Individuals factors aren't being counted whatsoever. Why? The program only is aware of the 2 features (the 2 points you are receiving the length, the sphere/spheroid along with a datum/projection factor).

For your to occur you have to most likely make use of a developed linestring, that you will connect your point with n vertices, all of them being Z aware.

Picture this (loose WKT): LINESTRING((,1,2),(,2,3),(,3,4),(,10,15),(,11,-1)).

Asking the program to calculate the length in between each vertex and summing up, will think about the versions of terrain. But without something of that nature, it's impossible to map for problems in terrain.

All GIS softwares cannot tell, on their own, what exactly are individuals problems in terrain, and for that reason, require them in account.

You may create such linestrings (instantly) with softwares like ArcGIS (yet others), utilizing a line (between two points), along with a surface file, like the ones provided freely by NASA (SRTM project). These files are available in a raster format, and every pixel includes a X Y and Z value, in meters. Crossing the road you would like, combined with this terrain profile, you are able to attain the calculation you need to achieve. If you want to have super extra precise information, you'll need a precise surface, and precise Z values in every vertex of the profile line.

That removed up?

When the distance formula you are using doesn't go ahead and take altitude of these two points as parameters (additionally towards the Latitudes and Longitudes of these two points), then it doesn't element in altitude towards the distance calculation. The point is, altitude difference doesn't have a really important effect on calculated distance.

As always with Gps navigation, the main difference in distance information that altitude will make is most likely more compact compared to error in many commercial Gps navigation products anyway, so in many programs altitude could be securely distributed with (altitude dimensions are pretty inaccurate with commercial Gps navigation products, although survey data on altitudes is very accurate).