Closed Sov-trotter closed 4 years ago
@SimonDanisch the basic reason for going down this path is https://github.com/JuliaGeometry/GeometryBasics.jl/issues/49#issuecomment-651203611. This PR is only a draft, but do you in general agree with the proposal of moving from PointMeta
to Meta{Point}
? Main downside is that Meta{Point}
can no longer subtype AbstractPoint
.
We are going with the name Feature
here which is the GeoJSON concept it corresponds to, and to avoid the clash with Base.Meta
, but the name is of course open for discussion. A Feature
can be seen as a row in a table. In GeoJSON this table is a FeatureCollection
. We could go with StructArray{Feature}
here or wrap that in a FeatureCollection
struct.
Main downside is that Meta{Point} can no longer subtype AbstractPoint.
Oh, yeah...that was 100% the reason, that I didn't go with it :D
I think having MetaPoint
be an AbstractPoint
is pretty important ;)
So one way of keeping that would be, to have Meta{X}
a fallback, for types, that weren't explicitly created by the macro?
I think that would work for us :)
closes #50 #49
I think this is ready to be merged? Are there anymore methods that I should add?
@visr, can you give this a review as well? :)
Yes, I'll have a look in a day or two.
I think GeometryMeta
is good to have?
Or even MetaT
is good since it's synonymous/close to Meta{T}
.
I think I should add the latter.
I am extremely sorry for the scattered PR's(both here and in AbstractPlotting). But here's a sequence in which you might want to review/merge them:
decompose()
method in #73 )convert_arguments
method for LineString
in the above PR)Hey @SimonDanisch if the changes are fine then this can be merged?
Sorry for being a bit slow! Thanks for you contribution!
I haven't removed the old meta implementation as planned due to some issues with
MeshMeta
. But for the new implemetation, tests are almost written. We just need to fix the Mesh issue, add some other helpful constructors.