-
CreaMMS: Preparation of layers for publication on the MiraMon WMS
Presentation and options
This application allows preparing raster and vector layers for visualization on the MiraMon map server. To achieve this, it generates multiple rectangular images, known as tiles, that collectively cover the layer's geographic extent. These tiles enable the layer to be represented at various zoom levels, ensuring faster and more efficient visualization within a web browser.
The application supports thematic or continuous raster layers, color images derived from three RGB (red, green, and blue) bands, and vector layers consisting of points, lines, or polygons. It also enables the preparation of vector layers so that their individual features can be identified through location-based queries within the MiraMon browser.
The available options are:
Point vector layer (option 1):
Prepare a point layer to be represented using graphic symbols (GIFs) or text. The symbology can be the same for all points or vary based on a field in the database. When using GIF symbols, all files must share the same color palette to avoid distortions in the representation.
Raster or vector layer of lines or polygons (option 2):
Prepares thematic or continuous raster layers, as well as vector layers consisting of lines or polygons, for visualization in the map browser. It also allows for the processing of sets of layers defined via a list of files.
Raster layer from 3 RGB bands (opción 2):
Prepare a color image from three IMG files, corresponding to the red (R), green (G), and blue (B) bands. This option allows for the generation of a color representation of the images for visualization on the map server.
Vector layer for topographic query (option 3):
Prepares a vector layer of points, lines, or polygons to enable the identification of its features via location-based queries within the MiraMon browser. To do this, it generates a thematic raster containing the graphical identifiers of the features.
The program automatically selects the most appropriate output format:
- Vector layers and rasters with a color palette: IMG files are generated by default to preserve the original values, as the JPEG format uses lossy compression.
- 8-bit orthophotos with a color palette: It is recommended to specify the
/FORMAT=JPEG parameter to generate tiles in JPEG format, which is better suited for this type of image than the default format.
- IMG rasters without a color palette: Grayscale JPEG images are generated by default.
- RGB compositions: Color JPEG images are generated by default.
The application only supports REL4 files.
Preparation considerations
This section outlines general criteria to assist in deciding how to prepare layers. Specific options and modifiers are described in the Syntax section.
Preparing zoom levels
To improve display speed, it is advisable to prepare the zoom levels expected to be used most frequently; pre-generated tiles can be displayed more quickly than images calculated at the time of the query.
Typically, pixel sizes following the sequence 1, 2, and 5 are used.
For each zoom level, a directory is generated containing the corresponding tiles (a set of JPEG, IMG, or GIF files), along with an LST file that lists their names.
The format of the output images depends on the source data and, where applicable, the format specified by the user. Details are provided in the Preparation Considerations section and in the Syntax parameters.
Output formats
By default, the CreaMMS application determines the format of the generated images based on the layer type.
The choice is important because JPEG uses lossy compression, whereas thematic layers require the preservation of the represented values.
- Vector layers and paletted rasters: the program prioritizes an output suitable for thematic data, avoiding the loss of information inherent to the JPEG format.
- 8-bit paletted orthophotos: it may be advisable to force JPEG output using
/FORMAT=JPEG, rather than using the default categorical processing.
- Non-paletted IMG rasters: these typically result in grayscale JPEG images.
- RGB compositions: these typically result in color JPEG images.
Generating tiles according to the WMTS standard
Option 2 allows for the preparation of tiles for a cartographic layer so that they can be used in a WMTS (Web Map Tile Service)-a map service standard that enables the visualization of cartographic information through images (tiles) pre-generated for various zoom levels. CreaMMS allows for the generation of these tiles and their organization for use in a WMTS service.
To ensure this organization is correct, the program must account for three aspects:
- Tile dimensions: all tiles must adhere to the specified dimensions, including those that fall partially outside the layer's extent.
- Empty tiles: these must be retained, even if they contain no information, in order to preserve the tiling structure.
- Indexing: tiles are organized using row and column identifiers, which allow them to be located within the overall set.
To facilitate this preparation, the /WMTS modifier can be used, combined with /FORMAT=PNG to generate images in PNG format. Alternatively, the modifiers /IMATGE_BUIDA=2, /TESSELLA_SENCERA, and /INDEXA_J_I can be configured individually. The /WMTS_I_J modifier enables an alternative organization of row and column indices, suitable for what is known as "simple WMTS."
Generation and partial revision of tiles
It is not always necessary to regenerate all the tiles for a layer. Option 2 allows for the preparation or regeneration of only a portion of the geographic area, or the selection of tiles based on their indices. This feature is useful, for example, when only a specific area of ??the original data has been modified.
Selection can be performed using a geographic bounding box, a range of indices, or a rectangle defined by rows and columns. Since the layer is divided into tiles, the area actually generated may extend slightly beyond the requested limits. If a geographic bounding box is defined, it can be reused across different zoom levels.
The /REVISIO modifier allows for the review of existing tiles, the regeneration of any missing tiles, and the reconstruction of output lists. Details regarding the modifiers used to limit the scope and manage indices can be found in the Syntax section.

Dialog box of the application

Syntax
Syntax:
- CreaMMS 1 Directori FitxerLST costat FitxerPNT [/TRACTAMENT] [/VALOR_CONSTANT] [/CAMP] [/TAULA_SIMBOLS] [/CAMP_TEXT_MOSTRAR]
- CreaMMS 2 Directori FitxerLST ncol nfil Fitxer [NomPaleta] [/CANVI_COSTAT] [/CRITERI_INTERPOL] [/INTERMEDI] [/VORA] [/QUALITAT] [/OPCIO_OPTI] [/COSTAT_OPTI] [/PERCENT_BAIX] [/PERCENT_ALT] [/IGNOR_NODATA] [/VALOR_MIN] [/VALOR_MAX] [/EXAGERACIO] [/costat] [/COLOR_CONSTANT] [/CAMP] [/COLOR_CONSTANT_VORA] [/CAMP_VORA] [/IMATGE_BUIDA] [/FORMAT] [/METATILE] [/MINX] [/MAXX] [/MINY] [/MAXY] [/MINX_TROS] [/MAXX_TROS] [/MINY_TROS] [/MAXY_TROS] [/COL_MIN_TROS] [/COL_MAX_TROS] [/FIL_MIN_TROS] [/FIL_MAX_TROS] [/I_MIN_TROS] [/I_MAX_TROS] [/MM32] [/REVISIO] [/TESSELLA_SENCERA] [/ORIGEN_INFERIOR_ESQUERRA] [/INDEXA_J_I] [/INDEXA_I_J] [/WMTS] [/WMTS_I_J] [/MIN_MAX_TROS_RECTANGLE] [/MANTENIR_VECTORS]
- CreaMMS 2 Directori FitxerLST ncol nfil FitxerR FitxerG FitxerB [/CANVI_COSTAT] [/CRITERI_INTERPOL] [/INTERMEDI] [/VORA] [/QUALITAT] [/OPCIO_OPTI] [/COSTAT_OPTI] [/PERCENT_BAIX] [/PERCENT_ALT] [/IGNOR_NODATA] [/VALOR_MIN] [/VALOR_MAX] [/EXAGERACIO] [/costat] [/COLOR_CONSTANT] [/CAMP] [/COLOR_CONSTANT_VORA] [/CAMP_VORA] [/IMATGE_BUIDA] [/FORMAT] [/METATILE] [/MINX] [/MAXX] [/MINY] [/MAXY] [/MINX_TROS] [/MAXX_TROS] [/MINY_TROS] [/MAXY_TROS] [/COL_MIN_TROS] [/COL_MAX_TROS] [/FIL_MIN_TROS] [/FIL_MAX_TROS] [/I_MIN_TROS] [/I_MAX_TROS] [/MM32] [/REVISIO] [/TESSELLA_SENCERA] [/ORIGEN_INFERIOR_ESQUERRA] [/INDEXA_J_I] [/INDEXA_I_J] [/WMTS] [/WMTS_I_J] [/MIN_MAX_TROS_RECTANGLE] [/MANTENIR_VECTORS]
- CreaMMS 3 FitxerIMGSortida costat exageracio FitxerTop
Options:
- 1:
Prepares a point layer for display.
- 2:
Prepares thematic, continuous raster or vector (may be a list).
- 2:
Prepares thematic, continuous raster or vector (may be a list).
- 3:
Prepares a layer of points/lines or polygons to be queried by location.
Parameters:
- Directori
(Directory -
Input parameter): Directory where all files that make up the generated zoom level will be created.
- FitxerLST
(List file -
Input parameter): LST file containing the list of filenames corresponding to the tiles generated for the zoom level. It is recommended to save it in the same directory where the tiles are generated.
- costat
(Pixel size -
Input parameter): Pixel size of the raster for the zoom level being generated.
- FitxerPNT
(PNT file -
Input parameter): Source PNT file to be prepared as an MMS zoom level.
- ncol
(Columns -
Input parameter): Number of columns for each generated tile. A value of 800 is typically used. When the source is a MiraMon map or layer, ncol cannot exceed the screen size, nor can it be less than 150.
- nfil
(Rows -
Input parameter): Number of rows in each generated tile. Typically, a value of 800 is used (or 48,000 when the format is indexed JPEG).
- Fitxer
(Source file -
Input parameter): When the source layer-or list of layers-consists of vector lines or polygons, it corresponds to the name of the structured vector file containing those lines or polygons. When the source is a MiraMon map or layer, it refers to that specific map or layer (ideally including the symbology defined within the MiraMon map or the layer's metadata/definition file). When the source is a color raster derived from an 8-bit, palette-based IMG file (typically with an optimized palette), it corresponds to that IMG file (or list of IMG files). When the source is a grayscale raster (e.g., a BW orthophoto) or a JPEG image (whether color or grayscale), it corresponds to a byte-type IMG image (or a list of such IMG files). When the source is a JPEG raster (whether true-color or grayscale), it corresponds to the color or grayscale JPEG image (or a list of JPEG files). When the source is a categorical/thematic raster (e.g., a land-use raster) with a palette, or a continuous raster with a palette (e.g., a digital terrain model or a temperature map), it corresponds to the IMG file (or list of IMG files).
- NomPaleta
(Palette -
Input parameter): Corresponds to the name of the color palette. When the source layer or list of layers is of the line or polygon vector type. It must be specified if /CAMP= is used, but not if /COLOR_CONSTANT= is used.
- FitxerR
(Red band -
Input parameter): When the source of the color raster consists of 3 IMG bands (24-bit) (e.g., a color orthophoto), it corresponds to the red band.
- FitxerG
(Green band -
Input parameter): When the source of the color raster consists of 3 IMG bands (24-bit) (e.g., a color orthophoto), the green band (byte) is used to construct a true-color JPEG.
- FitxerB
(Blue band -
Input parameter): When the source of the color raster consists of 3 IMG bands (24-bit) (e.g., a color orthophoto), the blue band (byte) is used to construct a true-color JPEG.
- FitxerIMGSortida
(Output IMG -
Input parameter): Thematic raster file of graphic identifiers.
- FitxerTop
(Topo file -
Input parameter): Topological file to be prepared for querying a server zoom level.
Modifiers:
/TRACTAMENT=
(Treatment)
When the value is S, the layer's points are represented using graphic symbols (GIF icons); this can be done via a constant value (/VALOR_CONSTANT), a value indexed by a database field (/CAMP), or a symbol table (/TAULA_SIMBOLS). When the value is T, the representation is performed using text. The default value is S. (Input parameter) /VALOR_CONSTANT=
(Constant value)
Filename of the GIF symbol used to represent all points, or the font used to represent all rasterized text. Must not be used with /CAMP. (Input parameter) /TAULA_SIMBOLS=
(Symbol table)
Name of the DBF file that serves as a symbolization table, containing the key link field, the filenames of the GIF/PNG symbols used to represent each point, and an optional description (not used by this application). Must not be used with /VALOR_CONSTANT. (Input parameter) /CAMP_TEXT_MOSTRAR=
(Text field)
Fild of the BD4-style database containing the texts to be displayed at each point on the layer when the processing has been defined using texts (T). (Input parameter) /CANVI_COSTAT= (CANVI COSTAT) When the source layer or list of layers is of the raster type, the parameter acts as an integer expansion/contraction factor for the images. It follows the criteria defined for CanviRes. In this context, only a negative value is meaningful. The default behavior is to apply no expansion or contraction, preserving the original cell size. The program uses an averaging method for RGB or grayscale images, and a mode-based method for images with palette. (Input parameter) /CRITERI_INTERPOL= (CRITERI INTERPOL) When the source layer or list of layers is of the raster type, this parameter uses the same syntax as the CanviRes program. Supported options are 'C' for central value, 'm' for mean, 'M' for mode, and 'd' for median. The program defaults to the mean criterion for RGB images and the mode criterion for paletted images. For paletted images representing linear features, the mode criterion is unsuitable as it results in broken lines; it is also inappropriate for paletted images with continuous variation. This parameter allows for the enforcement of a mean criterion in such cases, or the use of the median, which provides better interpolation when the change in cell size is significant. It replaces the /IMPOSA_CANVIRES_MITJANA parameter, which is now deprecated. (Input parameter) /INTERMEDI= (INTERMEDI) The processing required to read the original images for a pixel shift greater than 5 is significant enough to justify saving intermediate results, which can then be reused to generate even larger pixel shifts. The program automatically saves these intermediate results-even without explicit instruction-whenever the pixel shift exceeds 5. These saved, non-optimized intermediate images are stored in directories whose names begin with the letter 'i'. A value of 1 forces the storage of intermediate results for the subsequent generation of larger-scale zooms (in terms of pixel dimensions), even if the requested change in scale is less than a factor of 5. A value of 0 indicates that intermediate results should never be stored, even for scale changes greater than a factor of 5. When the input is a JPEG file or a list of JPEG files, this parameter does not apply, as any lower-resolution (smaller-scale) zoom can be used to generate any higher-resolution (larger-scale) level. (Input parameter) /VORA= (VORA) When the layer is of the raster type, this parameter indicates that a border of *n* cells must be ignored in each of the original images. This is used to remove potential black or white borders from the original images, or any other edge effects resulting from image processing in tiles. This issue has been observed in the 25k orthophotos from certain versions. (Input parameter) /QUALITAT= (QUALITAT) When the layer consists of a photographic or remote-sensing raster image, this parameter corresponds to the JPEGIMG parameter and applies only to JPEG output (typically used for continuous rasters). A quality value between 75 and 85 is recommended. When generating pixel-side adjustments greater than 5, the resulting color degradation can be excessive, leading to images with poor contrast-appearing brownish (for color images) or grayish (for grayscale images). This degradation can be mitigated by applying contrast optimizations to the saved intermediate result images, ensuring that the generation of larger-scale adjustments yields higher quality. It should be noted that these optimizations are applied to the saved intermediate results, not to the tiling generated during the current execution. The parameters /OPCIO_OPTI, /COSTAT_OPTI, /PERCENT_BAIX, /PERCENT_ALT, and /IGNOR_NODATA control the level of this optimization. The saved, optimized intermediate images are stored in directories whose names begin with the letter 'o'. (Input parameter) /OPCIO_OPTI= (OPTI OPTION) Specifies whether histogram optimization should be applied to the saved intermediate results, and the type of optimization to use. Use 1 for global histogram optimization, 2 for sliding-window histogram optimization (recommended), and 0 for no optimization. The default value is 0. (Input parameter) /COSTAT_OPTI= (COSTAT OPTI) Located in the optimization window under optimization option 2. The default value is 301. It does not apply to optimization 1 or 0. (Input parameter) /PERCENT_BAIX= (PERCENT BAIX) Percentage to ignore from the lower tail of the optimization histogram. Values within this percentage are saturated to the minimum value. The default value is 1.5. (Input parameter) /PERCENT_ALT= (PERCENT ALT) Percentage of the upper tail of the optimization histogram to be ignored. Values within this percentage are saturated to the maximum value. The default value is 1.5. (Input parameter) /IGNOR_NODATA= (IGNOR NODATA) Ignore the definition of no-data values ??during optimizations. Use 0 to respect the background value definition specified in the image metadata, 1 to treat 0 as the no-data value, and 2 to treat 255 as the no-data value. The default value is 0. (Input parameter) /VALOR_MIN= (VALOR MIN) Minimum value used to stretch the color palette. By default, the minimum value from each sheet is used. This is only useful for continuous images with a palette. (Input parameter) /VALOR_MAX= (VALOR MAX) Maximum value used to stretch the color palette. By default, the maximum value from each sheet is used. This is only useful for continuous images with a palette. (Input parameter) /COLOR_CONSTANT= (COLOR CONSTANT) For line files, this specifies that they should be rasterized using a constant color. For polygon files, it specifies that they should be rasterized using a constant color for the interior of the polygon. The value must be a color expressed as (r,g,b), where r, g, and b represent the intensity of red, green, and blue, respectively, on a scale from 0 to 255. This cannot be used in conjunction with /CAMP. (Input parameter) /CAMP= (Field) A BD4-style database field that indicates-for a point layer-the symbol used to represent the points (if the selected processing mode is 'S'), or the font format for each rasterized text value (if the selected processing mode is 'T'). For a vector layer consisting of lines or polygons, it specifies the field that indexes the color-that is, the palette index values ??used to color each line feature or the interior of each polygon feature. This should not be used in conjunction with /VALOR_CONSTANT. For further information regarding the values for these parameters, please refer to the notes in the general syntax document. (Input parameter) /COLOR_CONSTANT_VORA= (COLOR CONSTANT VORA) For polygon files, this specifies that their edges must be rasterized using a solid color. The value must be a color expressed as (r,g,b), where r, g, and b represent the intensity of red, green, and blue, respectively (from 0 to 255). Do not use in conjunction with /CAMP_VORA. (Input parameter) /CAMP_VORA= (CAMP VORA) For polygon files, specify the BD4-style database field that indexes the color used to render the polygon edges. This should not be used in conjunction with /VALOR_CONSTANT_VORA. For polygon files, if neither /COLOR_CONSTANT nor /CAMP is specified, the interior of the polygon will not be rendered; similarly, if neither /COLOR_CONSTANT_VORA nor /CAMP_VORA is specified, the polygon edges will not be rendered. It is mandatory to specify at least one of these. For line files, either /COLOR_CONSTANT or /CAMP must be specified. (Input parameter) /IMATGE_BUIDA= (IMATGE BUIDA) 0, 1 or 2 (empty tile). (Input parameter) /FORMAT= (FORMAT) For any mode under option 2, you can specify the desired output format-either GIF or JPEG. In general, it is not necessary to specify this parameter, as the format is determined automatically; however, it is useful in this mode, since the program might otherwise default to GIF output and categorical processing, whereas a JPEG format and continuous processing would yield better results. (Input parameter) /METATILE= (METATILE) The number of tiles generated simultaneously in an n×n matrix. For instance, if set to 4, 16 tiles are generated at once. This parameter is useful for speeding up the preparation process when working with JPEG files. The default value is 1. (Input parameter) /MINX= (MINX) By default, the indexing origin is calculated based on the extent of the original images. The /MINX parameter forces indexing to be based on a specified bounding box. This is particularly useful for regenerating a portion of a previously prepared dataset, or in cases where the indices are significant-such as with WMTS. (Input parameter) /MAXX= (MAXX) By default, the indexing origin is calculated based on the extent of the original images. The MAXX parameter forces indexing to be based on a specified bounding box. This is particularly useful for regenerating a portion of a previously prepared dataset, or in cases where the indices are significant-such as with WMTS. (Input parameter) /MINY= (MINY) By default, the indexing origin is calculated based on the extent of the original images. The /MINY parameter forces indexing to be based on a specified bounding box. This is particularly useful for regenerating a portion of a previously prepared dataset, or in cases where the indices are significant-such as with WMTS. (Input parameter) /MAXY= (MAXY) By default, the indexing origin is calculated based on the extent of the original images. The /MAXY parameter forces indexing to be based on a specified bounding box. This is particularly useful for regenerating a portion of a previously prepared dataset, or in cases where the indices are significant-such as with WMTS. (Input parameter) /MINX_TROS= (MINX TROS) Define the xmin of the envelope that is being regenerated. (Input parameter) /MAXX_TROS= (MAXX TROS) Define the xmax of the envelope that is being regenerated. (Input parameter) /MINY_TROS= (MINY TROS) Define the ymin of the envelope that is being regenerated. (Input parameter) /MAXY_TROS= (MAXY TROS) Define the ymax of the envelope that is being regenerated. (Input parameter) /COL_MIN_TROS= (COL MIN TROS) Column index of the tessellation pieces where cutting should begin. Defaults to 0. (Input parameter) /COL_MAX_TROS= (COL MAX TROS) Column index of the tessellation pieces at which to finish cutting. By default, it is the number of pieces per column minus 1. (Input parameter) /FIL_MIN_TROS= (FIL MIN TROS) Row index of the tessellation pieces at which to start cutting. Defaults to 0. (Input parameter) /FIL_MAX_TROS= (FIL MAX TROS) Row index of the tessellation pieces where the cutting should end. By default, it is the number of pieces per row minus 1. (Input parameter) /I_MIN_TROS= (I MIN TROS) Index of the fragment of the pieces of the tessellation where to start cutting. Does not apply if /MIN_MAX_TROS_RECTANGLE is specified. Default is 0. (Input parameter) /I_MAX_TROS= (I MAX TROS) End linear index. (Input parameter) /MM32 (MM32) Indicates that the layer should be processed using MiraMon symbolization. If the layer is a map, it is always processed using MiraMon symbolization, and this option is not necessary. (Input parameter) /REVISIO (REVISIO) This allows for the review of layer preparation. This parameter checks the already created tiles and regenerates any missing ones, rebuilding the final lists. It is particularly useful when preparing a very large layer-for instance, if the process needs to be interrupted and resumed later-or when distributing the preparation across multiple machines (to ensure the unified output is complete and to regenerate the list). It is also helpful if it is discovered that some tiles were created incorrectly due to a defect in the original layers; once the defect has been corrected and the affected tiles deleted, a review can be run. While it is possible to combine this with a partial tiling generation process, it is not recommended. (Input parameter) /TESSELLA_SENCERA (TESSELLA SENCERA) If this parameter is specified, all tiles will have the same size; even if they extend beyond the extent of the original layer, areas without data will be filled with NoData. By default (without this parameter), the tiles are adjusted to the layer's extent; since the division begins from the top-left, tiles along the right or bottom edges may be smaller than the specified size. (Input parameter) /ORIGEN_INFERIOR_ESQUERRA (ORIGEN INFERIOR ESQUERRA) By default, the tessellation begins at the top left. If this parameter is specified, the tessellation begins at the bottom left. (Input parameter) /INDEXA_J_I (INDEXA J I) By default, the files for the various tiles are named using an ascending sequence from 0 to n-1, corresponding to the linear cell index. For n > 500, the files are organized into subdirectories, each containing 500 files, to facilitate file management. Using the /INDEXA_J_I parameter, the tile naming structure is organized into subdirectories based on row indices, with the filenames themselves representing column indices. (Input parameter) /INDEXA_I_J (INDEXA I J) By default, the files for the various tiles are named using an ascending sequence from 0 to n-1, corresponding to the linear cell index. For n > 500, the files are organized into subdirectories, each containing 500 files, to facilitate file management. Using the /INDEXA_I_J parameter, the tile naming structure is organized into subdirectories based on column indices, with the filenames themselves representing row indices. (Input parameter) /WMTS (WMTS) WMTS preset (see template). (Input parameter) /WMTS_I_J (WMTS I J) WMTS with I/J swap. (Input parameter) /MIN_MAX_TROS_RECTANGLE (MIN MAX TROS RECTANGLE) Indicates that the 4 subsequent parameters define a rectangle. Changes the meaning of /COL_MIN_TROS to what is described below. (Input parameter) /MANTENIR_VECTORS (MANTENIR VECTORS) It allows the vectors that have been used to remain in memory until the end. This makes executions somewhat faster, but requires more memory. (Input parameter)
