Interactively assign seeds for data grid encoding
getseeds will be removed in a future release.
[row,col,val] = getseeds(map,R,nseeds)
[row,col,val] = getseeds(map,R,nseeds,seedval)
mat = getseeds(...)
[row,col,val] = getseeds(map,R,nseeds) allows user to identify geographical objects while customizing a raster map. It prompts the user for mouse click positions of objects and assigns them a code value. The user is prompted for the value to seed at each location. The outputs are the row and column of the seed location and the value assigned at that location. R is either a 1-by-3 vector containing elements:
[cells/degree northern_latitude_limit western_longitude_limit]
or a 3-by-2 referencing matrix that transforms raster row and column indices to/from geographic coordinates according to:
[lon lat] = [row col 1] * R
If R is a referencing matrix, it must define a (non-rotational, non-skewed) relationship in which each column of the data grid falls along a meridian and each row falls along a parallel.
[row,col,val] = getseeds(map,R,nseeds,seedval) assigns the value seedval to each location supplied. If seedval is a scalar then the same value is assigned at each location. Otherwise, if seedval is a vector it must be length(nseeds) and each entry is assigned to the corresponding location. getseeds operates on the current axes (gca).
mat = getseeds(...) returns a single output matrix where mat = [row col val].
Demonstrate this for yourself by typing the following and interactively selecting points:
load topo axesm('gortho','grid','on') seedmat = getseeds(topo,topolegend,3)
When you have selected three points, you are prompted for their values. The regular data grid need not be displayed to execute getseeds on it.