GeoInterface.jl
GeoInterface.jl copied to clipboard
Print of large nested geometries is slow
This takes several seconds to just display it in the REPL (Julia 1.12.1). Shapefile is from https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/CGAZ/geoBoundariesCGAZ_ADM0.zip
using GeoDataFrames
import GeoInterface as GI
countries = GeoDataFrames.read("geoBoundariesCGAZ_ADM0.shp")
# countries = reproject(countries, EPSG(4326), EPSG(6933))
GI.convert.((GI,), countries.geometry)
Is it printing in a compressed way or not really?
Yeah, it's a
218-element Vector{GeoInterface.Wrappers.WrapperGeometry{false, false, T, Nothing} where T}:
GeoInterface.Wrappers.Polygon{false, false}(Geometry: POLYGON ((74.889862 37.23409,74.889616 37.233143,7 ... 409)))
...
The Polygons tend to have ten thousands of points.
Oh interesting, it's a wrapper around another polygon type. Yeah in that case I don't think we do the compressed printing - but maybe we should!