0

I am facing a challenge in crafting an overpass query to identify points of interest (POIs) such as hospitals and schools within a specific zipcode. Despite my attempts with the following query:

[out:json];
(
  node["amenity"="hospital"](34.0522,-118.2437,34.0622,-118.2337)["postal_code"="90005"];
  node["amenity"="hospital"](34.0485,-118.2923,34.0585,-118.2823)["postal_code"="90006"];
  node["amenity"="hospital"](34.0122,-118.3365,34.0222,-118.3265)["postal_code"="90008"];
);

out center;

It seems to be ineffective for my purpose. I would appreciate assistance in refining this query or exploring alternative approaches to achieve the desired outcome.

7
  • 1
    What do you mean by "ineffective for my purpose"? Does it work, or doesn't it? What happens? Commented Feb 22, 2024 at 6:33
  • That's not very helpful. What DOES happen? Commented Feb 22, 2024 at 7:40
  • The overpass query yields: json { "version": 0.6, "generator": "Overpass API 0.7.61.5 4133829e", "osm3s": { "timestamp_osm_base": "2024-02-22T07:59:00Z", "copyright": "Data from www.openstreetmap.org, available under ODbL." }, "elements": [] } Initially, I thought it lacked data, so I broadened the search for all amenities, even with extra locations. However, results persistently show no relevant amenities data. Seeking advice to resolve or explore alternatives. @TimRoberts Commented Feb 22, 2024 at 8:05
  • Your bounding rectangle is only 0.6 miles square. Are you sure there's a hospital in there? Commented Feb 22, 2024 at 19:01
  • I appreciate you informing me that my query only encompasses a distance of 0.6 miles, as you mentioned. Commented Feb 23, 2024 at 3:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.