Skip to content

Geometry coordinates aren't parsed as the same type #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
evetion opened this issue Oct 12, 2022 · 1 comment · Fixed by #54
Closed

Geometry coordinates aren't parsed as the same type #52

evetion opened this issue Oct 12, 2022 · 1 comment · Fixed by #54

Comments

@evetion
Copy link
Member

evetion commented Oct 12, 2022

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]
@visr
Copy link
Member

visr commented Oct 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants