<div dir="ltr"><div class="gmail_default" style="font-size:small">hello</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I am trying to calculate the distance from the schools to active faults and their lengths.</div><div class="gmail_default" style="font-size:small"> But then I tried to validate the some results and noticed that spatial query gave</div><div class="gmail_default" style="font-size:small">longer distances than checked values (in QGIS).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I used this sql fragment:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">~~~~~~~~~~~~~</div><div class="gmail_default"><div class="gmail_default">SELECT sOk.adi as adi,sFay.gid as faygid,sOk.gid as OkGid,sOk.bolgeno,sFay.fayadi,sOk.il,</div><div class="gmail_default"> sOk.ilce,sOk.jeo,</div><div class="gmail_default"> ST_Length(geography(sFay.the_geom))::numeric(10,2) as FayBoyu , sOk.the_geom as the_geom ,</div><div class="gmail_default"> ST_Distance( *****</div><div class="gmail_default"> geography(sOk.the_geom),</div><div class="gmail_default"> geography(sFay.the_geom)</div><div class="gmail_default"> ) ::numeric(10,2) AS distance </div><div class="gmail_default"> FROM sOkul_DepZon as sOk </div><div class="gmail_default"> JOIN sdirifay_4326 as sFay</div><div class="gmail_default"> ON ST_DWithin(</div><div class="gmail_default"> geography(sOk.the_geom),</div><div class="gmail_default"> geography(sFay.the_geom),</div><div class="gmail_default"> 120000) and (sFay.faytipi~'1' or sFay.faytipi~'2')</div><div style="font-size:small"><br></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">~~~~~~~~~~~~~</div><div><br></div><div><div style="font-size:small" class="gmail_default">Can you tell me what the likely mistakes are ?</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Ahmet Temiz</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">regards</div><br></div>-- <br><div class="gmail_signature">Ahmet Temiz<br>Jeoloji Müh.<br>Afet ve Acil Durum Yönetimi Başkanlığı<br>Planlama ve Zarar Azaltma Dairesi Başkanlığı<br><br><br>________________________<br><br>Ahmet Temiz<br>Geological Eng.<br>Information Systems - GIS Group<br>Disaster and Emergency Management<br>of Presidency</div>
</div>