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

Reformat API with encapsulated GeoDataset and GeoLayer objects #27

Closed
kb173 opened this issue Jul 15, 2020 · 2 comments
Closed

Reformat API with encapsulated GeoDataset and GeoLayer objects #27

kb173 opened this issue Jul 15, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kb173
Copy link
Member

kb173 commented Jul 15, 2020

Instead of long function calls with paths and layer names, we'd like to switch to a more object-oriented solution: Getting a GeoDataset object from Geodot, which offers functions to get its GeoLayers (e.g. all as an Array or individual ones by name). All functionality like getting points near a position, or getting all features, will then be in this GeoLayer class. We may have to strictly differentiate between raster layers and vector layers since those offer very different functionality (-> GeoRasterLayer and GeoVectorLayer).

This has several advantages: Errors are easier to convey precisely (with is_valid() checks in each object), function calls are less convoluted, and the user has a much finer control of caching since it is in their control when a GeoDataset or GeoLayer object is deleted.

This will, of course, break compatibility with previous versions.

@kb173 kb173 added the enhancement New feature or request label Jul 15, 2020
@kb173 kb173 self-assigned this Jul 15, 2020
@kb173
Copy link
Member Author

kb173 commented Jul 17, 2020

In preparation for this restructure, some classes were reworked a bit in 1db101e to remove duplicate functionality and make all the files a bit clearer and easier to look through.

@kb173
Copy link
Member Author

kb173 commented Sep 10, 2020

Done and tested! The only thing left to implement has been noted in #29.

@kb173 kb173 closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant