1
$\begingroup$

I bought a Raspberry Pi, which introduced me to Mathematica, and I'm just diving in. I'm guessing my question is really a basic syntax question, but I don't know how to unravel it.

I thought I would play with the airport data to start with. I understand how to use GeoNearest to find nearby airports. But I would like to filter out heliports. The easiest way to do that is look for runway lengths greater than some value, lets say 2000 ft.

So...how can I get a list of Airport entities with a property of LongestRunwayLength>=2000 ft, and feed that list into the GeoNearest function to find the 5 closest such aiports to wherever specified?

Thanks!

$\endgroup$
  • $\begingroup$ Can't get it to work, but it should be something like: GeoNearest[EntityClass[ "Airport", "LongestRunwayLength" -> Quantity[Interval[{500, 50000}], "Meters"] ], Here, 5] (meters could be replaced by feet.) Check out the documentation for Entity to read more about implicit entities, which is key here. $\endgroup$ – C. E. Nov 13 '16 at 2:48
  • $\begingroup$ Perhaps something like this might be a way to go: Select[GeoNearest["Airport",Santa Barbara (city),{All,Quantity[100,"Miles"]}],!StringContainsQ[#["Name"],"Heli"]&] $\endgroup$ – Dave Nov 13 '16 at 2:59
  • $\begingroup$ Select[GeoNearest["Airport",Santa Barbara (city),{All,Quantity[100,"Miles"]}],!StringContainsQ[#["Name"],{"Heli","Blimp","Amphibious"}]&] $\endgroup$ – Dave Nov 13 '16 at 3:18
  • $\begingroup$ More along your use of runway length, however I am not sure an easy way to assure getting 5 results for any location. As you expand search radius you possible get more airports, but plenty of places on Earth where radius would have to be very large to get 5 results of any kind: Take[Select[GeoNearest["Airport",Santa Barbara (city),{All,Quantity[30,"Miles"]}],#["LongestRunwayLength"]> Quantity[2000., "Feet"]&],UpTo[5]] $\endgroup$ – Dave Nov 13 '16 at 4:28
  • $\begingroup$ @Dave, isn't that how GeoNearest works? You specify a count and you get x nearest, no matter the distance? To both of you, thanks for the guidance. Hopefully I'll pick it up tonight or tomorrow night. @ C.E., that syntax is interesting, and matches how I was guessing it might work. How do I think about / read the -> operator? $\endgroup$ – Brian Nov 13 '16 at 23:24

Your Answer

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

Browse other questions tagged or ask your own question.