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

splitRaster improvements #284

Closed
achubaty opened this issue Jun 1, 2016 · 4 comments
Closed

splitRaster improvements #284

achubaty opened this issue Jun 1, 2016 · 4 comments
Labels
Milestone

Comments

@achubaty
Copy link
Contributor

@achubaty achubaty commented Jun 1, 2016

  • add file argument to allow user to specify the name of the files associated with the split tiles. currently, temporary files are used, which makes it onerous to re-use previously split rasters. also add a suffix to the user-supplied file name to identify the tile number (or row and columns).
  • use mclapply for cropping, using a cluster if one exists.
@achubaty achubaty added the enhancement label Jun 1, 2016
@YongLuo007
Copy link
Contributor

@YongLuo007 YongLuo007 commented Jun 13, 2016

for adding a file name for the split tiles, which create nx*ny tiles in the current folder. I am suggesting adding a folder in the working directory to contain the split tiles. any thoughts?

@achubaty
Copy link
Contributor Author

@achubaty achubaty commented Jun 13, 2016

file should be the path to a directory in which the raster files will be created, or better yet, the "basename" for a file, upon which a number suffix is added denoting the raster tile number

i.e., if file = "~/path/to/my/outputs/raster_tile" then the raster tiles are written to the following files:

  • ~/path/to/my/outputs/raster_tile_01.grd
  • ~/path/to/my/outputs/raster_tile_02.grd
  • ~/path/to/my/outputs/raster_tile_03.grd
  • etc.
@YongLuo007
Copy link
Contributor

@YongLuo007 YongLuo007 commented Jun 13, 2016

good idea.
do you know any r function to identify whether the machine is a cluster or not?
or just using Sys.info()["sysname"]=="Linux"?

@achubaty
Copy link
Contributor Author

@achubaty achubaty commented Jun 13, 2016

see the experiment code where a cluster object (cl) is obtained using raster::getCluster.

@achubaty achubaty modified the milestone: v1.2.0 Jun 21, 2016
achubaty added a commit that referenced this issue Jun 22, 2016
* `mergeRaster` improvements (#283)
* `splitRaster` improvements (#284)
* moved shared examples to `inst/examples/examples_splitRaster.R`
* rename some arguments to make debugging easier
* don't write raster after doing all cropping; instead crop then write each raster tile in sequence
* cleanup
achubaty added a commit that referenced this issue Jun 22, 2016
* move parallel splitRaster test into a separate test (skipped because needs to be run manually)
* remove 'TO DO' comments for issues #283 & #284 which are complete
* clean up code used in each test
@achubaty achubaty closed this Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants