Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting user experience #195

Closed
liamdiprose opened this issue May 17, 2021 · 4 comments
Closed

Plotting user experience #195

liamdiprose opened this issue May 17, 2021 · 4 comments

Comments

@liamdiprose
Copy link

I work with some huge rasters, and I'd love for an efficient geo library to let me visualise my work easily. Is it in ArchGDAL's scope to simply plot(archGDALDataset)? In this case, I would expect the data is projected and plotted with global coordinates.

It makes sense to exploit the overviews when the plot is zoomed out. Is there any thinking out there on how to describe this shortcut in ArchGDAL, and let the plotting library use it? This could be useful for the MapTiles.jl repo as well (also authored by @yeesian).

A lot of the functionality in Images.jl applies to raster data, including turning data bands into plottable colours. Would it make sense to represent ArchGDAL datasets as images? How could it work with coordinate projections?

I'm dreaming of a QGIS written in Julia one day, e.g. Notebook+Makie+GTK+PackageCompiler

@rafaqz
Copy link
Collaborator

rafaqz commented May 17, 2021

Both GeoData.jl and GeoArrays.jl (that both wrap ArchGDAL) allow plotting simply with plot(A). In GeoData.jl you can do geoarray("somefile.tif"; mappedcrs=EPSG(4326)) |> plot and it will show in global lat/lon no matter what your underlying projection is. It's not the default, I'm not sure if everyone expects that all the time. Bands are tiled if there are multiple bands.

yeesian is adding Images.jl compat in this PR (its a huge refactor also including images): https://github.com/yeesian/ArchGDAL.jl/pulls

And Makie.jl is not quite there in terms of plotting recipes, so Plots.jl is the package for now for easy raster plotting. But ultimately hopefully soon we can support Makie plotting, and things like that will be possible.

@yeesian
Copy link
Owner

yeesian commented May 20, 2021

I imagine ArchGDAL.jl might provide the building blocks for such an application, but it is unlikely (in its current or near-future state) to go the full distance in providing an end-to-end solution (e.g. exploiting overviews, handling dimensional data / map algebra) as gracefully as packages such as GeoData.jl and GeoArrays.jl, and the time is still ripe for collaborating and exploring the space of possibilities.

@liamdiprose
Copy link
Author

Thanks @rafaqz and @yeesian for the feedback, I'm really excited for the big developments coming up in your projects!

I actually have been using GeoData (thanks @rafaqz!) at work, but I wasn't able to broadcast a function to an entire raster in an efficient chunk-by-chunk manner. I see you've been debugging the DiskArrays interface in #191, so I'm guessing you already have plans to improve performance there. (btw: it wasn't a dealbreaker, in fact, the speed still amazed the boss).

I'll keep my mind open for bits I can contribute. If the Julia advocacy goes well, I'll try to lazily plot a lazily-broadcasted raster in a zoomable plotting interface, which is what Julia would need to win over my bosses from their current QGIS workflow.

@rafaqz
Copy link
Collaborator

rafaqz commented May 23, 2021

Thanks @liamdiprose! I hadn't really optimised speed or file loading before now, so that is more likely credited to to source packages like GDAL/ArchGDAL.jl and NCDatasets.jl :)

For context, when I first wrote GeoData.jl, DiskArrays.jl didn't exist, ArchGDAL and HDF5.jl didn't have AbstractArray interfaces. So just getting things working was the priority. Now we have DiskArrays.jl nearly everywhere, and a lot of great developments here that @yeesian and others are implementing, GeoData.jl can focus on getting e.g. generalised chunked broadcasting and out-of-core distributed processing to work.

The lazy plotting interface is a good idea, thanks for bringing it up. I'll make an issue to track it. We should look at this being possible with Makie.jl in future. And maybe it could work in Plotly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants