<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Dear Daniel and All<br>
<br>
I try to reproject my base data to 900913, base on -->
<a class="moz-txt-link-freetext" href="http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html">http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html</a><br>
<br>
But When I try to finde nearest edge gid using query :<br>
---Start---<br>
SELECT gid, source, target, the_geom, <br>
distance(the_geom, GeometryFromText(<br>
'POINT(110.367753392 -7.7778816619)', 900913)) AS dist <br>
FROM "ways" <br>
WHERE the_geom && setsrid(<br>
'BOX3D(110.267753392 -7.8778816619,110.467753392
-7.6778816619)'::box3d, 900913) <br>
ORDER BY dist LIMIT 1 ;<br>
---Stop---<br>
I got nothing<br>
<br>
Since I still keep a copy of the original data at
ways.the_geom_orig, i do the same query agains this column, <br>
---Start--<br>
SELECT gid, source, target, the_geom_orig, <br>
distance(the_geom_orig, GeometryFromText(<br>
'POINT(110.367753392 -7.7778816619)', 4326)) AS dist <br>
FROM "ways" <br>
WHERE the_geom_orig && setsrid(<br>
'BOX3D(110.267753392 -7.8778816619,110.467753392
-7.6778816619)'::box3d, 4326) <br>
ORDER BY dist LIMIT 1 ;<br>
---Stop---<br>
<br>
I got '11690' as it's gid<br>
<br>
Sincerely<br>
-bino-<br>
<br>
On 02/03/2012 01:36 PM, bino oetomo wrote:
<blockquote cite="mid:4F2B8073.9050008@indoakses-online.com"
type="cite">Dear Daniel and all
<br>
On 02/03/2012 01:28 PM, Daniel Kastl wrote:
<br>
<blockquote type="cite">
<blockquote type="cite">
<br>
<br>
How to add that projection to spatial_ref_sys ?
<br>
<br>
</blockquote>
<a class="moz-txt-link-freetext" href="http://spatialreference.org/ref/epsg/3785/postgis/">http://spatialreference.org/ref/epsg/3785/postgis/</a>
<br>
You can use others like 900913, etc..
<br>
<br>
</blockquote>
I also read
<a class="moz-txt-link-freetext" href="http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html">http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html</a><br>
<br>
Hmmm .. I thing i will set kne blank database that have EPSG
900913, and reload the OSM data using '-E 900913' option
<br>
<blockquote type="cite">
<br>
<blockquote type="cite">Anyway .. my data is for indonesia are,
and I want the unit is in meter.
<br>
What projection is the right one ?
<br>
<br>
<br>
</blockquote>
There is no right or wrong one.
<br>
You use what your application requires. If you use Google Maps
in
<br>
OpenLayers many people often use 900913.
<br>
<br>
</blockquote>
I use OSM tiles ... but I want the calculation results in metre
<br>
<br>
Sincerely
<br>
-bino-
<br>
<br>
<blockquote type="cite">Daniel
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________
<br>
Pgrouting-users mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
<br>
</blockquote>
<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Pgrouting-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
</blockquote>
<br>
</body>
</html>