You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to make some nice looking figures, but when saving to vector formats the file sizes are enormous and I wouldn't be able to include them in a publication. Presumably this is because of the conversion from multi-polygon to mesh for the GeoJSON data results in many more
There are some other issues related to poly and mesh #9#144. There are mostly performance related, and it seems like the performance issues with large polygons were fixed after updates to GeoJSON #63 and some faster paths in Makie for vectors of multi-polygons #2599. In CairoMakie a similar issue #834 was brought up for contour plots having very large files sizes as a result of mesh triangulation instead of using polys when saving plots.
When creating a plot with GeoMakie, it can create a polygon based plot (see example below), but CairoMakie will use a fallback conversion to mesh when it draws the plot.
Presumably this function should be called when CairoMakie renders the plot (specializing on polygons::AbstractArray{<: MultiPolygon}). Instead this fallback function is used which winds up converting the geo axis to a mesh.
This occurs because in drawplot()draw_poly will specialize on to_value.(poly.input_args)... and this results in to_value.(poly.input_args) = (FeatureCollection with 127 Features,). It seems like that should somehow result in a multi-polygon instead of a FeatureCollection in order to allow the dispatch to call the correct function.
From here I do not know enough about the internals of Makie, CairoMakie, and GeoMakie to understand where the the disconnect is between poly!(ga,land_geo) creating a multi-polygon plot and draw_plot being handed a FeatureCollection, or in what package the correct fix needs to be created.
(Because a mesh is used, it also means that saving to .svg will create a .png embedded into the .svg, rather than an actual vector format. Saving to .pdf is the only way to get a vector format when a mesh is used in a plot layer.)
save("test.svg", fig) # creates an embedded png in an svg because of the meshsave("test.pdf", fig) # creates a vector format, but very large file size because of the mesh
The text was updated successfully, but these errors were encountered:
yeah CairoMakie has regressed a bit unfortunately. This has been a consistent issue specifically because CairoMakie checks the input types of the call to poly...we are looking into this!
I'd like to make some nice looking figures, but when saving to vector formats the file sizes are enormous and I wouldn't be able to include them in a publication. Presumably this is because of the conversion from multi-polygon to mesh for the GeoJSON data results in many more
There are some other issues related to poly and mesh #9 #144. There are mostly performance related, and it seems like the performance issues with large polygons were fixed after updates to GeoJSON #63 and some faster paths in Makie for vectors of multi-polygons #2599. In CairoMakie a similar issue #834 was brought up for contour plots having very large files sizes as a result of mesh triangulation instead of using polys when saving plots.
When creating a plot with GeoMakie, it can create a polygon based plot (see example below), but CairoMakie will use a fallback conversion to mesh when it draws the plot.
Presumably this function should be called when CairoMakie renders the plot (specializing on
polygons::AbstractArray{<: MultiPolygon}
). Instead this fallback function is used which winds up converting the geo axis to a mesh.This occurs because in
drawplot()
draw_poly
will specialize onto_value.(poly.input_args)...
and this results into_value.(poly.input_args) = (FeatureCollection with 127 Features,)
. It seems like that should somehow result in a multi-polygon instead of aFeatureCollection
in order to allow the dispatch to call the correct function.From here I do not know enough about the internals of Makie, CairoMakie, and GeoMakie to understand where the the disconnect is between
poly!(ga,land_geo)
creating a multi-polygon plot anddraw_plot
being handed aFeatureCollection
, or in what package the correct fix needs to be created.(Because a mesh is used, it also means that saving to .svg will create a .png embedded into the .svg, rather than an actual vector format. Saving to .pdf is the only way to get a vector format when a mesh is used in a plot layer.)
Example
Plotting geosjon will create a multi-polygon
Using
to_value
should presumably return something that is::AbstractArray{<: MultiPolygon}
Saving/visualizing this figure will use a mesh
The text was updated successfully, but these errors were encountered: