GithubHelp home page GithubHelp logo

Make it work with GeoAxis about tyler.jl HOT 2 OPEN

felixcremer avatar felixcremer commented on August 19, 2024
Make it work with GeoAxis

from tyler.jl.

Comments (2)

felixcremer avatar felixcremer commented on August 19, 2024 1

I got around this issue by setting the source keyword for the GeoAxis to also use webmerc as the source projection.
I managed to plot something but it seems that it is only fetching a few tiles and this might be a projection issue.

from tyler.jl.

felixcremer avatar felixcremer commented on August 19, 2024

There is some strange interaction between GeoMakie and Tyler. When I construct the Map object it fetches some tiles that I would also expect to be fetched but they are not displayed on the Axis and as soon as I try to interact with the data it fetches only one tile that is on zoomlevel one and at (0,0) and therefore only shows the ocean.

using GeoMakie, Tyler, GLMakie
julia> fig = Figure()

julia> ax = GeoAxis(fig[1,1], dest="+proj=webmerc +datum=WGS84", source="+proj=webmerc +datum=WGS84")
GeoAxis()

julia> nax = Axis(fig[1,2])
Axis with 0 plots:


julia> london = Rect2f(-0.0921, 51.5, 0.04, 0.025)
GeometryBasics.HyperRectangle{2, Float32}(Float32[-0.0921, 51.5], Float32[0.04, 0.025])

julia> m = Tyler.Map(london, figure=fig, axis=nax);
(X[1], X[2]) = (-10252.524915718823, -5799.745763988467)
ext_target = Extent{(:X, :Y), Tuple{Tuple{Float64, Float64}, Tuple{Float64, Float64}}}((X = (-10252.524915718823, -5799.745763988467), Y = (6.710218830581673e6, 6.714690955633332e6)))
area = Extent{(:X, :Y), Tuple{Tuple{Float64, Float64}, Tuple{Float64, Float64}}}((X = (-10252.524915718823, -5799.745763988467), Y = (6.710218830581673e6, 6.714690955633332e6)))
zoom = 16

julia> mgeo = Tyler.Map(extent(m), m.crs, figure=fig,axis=ax);
(X[1], X[2]) = (-10252.525f0, -5799.7456f0)
xlims = (-10252.525f0, -5799.7456f0)
in needs_transform
ylims = (6.709957f6, 6.714953f6)
in needs_transform
extent = GeometryBasics.HyperRectangle{2, Float32}(Float32[-10252.525, 6.7099985f6], Float32[4452.78, 4913.2534])
area = GeometryBasics.HyperRectangle{2, Float32}(Float32[-10252.525, 6.7099985f6], Float32[4452.78, 4913.2534])
zoom = 16
ext_target = Extent{(:X, :Y), Tuple{Tuple{Float32, Float32}, Tuple{Float32, Float32}}}((X = (-10252.525f0, -5799.7456f0), Y = (6.709957f6, 6.714953f6)))
area = Extent{(:X, :Y), Tuple{Tuple{Float32, Float32}, Tuple{Float32, Float32}}}((X = (-10252.525f0, -5799.7456f0), Y = (6.709957f6, 6.714953f6)))
zoom = 16

julia> mgeo.plots
Dict{MapTiles.Tile, Any} with 162 entries:
  Tile(32757, 21789, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32755, 21789, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32756, 21790, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32756, 21791, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(16378, 10893, 15) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32752, 21791, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(16378, 10895, 15) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32757, 21790, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32759, 21794, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32754, 21795, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32753, 21795, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32753, 21789, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(16375, 10895, 15) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(16377, 10897, 15) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32753, 21792, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32751, 21793, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32754, 21791, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32755, 21788, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32753, 21791, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32753, 21794, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
  Tile(32757, 21793, 16) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2,
                        => 
julia> mgeo.plots # This is after zooming into the GeoAxis
Dict{MapTiles.Tile, Any} with 1 entry:
  Tile(0, 0, 1) => Mesh{Tuple{Mesh{2, Float32, TriangleP{2, Float32, PointWithUV{2, Float32}}, FaceView{TriangleP{2, Float32,

from tyler.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.