Can PostGIS do Route optimization / shortest pass

View: New views
9 Messages — Rating Filter:   Alert me  

Can PostGIS do Route optimization / shortest pass

by Fdu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there route optimization functionality in PostGIS? Given starting point and end point (assume there is street center line in database), does PostGIS have any existing function which can calculate shortest route (in time or distance)? If it does, what kind of information I can get from it? Such as total route time, route length, and route description, points/polylines which make the route?

Thanks in advance for any help.
Fay

Re: Can PostGIS do Route optimization / shortest pass

by Frank Warmerdam-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/6/06, Fdu (sent by Nabble.com) <lists@...> wrote:
>  Is there route optimization functionality in PostGIS? Given starting point
> and end point (assume there is street center line in database), does PostGIS
> have any existing function which can calculate shortest route (in time or
> distance)? If it does, what kind of information I can get from it? Such as
> total route time, route length, and route description, points/polylines
> which make the route?

Fay,

I'm sure others know lots more about this than me, but
you can find a routing module at:

  http://www.cartoweb.org/contribs.html

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Can PostGIS do Route optimization / shortest pass

by Guillaume Sueur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

maybe you can find something here : http://www.cartoweb.org/contribs.html

but I've never tested it.
I would appreciate your feedback if you test it.

Thanks

Fdu (sent by Nabble.com) a écrit :

> Is there route optimization functionality in PostGIS? Given starting
> point and end point (assume there is street center line in database),
> does PostGIS have any existing function which can calculate shortest
> route (in time or distance)? If it does, what kind of information I can
> get from it? Such as total route time, route length, and route
> description, points/polylines which make the route?
>
> Thanks in advance for any help.
> Fay
>
> ------------------------------------------------------------------------
> View this message in context: Can PostGIS do Route optimization /
> shortest pass
> <http://www.nabble.com/Can-PostGIS-do-Route-optimization-shortest-pass-t864769.html#a2242706>
> Sent from the PostGIS - User
> <http://www.nabble.com/PostGIS---User-f1223.html> forum at Nabble.com.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users

--
---------------------------
Guillaume SUEUR
GEOSIGNAL - Groupe BVA
25bis Avenue Marcel Dassault
31505 TOULOUSE CEDEX 5
----------------------------

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

distance() Unit's

by Adam-44 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm finding all the cities within a certian distance using the DISTANCE
function.

What is the unit of measurement for the distance?
Can it be set to miles or feet?

I checked the documentation but didn't find anything.

geo=# SELECT name FROM city_locations WHERE distance (the_geom,
'POINT( -88.0501 41.8616 )' ) < 0.1;
       name
------------------
 Addison
 Glendale Heights
 Carol Stream
 Villa Park
 North Glen Ellyn
 Lombard
 Glen Ellyn
 York Center
 Wheaton
 Oakbrook Terrace
 Highland Hills
 Valley View
 Downers Grove
 Westmont
 Lisle
(15 rows)

geo=#

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: distance() Unit's

by Alex Mayrhofer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adam wrote:
> I'm finding all the cities within a certian distance using the DISTANCE
> function.
>
> What is the unit of measurement for the distance?
> Can it be set to miles or feet?

Hi Adam,

the units of the result are the units of the original data. If you are using
lat/lon data, the results will be in those "latlon" units (which means that
the actual distance will vary by latitude).

> I checked the documentation but didn't find anything.
>
> geo=# SELECT name FROM city_locations WHERE distance (the_geom, 'POINT(
> -88.0501 41.8616 )' ) < 0.1;

If you need "proper" distances you will either need to reproject the map
data from lat/lon, eg. into UTM. See the documentation about transform() on
how to do this.

Or: you may also want to look into the "distance_sphere()" and
"distance_spheroid()" functions - a query using this would probably look like

SELECT name, distance_sphere(the_geom, 'POINT(-88.0501 41.8616)') FROM
city_locations WHERE expand('POINT(-88.0501 41.8616)', 0.1) && the_geom AND
distance_sphere(the_geom, 'POINT(-88.0501 41.8616)') < 1000;

(disclaimer: untested - should return all cities less than 1000 meters from
the given POINT - you need to check the expand() distance for it's relations
to the maximum distance... This would also make use of on index over the_geom)

cheers

alex mayrhofer
--
http://nona.net/features/map/
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Can PostGIS do Route optimization / shortest pass

by Chris Matheson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Frank Warmerdam wrote:

>On 1/6/06, Fdu (sent by Nabble.com) <lists@...> wrote:
>  
>
>> Is there route optimization functionality in PostGIS? Given starting point
>>and end point (assume there is street center line in database), does PostGIS
>>have any existing function which can calculate shortest route (in time or
>>distance)? If it does, what kind of information I can get from it? Such as
>>total route time, route length, and route description, points/polylines
>>which make the route?
>>    
>>
>
>Fay,
>
>I'm sure others know lots more about this than me, but
>you can find a routing module at:
>
>  http://www.cartoweb.org/contribs.html
>
>Best regards,
>--
>---------------------------------------+--------------------------------------
>I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@...
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent
>_______________________________________________
>postgis-users mailing list
>postgis-users@...
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>  
>

Does anyone know of something similar for versions of PostgreSQL before
8.0 (specifically 7.4.8)?

Chris M.
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Can PostGIS do Route optimization / shortest pass

by Daniel-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We choose to use recent postgis to implement these feature, but a
backport to older versions was considered: it is possible by modifying
the C source code (a good c++ skill is required)

dF

Chris Matheson wrote:

> Frank Warmerdam wrote:
>
>> On 1/6/06, Fdu (sent by Nabble.com) <lists@...> wrote:
>>  
>>
>>> Is there route optimization functionality in PostGIS? Given starting
>>> point
>>> and end point (assume there is street center line in database), does
>>> PostGIS
>>> have any existing function which can calculate shortest route (in
>>> time or
>>> distance)? If it does, what kind of information I can get from it?
>>> Such as
>>> total route time, route length, and route description, points/polylines
>>> which make the route?
>>>  
>>
>>
>> Fay,
>>
>> I'm sure others know lots more about this than me, but
>> you can find a routing module at:
>>
>>  http://www.cartoweb.org/contribs.html
>>
>> Best regards,
>> --
>> ---------------------------------------+--------------------------------------
>>
>> I set the clouds in motion - turn up   | Frank Warmerdam,
>> warmerdam@...
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush    | Geospatial Programmer for Rent
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users@...
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>>
>>  
>>
>
> Does anyone know of something similar for versions of PostgreSQL
> before 8.0 (specifically 7.4.8)?
>
> Chris M.
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users


[daniel.faivre.vcf]

begin:vcard
fn:Daniel FAIVRE
n:FAIVRE;Daniel
org:Camptocamp France SAS
adr:BP 352;;Savoie Technolac;Le Bourget du Lac;;73377;FRANCE
email;internet:daniel.faivre@...
title;quoted-printable:Expert en g=C3=A9omatique
tel;work:+33 4 79 44 44 95
tel;cell:+33 6 83 29 92 67
x-mozilla-html:FALSE
version:2.1
end:vcard



_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Can PostGIS do Route optimization / shortest pass

by alex bodnaru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i would suggest backporting the cited program to work with postgresql
7.4 too.

alex

Chris Matheson wrote:

> Frank Warmerdam wrote:
>
>> On 1/6/06, Fdu (sent by Nabble.com) <lists@...> wrote:
>>  
>>
>>> Is there route optimization functionality in PostGIS? Given starting
>>> point
>>> and end point (assume there is street center line in database), does
>>> PostGIS
>>> have any existing function which can calculate shortest route (in
>>> time or
>>> distance)? If it does, what kind of information I can get from it?
>>> Such as
>>> total route time, route length, and route description, points/polylines
>>> which make the route?
>>>  
>>
>>
>> Fay,
>>
>> I'm sure others know lots more about this than me, but
>> you can find a routing module at:
>>
>>  http://www.cartoweb.org/contribs.html
>>
>> Best regards,
>> --
>> ---------------------------------------+--------------------------------------
>>
>> I set the clouds in motion - turn up   | Frank Warmerdam,
>> warmerdam@...
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush    | Geospatial Programmer for Rent
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users@...
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>>
>>  
>>
>
> Does anyone know of something similar for versions of PostgreSQL before
> 8.0 (specifically 7.4.8)?
>
> Chris M.
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Can PostGIS do Route optimization / shortest pass

by alex bodnaru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

while that would be my first try at postgresql internals, i would like
to help.

alex

Daniel wrote:

> We choose to use recent postgis to implement these feature, but a
> backport to older versions was considered: it is possible by modifying
> the C source code (a good c++ skill is required)
>
> dF
>
> Chris Matheson wrote:
>
>> Frank Warmerdam wrote:
>>
>>> On 1/6/06, Fdu (sent by Nabble.com) <lists@...> wrote:
>>>  
>>>
>>>> Is there route optimization functionality in PostGIS? Given starting
>>>> point
>>>> and end point (assume there is street center line in database), does
>>>> PostGIS
>>>> have any existing function which can calculate shortest route (in
>>>> time or
>>>> distance)? If it does, what kind of information I can get from it?
>>>> Such as
>>>> total route time, route length, and route description, points/polylines
>>>> which make the route?
>>>>  
>>>
>>>
>>>
>>> Fay,
>>>
>>> I'm sure others know lots more about this than me, but
>>> you can find a routing module at:
>>>
>>>  http://www.cartoweb.org/contribs.html
>>>
>>> Best regards,
>>> --
>>> ---------------------------------------+--------------------------------------
>>>
>>> I set the clouds in motion - turn up   | Frank Warmerdam,
>>> warmerdam@...
>>> light and sound - activate the windows | http://pobox.com/~warmerdam
>>> and watch the world go round - Rush    | Geospatial Programmer for Rent
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users@...
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>>  
>>>
>>
>> Does anyone know of something similar for versions of PostgreSQL
>> before 8.0 (specifically 7.4.8)?
>>
>> Chris M.
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users@...
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users