turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Regional Groups
- /
- SAS Global Forum 2017
- /
- Re: Who's traveling the furthest?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page

This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 11:21 AM

I'm coming from Dallas, Texas - however #SASGF is international - would love to know where you are coming from!

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 11:22 AM

I'm also coming from Dallas, so we'll have to measure distance from the airport to break the tie

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 11:33 AM

I'm in the east side of dallas - so a good 30m drive it seems like ona good day to airport, lol.

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 11:30 AM

I am coming from Ottawa Ontario Canada 1208 miles by plane.

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 12:30 PM

I'm heading in from Portland, Maine 1212 miles. Can't wait to get some sunshine !

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 01:13 PM

Seattle, so pretty-much clear across the country.....

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 01:24 PM

On the way to and from Anchorage i will fly through the other Portland (OR) and back through Seattle. Alaska airlines says it is 4067 miles to Orlando. More importantly about 9 hours sitting in a plane.

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 01:44 PM

Germany Cologne......big ride across the pond....

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 01:35 PM

Fellow SGF17-ers,

Well, it's not me because I am simply sliding a sly 780 miles down the East Coast from Washington, DC to Orlando.

Here is the SAS program I used to calculate my tripage:

** data** gointoorlando;

orlando_dist = put(zipcitydistance(**20850**,**32830**),comma.);

label orlando_dist = "My Travel Distance from Rockville to Orlando";

** run**;

** proc** **print** noobs data=gointoorlando label;

** run**;

Those of you in the continental US of A might want to consider using this SAS-centric way of measuring your trip distance instead of employing Mr. GoogleMaps. Others might consider using the GEODIST function, which I cover in this SAS Hack that I wrote for the SGF that took place in Seattle:

http://michaelraithel.blogspot.com/2016/11/hack-42-calculating-geodetic-distances.html

...and while you are at it, change the unit of measure to Kilometers. Miles; Kilometers; what's a few klicks between friends?!?!?:-)

Best of luck in all your SAS endeavors!

----MMMMIIIIKKKKEEEE

(aka Michael A. Raithel)

Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0

----MMMMIIIIKKKKEEEE

(aka Michael A. Raithel)

Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 02:44 PM

I'll win if the pilot gets confused and thinks that flying over the north pole will save time.

Most direct route from Toronto: 1,052 miles.

Least direct (but still straight line) route: 23,530 miles

Art, CEO, AnalystFinder.com

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 03:06 PM

not me

from London, UK

(approx 4,500 miles from home to Swan and Dolfin resort, as calculated by google earth)

won't be furthest

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 03:42 PM

I could try and calculate the travel distance from Amsterdam to The Dolphin but would only make our Metacoda friends from Oz laugh.

- Jan

- Jan

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 04:46 PM

Funny @jklaverstijn - Although, I sleep on the plane so it doesn't seem that long/far... not the case for @PaulHomes who read and watched many movies.

Thought I'd calculate our Brisbane-Sydney-Dallas-Orlando trip.

- Brisbane-Sydney 1.5hr flight -1000km
- Sydney-Dallas 15.5hr flight ~13,800km (on the A380 - probably no longer the longest flight today)
- Dallas-Orlando 2.5hr flight ~1,750km

Total ~20hrs flight time ~30hrs travel time and ~16,550km/~10,300miles

A long day considering we left home at 6am Tuesday morning and will arrive at the hotel around 10pm Tuesday night.

#WorthIt!!!

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-28-2017 10:38 PM

not me

from Beijing, China ~20 hours travel time / 7584 miles

Highlighted
##### Re: Who's traveling the furthest?

Options

- Mark as New
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

on 03-29-2017 12:19 PM

This made me curious. Where would be the furthest place someone could travel to SGF17 from?

```
proc fcmp outlib=work.func.geo;
function radians(deg) group='Geospatial' label='Convert degrees to radians';
return ((deg/180)*constant('PI'));
endsub;
function degrees(rad) group='Geospatial' label='Convert radians to degrees';
return ((rad/constant('PI'))*180);
endsub;
function disrad(d, option $) group='Geospatial' label='Convert distance to unit';
if option='nm'
then return ((d*180*60)/constant('PI'));
if option='km'
then return ((d*180*60*1.852)/constant('PI'));
if option='miles'
then return ((d*180*60*1.150779)/constant('PI'));
endsub;
function antipodal(lat1, lon1, lat2, lon2) group='Geospatial' ;
tol=1e-9;
diflat=abs(lat1 - lat2);
diflon=abs(lon1 + lon2);
return ((diflat < tol) & (abs(mod(diflon,360)-180) < tol));
endsub;
function gcDistance(lat1, lon1, lat2, lon2) group='Geospatial' label='Great Circle Distance in Radians';
return (2*arsin(sqrt((sin((lat1-lat2)/2))**2 + cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))**2)));
endsub;
subroutine gcIntermediate(lat1, lon1, lat2, lon2, f, lat, lon) group='Geospatial' label='Calculate intermediate points along a fractional point along a Great Circle route';
outargs lat, lon;
if (antipodal(lat1, lon1, lat2, lon2))
then return;
if (lat1=lat2 and lon1=lon2)
then return;
d=gcDistance(lat1,lon1,lat2,lon2);
A=sin((1-f)*d)/sin(d);
B=sin(f*d)/sin(d);
x=A*cos(lat1)*cos(lon1) + B*cos(lat2)*cos(lon2);
y=A*cos(lat1)*sin(lon1) + B*cos(lat2)*sin(lon2);
z=A*sin(lat1) + B*sin(lat2);
lat=atan2(z,sqrt(x**2+y**2));
lon=atan2(y,x);
endsub;
quit;
options cmplib=(work.func);
data map;
set mapsgfk.world(drop=x y);
where cont^=97 and density<2;
x=radians(long);
y=radians(lat);
run;
proc gproject data=map out=right dupok project=none
longmin=0 longmax=4;
id id;
run;
proc gproject data=map out=left dupok project=none
longmin=-4 longmax=0;
id id;
run;
data right;
set right;
segment=segment+5000;
x=x-constant('PI')*2;
run;
data pmap;
set right left;
run;
proc gproject data=pmap out=pmap parmin=mapsgfk.projparm parmentry=world norangecheck radians parmout=work.projparm;
id id;
run;
data orlando_dist;
set mapsgfk.world_cities(rename=(lat=_lat long=_long) where=(city='Orlando' and MapIDName1='Florida'));
_lat=radians(_lat);
_long=radians(_long);
do until(done);
set mapsgfk.world_cities(where=(prxmatch('/^cities_/o',CtType))) end=done;
lat=radians(lat);
long=radians(long);
dist_km=disrad(gcDistance(_lat,_long,lat,long),'km');
geod_km=geodist(_lat,_long,lat,long,'rk');
output;
end;
run;
ods select none;
ods output ExtremeObs=orlando_dist_max(keep=high city_high MapIDName1_high idname_high lat_high long_high _lat_high _long_high rename=(high=distance lat_high=lat1 long_high=lon1 _lat_high=lat2 _long_high=lon2));
proc univariate data=orlando_dist nextrobs=1;
var dist_km;
id city idname MapIDName1 lat long _lat _long;
run;quit;
ods exclude none;
data orlando_dist;
set orlando_dist_max end=done;
f=0;
y=lat1;
x=lon1;
output;
do f=0.01 to 0.99 by 0.01;
call gcIntermediate(lat1,lon1,lat2,lon2,f,y,x);
output;
end;
f=1;
y=lat2;
x=lon2;
output;
run;
data orlando_dist;
length id $15;
set orlando_dist;
if x>0 then x=x-constant('PI')*2;
id=cats('gcD',int(distance));
run;
proc gproject data=orlando_dist out=orlando_dist parmin=mapsgfk.projparm parmentry=world norangecheck radians;
id id;
run;
data anno;
length function color $8 style $12 html $300;
retain xsys ysys '2' hsys '3' line 1 anno_flag 1 when 'a';
set orlando_dist;
by id notsorted;
if first.id then do;
function='move'; output;
end;
else do;
function='draw'; size=.25; color='red'; output;
end;
run;
proc print data=orlando_dist_max label;
title 'Furthest Great Circle Distance to Orlando, FL';
footnote 'Location data from mapsgfk.world_cities';
id CITY_High IDNAME_High;
var distance;
label IDNAME_High='Country' CITY_High='City' distance='Distance (km)';
run;
proc gmap map=pmap data=pmap anno=anno;
title 'Great Circle Route Map';
id id;
choro id / levels=1 nolegend des='';
run;
quit;
```

Now, obviously, there are a lot of assumptions here about how people are traveling, etc... but, it's just for fun. The map definitely deserves some better annotation as well, but I've been wanting to write something for displaying great circle routes for a while, so that's what I've done.

City | Country | Distance (km) |
---|---|---|

Geraldton | Australia | 18442.7 |