Message Boards Message Boards

Avoid GeoNearest to timeout?

Posted 7 years ago

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
5 Replies

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"]}

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
Posted 7 years 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
Posted 7 years ago

GeoEntities works for me.

Thank you.

POSTED BY: Steve LaDuke

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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract