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

Layer - add method to get parent dataset #23

Closed
shawnlaffan opened this issue Dec 6, 2018 · 3 comments
Closed

Layer - add method to get parent dataset #23

shawnlaffan opened this issue Dec 6, 2018 · 3 comments

Comments

@shawnlaffan
Copy link
Collaborator

What do you think of adding a method to get at a layer's parent dataset?

It is not part of the GDAL API so far as I can see, but since Geo::GDAL::FFI stores a hash of parent refs it should be possible to access it and return the relevant item.

This would be convenient when passing layers between subs to use for selections, as one does not need to also pass the dataset ref.

Something like this might be sufficient:

sub GetParentDataset {
    my ($self) = @_;
    return $Geo::GDAL::FFI::parent ($$self);
}
@ajolma
Copy link
Owner

ajolma commented Dec 7, 2018

I think it is useful.

@shawnlaffan
Copy link
Collaborator Author

Thanks. I'll work it into a PR.

shawnlaffan added a commit to shawnlaffan/Geo-GDAL-FFI that referenced this issue Dec 8, 2018
This allows easier changes of behaviour later on,
as well as accessing the values.

Updates ajolma#23
shawnlaffan added a commit to shawnlaffan/Geo-GDAL-FFI that referenced this issue Dec 8, 2018
@shawnlaffan
Copy link
Collaborator Author

Fixed by PR #24

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

No branches or pull requests

2 participants