Skip to content

Provide and use a constructor function for feature creation #2

@dcj

Description

@dcj

We've been discussing/debating how best to represent/implement a feature (in Zulip/Clojurians/data-science).

Currently features are implemented as hashmaps, with two keys, :geometry and :properties, and I/we would like to experiment with other possible implementations/representations (e.g. via deftype, and maybe as a "flat" hashmap.

AFAICT, ovid currently provides functions/methods for operating on a feature, e.g. feature/geometry, feature/properties, etc. which is great.

But it seems like the construction of a feature is currently done by explictly creating a hashmap, which will make testing alternate implementations more difficult.

I propose that we change the code to always create a feature using a feature-constructor function, and then we'd be able to change just that function to experiment with alternate implementations/representations, also, arguably it this would just be a better coding implementation, even if the current hashmap representation is deemed best....

I'm happy to help try and make these changes and submit as a PR, but want to discuss here beforehand to gauge your interest and receptivity to such a change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions