<html>
<head>
<title></title>
<meta content="MSHTML 6.00.2900.5726" name="GENERATOR"></meta>
</head>
<body>
<div>Hallo </div>
<div> </div>
<div>If you are just working with distances of 1/4 of a mile I guess it would be easier to work in meters. </div>
<div>If you have a srid with the unit meters you could do something like this I guess</div>
<div> </div>
<div>select st_Z(a.the_geom)-st_Z(b.the_geom) from (select user_input_point) a, (select the_geom from the_point_dataset) b</div>
<div>where st_dwithin(a.the_geom,b.the_geom,400(or the exact number in meters of 1/4 of a mile))</div>
<div> </div>
<div>I don't know if st_dwithin consider the third dimension or just calculate from 2d</div>
<div> </div>
<div>Hope this helps</div>
<div> </div>
<div>Nicklas</div>
<div> </div>
<div><br />
<br />
2009-03-10 MWilson Matthew wrote:<br />
<br />
></div>
<div>
<p>Good evening,</p>
<p> </p>
<p> Im a total postGIS newbie and Ive done some searching but I havent found an answer yet.</p>
<p> </p>
<p> </p>
<p> </p>
<p> Ive found and tried using the st_distance_spheroid function, and that seems to return a result as I would expect. However, I have a project where my goal is to determine what points fall within ¼ mile of a point that a user would specify as well as determining the elevation difference to the selected points from the user specified point.</p>
<p> </p>
<p> </p>
<p> </p>
<p> Ive defined my geometry field with the Z value that weve pre-calculated, and that seems to show up properly when looking at the values using the st_AsEWKT function.</p>
<p> </p>
<p> </p>
<p> </p>
<p> I was initially thinking I would have to generate a line object for the two points in question using ST_Makeline, use that distance with the st_length3d_spheroid function to compare with the 2d distance returned by st_distance_spheroid and calculate for the other side of the triangle to get the elevation difference, but that doesnt seem to match the elevation numbers I have.</p>
<p> </p>
<p> </p>
<p> </p>
<p> I did have to transform everything into latlong to get the distance functions to workbut I have a feeling that Im over thinking this. There should be some kind of function to return the Z value difference between two geometries right? </p>
<p> </p>
<p> </p>
<p> </p>
<p> Could someone please point me in that direction?</p>
<p> </p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Matthew</p>
<p> </p></div>
</body>
</html>