Return to Project-GC

Welcome to Project-GC Q&A. Ask questions and get answers from other Project-GC users.

If you get a good answer, click the checkbox on the left to select it as the best answer.

Upvote answers or questions that have helped you.

If you don't get clear answers, edit your question to make it clearer.

Can someone help me with checkers for my caches within a distance challenges.

0 votes
I have a few challenges and unchallenges that need checkers.

The first three are of the same style. (Existing Challenge Cache - huge project!) (unchallenge I hope to turn into a challenge) (unchallenge I hope to turn into a challenge)

Also, I have a quadrangle challenge for Kern County.

asked Apr 22, 2016 in (OBSOLETE) Checker requests by elrojo14 (140 points)
All can be done with the GenericPolyChecker.
You have to create polygons with the the border. There will be som work to create the borders. The within x miles from an object will result in circle segments that are not easy to represent with polygons. And to many points will result in slow checkers. So come compromise has to be made

If polygons are only created for the objects it will require a lot of new code to determine if a cache is inside a distance from the polygon. It is harder if the polygons are not a convex hull. It is probibly easier to create larger polygons offline

The last one is easiest to create. Just create squares with the correct  border coordinates. But notice that the datum on USGS topo maps are NAD27 and not WGS84 so the coordinates has to be converted
Target: Am I missing something? Can't for example the first challenge just be calculated using Haversine or Vincenty?
The problem is that the monument are not points but physical objects that are large
The cache has to be inside a distance from a monument.
#50 is  old aircraft carrier USS Hornet (CV-12) and a cache within 0.6 miles=695 meter. The carrier has a length of 266m and a with of 45m
To determine those requirements a polygon has to be generated with borders 695 m for the edge of the ship or a checker that uses the smal polygon to determine the distance. But code has to be created for distance to a polygon.

I see now that there are links for a point and caches within a radius. But that is not really what the rest of the challenges talk about.
There is a difference between 695 m from the center of the ship and 695 from the ship. In this case the difference along the ship would be 133 m or 19 % of the 695 m radius.

There are other monument that are larger but not as easy to get the exact size from wikipedia
70. Mare Island Naval Shipyard - Any Geocache within 2 Miles
112. San Francisco Port of Embarkation, U.S. Army - Any Geocache in the park boundaries or any Geocache within .75 miles

If the challenge is x mile form a point on ____ is is easy to do.
But is has to be combined with the polygon checker because some are on an island/in a park
Oh, I didn't click the links to see what it was.

The easy "fix" is then to redesign the challenge to use the center point, and maybe adjust some of the distances due to that.

The other alternative is what Target said. Map up the objects with polygons, which is a lot more work.
The vast majority of all the points are simple radius in a circle from a point. You don't have to worry about graphing that from all over an aircraft carrier. I picked a point I wanted the circle to start from, just use that.

There are only a few that say stick to the boundary of a park.
Then you should edit the desciption because that is not what is says in the descriptions
The cache is quite clear with the links what qualifies. It doesn't need to be as complicated as you are making given the distances set were set to make sure a variety of caches are included. So 600 feet on an aircraft carrier is not going to alter the outcome of the challenge given there are 4 caches within .6 miles.
I disagree that is clear. The text on the page says a monument and andy cache within x miles. There is not text that says that is is from the coordinates/cache that are linked.
It is not about making it complicated but following the requirements as discribled in the challenge. And you might read the text somewhat differently and more strict when you think how to translat them into code.

It is describes as "you may find any non-event Geocache within the specified radius of the NHL or in a specific set of boundaries. Event caches of any type do not count."
That referees to the National Historic landmark and not to the cache or coordinates you have choose.
If you added the text
"I have choose a coordinate or a cache for each NHL where the distance for qualifying caches are measured from"
Then i would agree that is is what you wanted.

I can modify the polygon checker to add radius around a point byt you have to create the configuration for the challenge. Because that is tedious work.
The script is at

The format is the same as on the page and the one you are going to use is
  "<polyname1>": {"polypoints":[[[lat1, lon1], [lat2,lon2], ... [latx, lonx]]]},
  "<polyname2>": {"polypoints":[[[lat1, lon1], [lat2,lon2], ... [latx, lonx]]]},
 I another will be added with unit as miles it your case
"<polyname1>": {"circle":[lat,lon,radius,"unit"]},

all coordinates are in decimal degrees.
The checkers cant get the coordinates of a cache so their current coordinates has to be used and be changed if they move
The checker has been extended and works for points checkes.
There is no map output yet.
It is probably easiest to create the polygons on
I added a crude polygon for Alcatraz  that can be loaded in the gsak poly editor that has to be refined.  
approprierat ][, can be added with search and replace in a text editor
My start is at

the config in the more readable for is below.
Notice that every "object" exept the last has a , after it.
The same for the polygons point [lat,lon] with , between them. There has to be [[ before and ]]} after

  "<polyname1>": {"polypoints":[[
[lat1, lon1], [lat2,lon2], ... [latx, lonx]

polygons for other areas has to be creates.
There is one limitation that i will not code for.
"Any Geocache in the park boundaries or absent that any Geocache within .75 miles"
Create then with a polygon that covers both alternatives use a circle that cover the whole park.
If you need help contact me. A mail i probibly better when the configs can be attached text files.

start config
"2. The Ahwahnee Hotel":{"point":[37.746203,-119.57456,1,"miles"]},

 "3. Alcatraz Island": {"polypoints":[[

"4. Alma (1891)":{"point":[37.809487,-122.421757,0.75,"miles"]},
"5. Angelus Temple":{"point":[34.076272,-118.261046,0.5,"miles"]}
I noticed that none have completed the challenge since 2014.
I would add a some light versions if it become possible with requirements of
25, 50 ,100 NHL.
I would guess that is is then easier for a cacher to start with the challenge.
I might have started with a 25 landmark challenge if i lived there and then continued with more.
But start searching caches on 142 caches all over California feels to hard and i would not start.
And if your goal if to get people to visits the landmarks that would motivate someone to start.

Please log in or register to answer this question.