[WIP] Remove references to global GeoAdmin in API

**Don't merge this**

The API relied on global variables being defined. This PR removes the need for this variables. The effect of this can be seen in chsdi3 project, where I'll open a PR soon.