[jdev] Re: Driving/Routing directions via XMPP
Stephen Pendleton
spendleton at movsoftware.com
Tue Aug 17 09:10:39 CDT 2004
The way the commercial GIS routing systems work is they take in either
lat/lon values or an address which contains an "address line" (street), a
city, a country, a postal code (zip), a secondary city (which may address
the issue you raised) and a state/province (state). All of these elements
are optional, so you can choose not to enter a postal code, state, etc and
the GIS system will attempt to match.
Perhaps the following stanzas will work:
(note the absence of a state/province element for germany):
<iq
to='lbs at movsoftware.com/lbs'
from=' juliet at capulet.com/balcony'
type='get'
id='route1'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src addressline= 'Am Seestern 16' city='Dusseldorf' country='Germany'
postalcode='40547'/ >
<dst addressline= 'Langenberget Str 3' city='Dusseldorf'
country='Germany' postalcode='19117'/ >
</query>
</iq>
OR
<iq
to='lbs at movsoftware.com/lbs'
from=' juliet at capulet.com/balcony'
type='get'
id='route1'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src addressline= '4555 Main Street' city='Philadelphia' stateprovince =
'PA' postalcode='USA' code='19117'/ >
<dst addressline= '9000 West Elm Street' city='Philadelphia'
stateprovince = 'PA' postalcode='USA' code='19117'/ >
</query>
</iq>
-----Original Message-----
From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On Behalf Of
Gaston Dombiak
Sent: Tuesday, August 17, 2004 9:10 AM
To: jdev at jabber.org
Subject: [jdev] Re: Driving/Routing directions via XMPP
Stephen,
I really like this idea. Here are my 2 cents. You propose that the "src" and
"dst" elements will include the city, state and country attributes. From my
experience not all the countries split their information in the same form
and degree. For example, some countries do not have zip code!. For the cases
where you don't have a zip code you may need to go deeper than a city level.
Disclaimer: I'm definitely not a GIS expert (not even a newbie). Having
said that, I propose to have something like:
<src street= '4555 Main Street ' geolevel6='zzz' geolevel5='zzz'
geolevel4='zzz' geolevel3='zzz' geolevel2='zzz' country='USA' code='19117'/
>
where the geolevel* are optional. So your example will look like:
<src street= '4555 Main Street ' geolevel3='Philadelphia' geolevel2='PA'
country='USA' code='19117'/ >
Regards,
-- Gato
"Stephen Pendleton" <spendleton at movsoftware.com> wrote in message
news:009d01c483b5$59049bd0$6401a8c0 at movsoftware.com...
I am re-introducing a service that client developers may be interested in.
This service will deliver turn-by-turn routing information (similar to
MapQuest) between pairs of JID's (that have location information associated
with them by implementation of the GEOLOC JEP), or pairs of postal addresses
or latitude/longitude pairs. The service can be used by sending XMPP stanzas
to 'lbs at movsoftware.com/lbs'
Currently the system can return lists of text strings that describe each
segment of the route (e.g. "Turn left at Main Street") and a URL to an
associated gif graphic that displays the segment.
The proposed protocol is listed below, but I would like feedback on the
protocol before drafting a JEP. If you have any comments please let me know,
either by replying to the post - or sending me email directly.
Requesting and Returning Routing Information with XMPP
Entities can request routing information between two jids or two locations
specified by either latitude/longitude pairs or the postal address of the
endpoints.
Entity requests routing information between jids foo at jabber.org and
bar at jabber.org:
<iq
to='lbs at movsoftware.com/lbs'
from=' juliet at capulet.com/balcony'
type='get'
id='route1'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src jid='foo at jabber.org'/ >
<dst jid='bar at jabber.org'/>
</query>
</iq>
Entity requests routing information between latitude/longitude pairs
-37.34,-33.33 and -40.433, -20.222:
<iq
to='lbs at movsoftware.com/lbs'
from=' juliet at capulet.com/balcony'
type='get'
id='route1'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src lat='-37.24' lon='-33.33'/ >
<dst lat='-40.422' lon='-20.222'/>
</query>
</iq>
Entity requests routing information between postal address pairs 4555 Main
Street,Philadelphia PA,USA,19117 and 9000 West Elm Street,Philadelphia
PA,USA,19117 :
<iq
to='lbs at movsoftware.com/lbs'
from=' juliet at capulet.com/balcony'
type='get'
id='route1'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src street= '4555 Main Street ' city='Philadelphia' state = 'PA'
country='USA' code='19117'/ >
<dst street= '9000 West Elm Street ' city='Philadelphia' state = 'PA'
country='USA' code='19117'/ >
</query>
</iq>
Routing information is returned as a series of segments:
<iq type='result'
id='route1'
to='juliet at capulet.com/balcony'
from='lbs at movsoftware.com/lbs'>
<query xmlns='http://www.movsoftware.com/protocol/routing'>
<src jid='foo at jabber.org'/ >
<dst jid = 'bar at jabber.org'/>
<segment id = '1'>Depart Start on Chevy Chase Lake Dr (West)</segment>
<segment id = '2'>Turn RIGHT (North) onto SR-185 [Connecticut
Ave]</segment>
<segment id = '3'>Take Ramp (Right) onto I-495 [I-495
Outerloop]</segment>
<segment id = '4'>Turn RIGHT (South) onto S Sherwood Rd [Sherwood Rd]
</segment>
</query>
</iq>
Stephen Pendleton
mov Software
_______________________________________________
jdev mailing list
jdev at jabber.org
https://jabberstudio.org/mailman/listinfo/jdev
More information about the JDev
mailing list