2
$\begingroup$

It is possible for some commuters to track the location of their bus, train or tram through a personalised GPS tracking device (e.g.see this).

My question is can the FindGeoLocation[entity] be used to do this using the latest version 10? What can be substituted for "entity", and can one also obtain information on the location of the nearest shopping center, public school, hospital or other mentionable utilities relative to the user's coordinate location using this command in version 10?

$\endgroup$
5
$\begingroup$

Answering the first part of your question, is it possible to track the public transportation in your area.

This might be possible if your public transportation system provides access to real time information.

For this toy example, we'll use Portland,Oregon's resources.

You can obtain an AppID for trying this out

http://developer.trimet.org/

For the mathematica side of things, I used the answer from @rm-rf to easily convert JSON data to a Dataset (just to demo the dataset functionality a bit.

Needs["GeneralUtilities`"]
Dynamic[dataset = 
  Dataset[ToAssociations@
    Import["http://developer.trimet.org/beta/v2/vehicles/AppId/your_\
AppID_here", "JSON"][[1, 2, 1, 2]]];
 GeoGraphics@
  GeoMarker@
   Normal[{#[[1]], #[[2]]} & /@ 
     dataset[Select[(#type == "rail") &], {"latitude", "longitude"}]],
  UpdateInterval -> 10]

Portland Rail Saturday Morning

$\endgroup$
2
$\begingroup$

You can find entities using either GeoEntities or GeoNearest. For example:

GeoEntities[$GeoLocationCity, "Airport"]

enter image description here

Map[
  {#, GeoDistance[$GeoLocation, #]}&,
  GeoNearest["University", $GeoLocation, 10]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.