Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
save_map [2026/06/29 11:03]
chrystian Add usage examples to functor documentation
save_map [2026/08/28 03:32] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Save Map ====== ​+====== Save Map ======
  
 ===== Description ===== ===== Description =====
  
-This functor saves a map into a file. The filename ​and its path must be specified.+Saves a map to a file. The file format is determined automatically from the filename's extension.
  
 ===== Inputs ===== ===== Inputs =====
Line 9: Line 9:
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
 | Map  | [[Map Type]] ​ | Map to be saved. ​ | | Map  | [[Map Type]] ​ | Map to be saved. ​ |
-| Filename ​ | [[Map Filename Type]] ​ | Name of the file where the map will be saved. Dinamica automatically determines the format from a selected file extension.  |+| Filename ​ | [[Map Filename Type]] ​ | Name and path of the file the map is saved to.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^
-| Suffix Digits ​ | [[Non Negative Integer Value Type]] ​ | Number of digits used in the file name suffix ​to represent ​model step. If the number of digits is not sufficient to represent the current step, the functor automatically adds more digits. If the number of digits is equal to zero, Dinamica does not include a suffix ​in the file name.  | 2  | +| Suffix Digits ​ | [[Non Negative Integer Value Type]] ​ | Number of digits used to render Step as filename suffix. If Step needs more digits ​than this, it is used unmodified. If zero, no suffix ​is added. This is an advanced port.  | 2  | 
-| Step  | [[Non Negative Integer Value Type]] ​ | Model step that produced the file.  | None  | +| Step  | [[Non Negative Integer Value Type]] ​ | Model step that produced the file, appended to Filename as a numeric suffix; automatically bound to the innermost compatible container. This is an advanced port.  | .none  | 
-| Use Compression ​ | [[Boolean Value Type]] ​ | If true, the raster file is compressed. Only available ​for GeoTiff.  | True  | +| Use Compression ​ | [[Boolean Value Type]] ​ | If true, the saved map's cells are compressedfor output formats that support it; ignored by formats that do not. This is an advanced port.  | Yes  | 
-| Workdir ​ | [[Workdir Type]] ​ | Workdir ​folder ​path.  | None  |+| Workdir ​ | [[Workdir Type]] ​ | Work directory Filename is relative to; may be a folder ​or a Zip archive. When not bound, the directory containing the script is used. This is an advanced port.  | .none  | 
 +| Ignore Costly Sparse Categories ​ | [[Boolean Value Type]] ​ | If true, a sparse categorization whose consecutive category values differ by very large gaps is discarded rather than saved, avoiding a costly representation. This is an advanced port.  | Yes  |
  
 ===== Outputs ===== ===== Outputs =====
Line 25: Line 26:
 ===== Group ===== ===== Group =====
  
-[[Functor List#​Input/​Output | Input/​Output]]+[[Functor List#Input / Output | Input / Output]]
  
 ===== Notes ===== ===== Notes =====
  
-For a list of file formats that Save Map can write, the supported [[wp>​Map_projection|projections]] and [[wp>​Datum_(geodesy)|datums]],​ check the [[supported map formats#​map_formats_supported_for_writing|supported map formats]].+If Step is .none, the saved filename has no numeric suffix.
  
-Alsocheck the [[supported_map_formats#​gdal_limitations|limitations]] imposed by the current map reading ​and writing capabilities.+See Lesson 4"​Opening ​and Saving maps," for a practical example of this functor.
  
-===== Internal Name ===== +===== Internal Name =====
  
 SaveMap SaveMap