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.

+1 vote
995 views
For some countries (e.g., France) geocaching.com does not provide county data. Project-GC has used some open source polygon data to be able to assign caches in these countries to a county nontheless. Now, if I want to create a Challenge Checker to figure out whether a cache is within a county, can I access the polygon data stored somewhere on the Project-GC servers using the GetJsonData() function. I am aware that lillfiluren's script GenericPolyChecker (http://project-gc.com/Challenges/GC2M3D4/1320) can use server-side stored data, but I have no idea how the county polygons of a country are called.
in Support and help by swirlynail (3.0k points)
It would be fantastic if there was a way to access all the standard polygons (and perhaps some additional ones like continents) as there are many challenges that need this information.

1 Answer

0 votes
I do not understand the need to have access to the polygons. The cache-data already has the counties assigned. I must be missing a point here.

Regarding how the GenericPolyChecker does it, is that lillfiluren has provided us with JSON data, that we store server side (well, the scripts are on the servers as well). This to avoid having 50 MB of data in the script, which makes the editor and saving slow. We can do this for anyone, it's just a way to store data that is needed for the script.

 

Regarding mole125's note. Having access to the polygon data itself isn't always practical. It can be many hundreds of megabytes for a country. We use as detailed polygons as we can. Here as well I would need a use case to actually understand the need.

We do not have any contintal polygons either, more or less not even for countries. We mostly have for regions and counties, which is what we have needed.

 

PS! We have on our list to upgrade the polygons for France when time allows. It's a bit tricky though.
by magma1447 (Admin) (243k points)
Thanks for answering. Well, aparently not every cache has the complete information. When I use PGC_GetFinds( profileId, { fields = {'gccode','country','region','county'} , filter = filter } ) (where the filter is on France), and check the data in the cache['county']-field these are empty. Thus, to me it seems there is no county information available to be used in checkers.

If I am right you do not keep a separate database for all caches in the world? You directly link to the geocaching.com-API? Or is there a way I can retrieve county information if the original cache listing does not contain that kind of information?
If the geocache does not have county information, it is not within a county (or close to) according to our polygon data. It may be that the geocache is in the ocean, or an island we do not cover, or that our data just is broken. Having our data would not help since it did not help us.

As mentioned, we have on our todo list to upgrade our polygon data for France. I can not remember the reasons though.

But if you find a geocache that has a blank county, check what geocache it is, what the coordinates are, and check on a map if you haven't done it. There may be good reasons. An extreme example is GC19GK9, it's Denmark. But try to allocate a county to that one.
Thanks again! I dug a bit deeper and found the error why I did not receive any county information. But indeed it is part of the cache data, which makes the Project-GC data even better than the geocaching.com data (which does not always has this information).

If I can be of any assistance with the data upgrade for France, please let me know. I speak French too (besides four other languages), ;)
We (normally) extract our polygon data from Openstreetmap. Our problem isn't the language itself, but sometimes the data is a bit broken. In this case we had issues with the OSM-servers we use to extract it. Got a lot of timeouts and gave up for the day. Those servers are very loaded sometimes. (we are not using the normal map-servers).

Then an issue we will have with France is that many of the islands that belongs to France are separate countries according to Groundspeak, things we will have to handle manually, so it's a lot of work sometimes.

Anyway, glad you found your issue, and thanks for offering assistance, even though it wasn't needed this time.
...