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

Comments

Projects
None yet
2 participants
@achubaty
Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

fix & cleanup PR #286
* `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

fix & clean up split/merge raster tests
* 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