Closed felixcremer closed 1 year ago
I think we have to change propertynames
if we change getproperty
.
From the propertynames
docs:
Get a tuple or a vector of the properties (x.property) of an object x. This is typically the same as fieldnames(typeof(x)), but types that overload getproperty should generally overload propertynames as well to get the properties of an instance of the type.
So go ahead and change the test ;)
I went ahead and changed the test. ;-) And the function as well.
One question I have is how this interacts with round trip read/write - I guess DBFTables.jl just ignores the :geometry
column in the Table?
@joshday are there any issues with merging this in relation to your work on write
?
Shouldn't be any issues on writing. Shapefile.write
drops any column with elements that satisfy GeoInterface.isgeometry
for the dbf file.
This change allows to access the geometry of a Shapefile.Row via Row.geometry. This PR fixes #82. This change is also needed so that Tables.columns of a collection of Shapefile.Row works (which you can end up with when filtering a Shapefile by some column values).
Why is Base.propertynames(Row) overloaded so that it doesn't also show the
:geometry
column? I thought about also changing that, but it is actively tested for, therefore I was hesitant to change it.