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

coordinates not defined

Open nathanielvirgo opened this issue 3 years ago • 3 comments

I just upgraded to Julia 1.8 and reinstalled my packages, and now the coordinates function is not defined:

julia> using LibGEOS

julia> point = LibGEOS.Point(1.0, 2.0)
Point(Ptr{Nothing} @0x00006000034e0060)

julia> coordinates(point)
ERROR: UndefVarError: coordinates not defined
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

This means none of my LibGEOS code is working. What can I do?

nathanielvirgo avatar Sep 13 '22 07:09 nathanielvirgo

It seems v0.7 was a breaking release, although it was not meant to be, for which I apologise.

You can now do:

julia> using LibGEOS

julia> point = LibGEOS.Point(1.0, 2.0)
Point(Ptr{Nothing} @0x0000600003ad4480)

julia> using GeoInterface

julia> GeoInterface.coordinates(point)
2-element Vector{Float64}:
 1.0
 2.0

Also, I would advise to use a Project.toml to pin package versions for production code.

evetion avatar Sep 13 '22 08:09 evetion

@evetion I guess that means we should add the export back? or should it stay?

visr avatar Sep 16 '22 21:09 visr

Yeah, I think it's best to add the export back.

evetion avatar Sep 19 '22 07:09 evetion