@@ -104,7 +104,7 @@ Base.getindex(f::Folder, i) = f.Features === nothing ? throw(BoundsError(f, i))
104
104
function __init__ ()
105
105
# Register error hints for KMZ support
106
106
Base. Experimental. register_error_hint (IO. _read_kmz_file_from_path_error_hinter, ErrorException)
107
-
107
+
108
108
# Only check for conflicts when not precompiling
109
109
if ! Base. generating_output ()
110
110
check_geometry_conflicts ()
@@ -115,16 +115,16 @@ function check_geometry_conflicts()
115
115
geometry_types = [:Point , :LineString , :LinearRing , :Polygon , :MultiGeometry ]
116
116
blocked_exports = Symbol[]
117
117
conflicts_with = Set {Symbol} ()
118
-
118
+
119
119
for geom_type in geometry_types
120
120
if isdefined (Main, geom_type)
121
121
main_type = getfield (Main, geom_type)
122
122
kml_type = getfield (KML, geom_type)
123
-
123
+
124
124
# Check if Main's type is NOT KML's type
125
125
if main_type != = kml_type && ! isa (main_type, Module)
126
126
push! (blocked_exports, geom_type)
127
-
127
+
128
128
# Try to identify source package
129
129
try
130
130
# For types, use parentmodule directly
@@ -148,13 +148,13 @@ function check_geometry_conflicts()
148
148
end
149
149
end
150
150
end
151
-
151
+
152
152
if ! isempty (blocked_exports)
153
153
conflict_source = isempty (conflicts_with) ? " " : " (from $(join (collect (conflicts_with), " , " )) )"
154
-
154
+
155
155
@warn """
156
156
KML.jl exports were blocked by existing definitions$conflict_source : $(join (blocked_exports, " , " ))
157
-
157
+
158
158
To use KML's geometry types:
159
159
• Import KML first:
160
160
using KML
@@ -166,15 +166,11 @@ function check_geometry_conflicts()
166
166
end
167
167
end
168
168
169
- <<<<<< < parsing_perf_enhancement
170
- end # module KML
171
- ====== =
172
- # Add this type-level implementation for GeoInterface v1.x
169
+ # Add this type-level implementation for GeoInterface v1.x
173
170
GeoInterface. isgeometry (:: Type{<:Geometry} ) = true
174
171
175
- # Add the missing ncoord implementations for GeoInterface v1.x
172
+ # Add the missing ncoord implementations for GeoInterface v1.x
176
173
GeoInterface. ncoord (:: GeoInterface.LineStringTrait , ls:: LineString ) = 2
177
174
GeoInterface. ncoord (:: GeoInterface.LinearRingTrait , lr:: LinearRing ) = 2
178
175
179
176
end # module
180
- >>>>>> > main
0 commit comments