Can someone please explain to me the meaning of the x axis range retrieved using RangeX for geospatial data?
import geoviews as gv
import holoviews as hv
background = gv.tile_sources.Wikipedia
rng = hv.streams.RangeX(source=background)
background
When I call the rng object I do get None at first for x_range
and upon using the wheel zoom, I do get following output:
rng
RangeX(x_range=(-18473547.316975493, 15590216.865764225))
I would expect (-170, 149)
but not roughly 1e5 times that value. How can I interpret the output from RangeX
in that case?
In case someone else stumbles upon this noob question. The reason lies in different coordinate systems. It is necessary to transform the coordinate system from WGS84 (https://epsg.io/3857) to Mercator (https://epsg.io/4326). This can be done like:
EDIT:
I found that using the holoviews utility function a bit easier but the results are the same. Also it is necessary to provide (x, y) pairs to the functions in order to get the correct results. Not only x values.