Skip to content
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

implement Base.getproperty on Feature and FeatureLayer #255

Open
visr opened this issue Oct 26, 2021 · 4 comments
Open

implement Base.getproperty on Feature and FeatureLayer #255

visr opened this issue Oct 26, 2021 · 4 comments

Comments

@visr
Copy link
Collaborator

visr commented Oct 26, 2021

If we iterate through a layer, we get features. These make up our rows in the tables interface. Therefore I assumed they would behave somewhat like a NamedTuple. In https://discourse.julialang.org/t/find-if-point-is-within-geojson-polygons/70416 I tried feature.name to get the name of the feature, but it doesn't work.

Would it be a good idea to add Base.getproperty methods for Features?

Actually now I'm a bit confused. In #118 we defined propertynames and getproperty on the table (then a separate type, now FeatureLayer). It looks like we have to re-add those for FeatureLayer now as well? Or would this conflict with the new schema somehow @mathieu17g?

@rafaqz
Copy link
Collaborator

rafaqz commented Oct 26, 2021

Defining getproperties for the row object should mean the rowaccess-based Tables.jl interface will just work too? Thats how a Vector of NamedTuple works.

Its also nice to have that symmetry where the objects have the same properties as the row names.

@visr
Copy link
Collaborator Author

visr commented Oct 27, 2021

Yeah although the current Tables interface for ArchGDAL is already row based, since that corresponds to GDAL's data model better.

@yeesian
Copy link
Owner

yeesian commented Oct 28, 2021

Might we run into situations where there are spaces in the fieldnames?

@mathieu17g
Copy link
Collaborator

Or would this conflict with the new schema somehow @mathieu17g?

I do not see why it would.

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

No branches or pull requests

4 participants