GeoInterface.jl icon indicating copy to clipboard operation
GeoInterface.jl copied to clipboard

Print of large nested geometries is slow

Open evetion opened this issue 2 months ago • 3 comments

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)

evetion avatar Oct 27 '25 15:10 evetion

Is it printing in a compressed way or not really?

asinghvi17 avatar Oct 27 '25 15:10 asinghvi17

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.

evetion avatar Oct 27 '25 17:10 evetion

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!

asinghvi17 avatar Oct 27 '25 17:10 asinghvi17