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

Geometry coordinates aren't parsed as the same type

Open evetion opened this issue 3 years ago • 1 comments

julia> a = """{"type": "FeatureCollection", "features": [
           {"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[0.1, 0.0], [1, 0.2], [0.0, 1.0], [0.3, 0.0]]]}}
           ]}"""
julia> poly1 = GeoJSON.read(a)[1].geometry
julia> poly1[1]
4-element JSON3.Array{JSON3.Array, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}:
 [0.1, 0.0]
 Union{Float64, Int64}[1, 0.2]
 [0, 1]  # <-- Int64
 [0.3, 0.0]

evetion avatar Oct 12 '22 19:10 evetion

Good to have an issue for this here. It was also discussed here, and I commented on this upstream issue.

visr avatar Oct 13 '22 19:10 visr