Message Boards Message Boards

Avoid GeoNearest to timeout?

GROUPS:

This is the complete code that shows the issue:

GeoNearest["ZIPCode", GeoPosition[{40.11, -88.24}], {All, Quantity[5,"Miles"]}]

Error message: A network operation for Geonearest timed out. Please try again later.

Tried 10/8/2017 9:40 PM PDT

I am using the WOLFRAM PROGRAMMING LAB with a URL that starts with https://lab.wolframcloud.com

POSTED BY: Steve LaDuke
Answer
12 days ago

If you need All within a given radius, you may also try GeoEntities, which is faster:

GeoEntities[GeoDisk[GeoPosition[{40.11, -88.24}], Quantity[5, "Miles"]], "ZIPCode"]

{Entity["ZIPCode", "61824"], Entity["ZIPCode", "61825"], Entity["ZIPCode", "61801"], Entity["ZIPCode", "61874"], Entity["ZIPCode", "61802"], Entity["ZIPCode", "61821"], Entity["ZIPCode", "61822"], Entity["ZIPCode", "61803"], Entity["ZIPCode", "61820"], Entity["ZIPCode", "61826"]}
Answer
12 days ago

Which notebook is this from in the programming lab?

GeoNearest queries can be very complicated and take a massive amount of computation to do. This example looks difficult. Maybe there's a better example?

POSTED BY: Sean Clarke
Answer
12 days ago

It is not a standard notebook in the Programming lab. I was trying to duplicate the functionality of Wolfram | Alpha.

POSTED BY: Steve LaDuke
Answer
11 days ago

GeoEntities works for me.

Thank you.

POSTED BY: Steve LaDuke
Answer
11 days ago

Please see this post for a generalization of @Francisco's work around:

Simulating GeoNearest for ZIP codes around a geo path

http://community.wolfram.com/groups/-/m/t/1203815

POSTED BY: Vitaliy Kaurov
Answer
5 days ago

Group Abstract Group Abstract