From c5ef36084a5edcbd4e84cc874e69613cc59ae62d Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Sun, 9 Feb 2025 14:00:30 -0500 Subject: [PATCH] Update geointerface.jl --- src/geointerface.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/geointerface.jl b/src/geointerface.jl index dc61b45..e88a1d8 100644 --- a/src/geointerface.jl +++ b/src/geointerface.jl @@ -81,4 +81,13 @@ end GI.crs(::GeoJSONT) = GeoFormatTypes.EPSG(4326) +@static if :crstrait in names(GI) + # All GeoJSON geometries are geographic-by-default + # If you don't want this behaviour in e.g. GeometryOps, + # then you can set the manifold directly to Planar (or a different ellipsoid). + # An extension on GeometryOpsCore should add the definition of `best_manifold(::GeoJSONType)` + # to be WGS84. + GI.crstrait(::GeoJSONT) = GI.GeographicTrait() +end + GeoInterfaceRecipes.@enable_geo_plots GeoJSON.AbstractGeometry