You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and would like to convert it to a LibGEOS.LineString
LibGEOS.LineString(ls_json)
I get a MethodError
MethodError: Cannot `convert` an object of type GeoJSON.LineString to an object of type LibGEOS.LineString
This may have arisen from a call to the constructor LibGEOS.LineString(...),
since type constructors fall back to convert methods.
in LibGEOS.LineString(::GeoJSON.LineString) at ./sysimg.jl:53
LibGEOS does have a method for converting any GeoInterface.AbstractLineString to a LibGEOS.LineString:
methods(LibGEOS.LineString)
# 4 methods for generic function "(::Type)":
…
LibGEOS.LineString{T<:GeoInterface.AbstractLineString}(obj::T) at ~/.julia/v0.5/LibGEOS/src/geos_types.jl:36
(::Type{T}){T}(arg) at sysimg.jl:53
but GeoJSON.LineString is not a GeoInterface.AbstractLineString
and so I end up having to do the conversion myself
LibGEOS.LineString(ls_json.coordinates)
which admittedly isn't the end of the world, but it would be convenient and elegant if GeoJSON.LineString were a subtype of GeoInterface.AbstractLineString.
The text was updated successfully, but these errors were encountered:
I have a local branch that introduces GeoInterface as a dependency for this package, but had been holding off on it because I was worried users might prefer this package to be "standalone".
Having an issue like this is a good signal (to me) that it might not be a bad way to proceed, so thanks!
If I have, say, a GeoJSON.LineString
and would like to convert it to a LibGEOS.LineString
I get a MethodError
LibGEOS does have a method for converting any GeoInterface.AbstractLineString to a LibGEOS.LineString:
but
GeoJSON.LineString
is not aGeoInterface.AbstractLineString
and so I end up having to do the conversion myself
which admittedly isn't the end of the world, but it would be convenient and elegant if
GeoJSON.LineString
were a subtype ofGeoInterface.AbstractLineString
.The text was updated successfully, but these errors were encountered: