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

Convenient methods in RasterLayer #91

Open
wang-boyu opened this issue Jul 26, 2022 · 2 comments
Open

Convenient methods in RasterLayer #91

wang-boyu opened this issue Jul 26, 2022 · 2 comments
Labels
enhancement Release notes label
Milestone

Comments

@wang-boyu
Copy link
Member

wang-boyu commented Jul 26, 2022

What's the problem this feature will solve?

  1. Load/save raster cell values directly from/to files.
  2. Get random coordinates within cells based on cell coordinates. In situations like population in the same cell, they don't need to have exactly the same coordinates.

Describe the solution you'd like

  1. Have a RasterLayer.from_file(file_path, name, compression) class method to create RasterLayer with cell attribute name. The file can optionally be a gzip file.
    Similarly for saving to files: RasterLayer.to_file(file_path, compression).
  2. Implement a raster_layer.get_random_coord(cell.pos) method.

Additional context

See comments from #90 (comment) and #90 (comment).

This was referenced Jul 26, 2022
@rht
Copy link
Contributor

rht commented Jul 27, 2022

Also, to_file or something would be useful.

@wang-boyu wang-boyu added this to the v0.4.0 milestone Aug 27, 2022
@wang-boyu wang-boyu added the enhancement Release notes label label Aug 27, 2022
@wang-boyu wang-boyu removed this from the v0.4.0 milestone Oct 18, 2022
@wang-boyu wang-boyu removed the backlog label Nov 24, 2022
@wang-boyu wang-boyu added this to the Backlog milestone Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Release notes label
Projects
None yet
Development

No branches or pull requests

2 participants