Question: Possible to get catch place of Pokémon?
Description: Is it possible to get the catched coordinates (lat, lng) of Pokémon? E. g. I can get the catch date and time but could not figure out how to get the catch position.
Pokemon pest;
List<Pokemon> pokemons = go.getInventories().getPokebank().getPokemons();
//....
pest.getCreationTimeMs()
//How to get catch place (lat, lng)?
Version: latest
As far as I know, the latitude and longitude that the Pokémon was caught at is not stored. Looks like the cell id it was caught in is, so I'd imagine that is what is used to show the place at which the Pokémon was caught in the official app. I am not sure how cell positions are incorporated into their ids.
Maybe this is a breadcrumb to the solution: https://www.npmjs.com/package/s2-geometry
@clangdev S2 helper functions are already included
https://github.com/Grover-c13/PokeGOAPI-Java/tree/3c8a56fd183182d27856922f697324f702c0984b/library/src/main/java/com/pokegoapi/google/common/geometry
And yes: caught pokemon have a cell ID stored and converting that to a boundingbox is easy with those functions (or cheat and show an actual lat/lng)
Ok, thx. Looks like this issue died some 23 days ago. I personally do not need that. Close, anyone?
I would say: don't close as the issue is not actually resolved, but looking the code PokemonDetails does have a public getCapturedS2CellId(), so this was never an issue in the first place.
Closing