<!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>
I really appreciate your enlightment<br>
On 02/03/2012 11:18 AM, Daniel Kastl wrote:
<blockquote
cite="mid:CABXBSH_bgg59YTVmnVVHx7-4LctkX6oyPKiwddR2kpOqKJHTdg@mail.gmail.com"
type="cite"><br>
<pre wrap="">
The unit is the unit of your projection. It's probably degree in your case.
</pre>
</blockquote>
<br>
<blockquote
cite="mid:CABXBSH_bgg59YTVmnVVHx7-4LctkX6oyPKiwddR2kpOqKJHTdg@mail.gmail.com"
type="cite">
<pre wrap="">You can transform your projection for example to some meter projection like
"World Mercator" (ie. EPSG:3785).
Then length(geometry) will be in meter.
Like "SELECT length(ST_transform(<geometry column>,3785)) AS meter FROM
<table>".
</pre>
</blockquote>
<br>
I tried to change the query to :<br>
---START----<br>
SELECT rt.gid, ST_AsGeoJSON(rt.the_geom) AS geojson, <br>
length(ST_transform(rt.the_geom,3785)) AS length, ways.gid <br>
FROM "ways", <br>
(SELECT gid, the_geom <br>
FROM shootingstar_sp(<br>
'ways',<br>
195690, 11690,<br>
0.1, 'length', true, true)<br>
) as rt <br>
WHERE ways.gid=rt.gid;<br>
----STOP----<br>
<br>
but I got error, looks like that '3785' is not listed in
'spatial_ref_sys' :<br>
---Start---<br>
Traceback (most recent call last):<br>
File "routecalc01a.py", line 21, in <module><br>
cur.execute(mysqlquery)<br>
psycopg2.InternalError: AddToPROJ4SRSCache: Cannot find SRID (3785)
in spatial_ref_sys<br>
----stop---<br>
<br>
How to add that projection to spatial_ref_sys ?<br>
Anyway .. my data is for indonesia are, and I want the unit is in
meter. What projection is the right one ?<br>
<br>
Sincerely<br>
-bino-<br>
<br>
<br>
<blockquote
cite="mid:CABXBSH_bgg59YTVmnVVHx7-4LctkX6oyPKiwddR2kpOqKJHTdg@mail.gmail.com"
type="cite">
<pre wrap="">Daniel
</pre>
<blockquote type="cite">
<pre wrap="">
Note : When I try to count the route using same start Lat/Lon and end
lat/lon, google map said it was about 2.1 km
Sincerely
-bino-
______________________________**_________________
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-rfc2396E" 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><a class="moz-txt-link-rfc2396E" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"><http://lists.osgeo.org/mailman/listinfo/pgrouting-users></a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<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>