[pgrouting-users] question : Shortest Path Shooting star using python

bino oetomo bino at indoakses-online.com
Fri Feb 3 02:19:26 EST 2012


Dear Daniel and All

I try to reproject my base data to 900913, base on --> 
http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html

But When I try to finde nearest edge gid using query :
---Start---
SELECT gid, source, target, the_geom,
             distance(the_geom, GeometryFromText(
             'POINT(110.367753392 -7.7778816619)', 900913)) AS dist
             FROM "ways"
             WHERE the_geom && setsrid(
             'BOX3D(110.267753392 -7.8778816619,110.467753392 
-7.6778816619)'::box3d, 900913)
             ORDER BY dist LIMIT 1 ;
---Stop---
I got nothing

Since I still keep a copy of the original data at ways.the_geom_orig, i 
do the same query agains this column,
---Start--
SELECT gid, source, target, the_geom_orig,
             distance(the_geom_orig, GeometryFromText(
             'POINT(110.367753392 -7.7778816619)', 4326)) AS dist
             FROM "ways"
             WHERE the_geom_orig && setsrid(
             'BOX3D(110.267753392 -7.8778816619,110.467753392 
-7.6778816619)'::box3d, 4326)
             ORDER BY dist LIMIT 1 ;
---Stop---

I got '11690' as it's gid

Sincerely
-bino-

On 02/03/2012 01:36 PM, bino oetomo wrote:
> Dear Daniel and all
> On 02/03/2012 01:28 PM, Daniel Kastl wrote:
>>>
>>>
>>> How to add that projection to spatial_ref_sys ?
>>>
>> http://spatialreference.org/ref/epsg/3785/postgis/
>> You can use others like 900913, etc..
>>
> I also read 
> http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/Understandingandtestingthedata.html
>
> Hmmm .. I thing i will set kne blank database that have EPSG 900913, 
> and reload the OSM data using '-E 900913' option
>>
>>> Anyway .. my data is for indonesia are, and I want the unit is in 
>>> meter.
>>> What projection is the right one ?
>>>
>>>
>> There is no right or wrong one.
>> You use what your application requires. If you use Google Maps in
>> OpenLayers many people often use 900913.
>>
> I use OSM tiles ... but I want the calculation results in metre
>
> Sincerely
> -bino-
>
>> Daniel
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120203/7ec42610/attachment.html


More information about the Pgrouting-users mailing list