-
MMZ: Compression and decompression of MMZX/MMZ files (diffusion, preservation, etc; limited version)
Access this help text as a web page: MMZ
Presentation and options
Program that compresses and decompresses both MMZ files (compressed MiraMon files) and their standardized evolution, MMZX files. The MMZX and MMZ formats allow to compress all files related to a map (MMM), such as linked thesaurus, or files related to a layer (POL, IMG, etc) in a single file. These files can be distributed over the Internet, email, etc, with all their parts (data, metadata, symbolization, etc). In addition to their interest in the distribution of geographic information datasets that contain all kinds of data (vector, raster, geoservices, tables, etc), the MMZX/MMZ files are the best option for preservation of cartographic documents for general archiving purpose, compilation of documentation related to legal process, etc.
The MMZX/MMZ files present a similar compression feature in the ZIP format. Consult the specifications of the MMZ format in this document. The specifics of the new MMZX format are described in the article:
Pons X, Masó J (2016) A comprehensive open package format for preservation and distribution of geospatial data and metadata Computers & Geosciences, 97, 89-97. http://dx.doi.org/10.1016/j.cageo.2016.09.001.
In addition, MMZX is the first global implementation of the international standard ISO 19165 ("Geographic information - Preservation of digital data and metadata"), published in May 2015 and available at https://standards.iso.org/ittf/PubliclyAvailableStandards/c061796_ISO_IEC_29500-2_2012.zip. The internal structure of the MMZX is an adaptation of the 1998 original ideas of the MMZ, now standardized under the also international standard ISO 29500-2 ("Open Packaging Conventions, OPC"), published in September 2012 and available at https://www.iso.org/standard/61796.html.
Specifications of the contents of the file resulting from the preservation of bases in MiraMon (Option 8 of the program) can be found in this document.
The program has several options:
Option 0:
Information about an MMZX or an MMZ files.
Option 1:
Uncompress an MMZX or an MMZ file.
Option 2:
Compress files in a directory (and subdirectories if indicated).
Option 3:
Compress an MMM or a layer and all its linked files. This option also allows the user to certify an MMZX/MMZ that was not certified (only MiraMon Internet Map Publisher corporate license certifier applications).
Option 4:
Compress an MSA. Not intended for program end users, but for people who have to distribute a MiraMon support application.
Option 5:
Change a value in the header of the file. Option not intended for program end users, but for people that develop MiraMon.
Option 6:
Create map or layer certificates. Overwrites previous certificates if they exist.
Option 7:
Compress an MMM or a layer without including linked files. Not intended for program end users, but for people that develop MiraMon.
Option 8:
Preserve a map or a layer (either MiraMon, Oracle Spatial, SHP, JPG/JPEG o TIF/TIFF), and all its linked files compressing it into an MMZX file.
The program can compress/decompress all files in a directory or all files linked to a map (MMM) or a layer (IMG, POL, etc). It is also able to certify maps. Certification is advisable to generate maps that can be distributed over the Internet or on institutional or business CD/DVD/USB, etc, but it is only available to those users who have a MiraMon Internet Map Publisher corporate license. The certificate appears in the application dialog box. If the user does not have this type of license, the certification options are not available. For more information, please visit: https://www.miramon.cat/mmr/usa/index.htm or write tocontacte@miramon.uab.cat.
MMZX and MMZ formats allow saving on the file path, allowing the user to load the file upon decompressing. During the compression the user can force the conservation of the full path or only the relative path. In file options of a directory this is equivalent to no path and, for compression options, a relative path to the map/layer, and an absolute path to the rest.
During compression the user can indicate how this path will be regenerated when the user uncompresses the file. There are 4 regeneration modes:
- The path is regenerated identical to the original, informing the user which files cannot be uncompressed because the path does not exist (e.g. non-existent unit).
- The path regenerates relative to the decompression directory. The 'directory tree' criterion applies to other files that are on other drive units or UNC addresses.
- The path is always regenerated based on the 'tree from directory' criterion.
- The path is deleted when regenerating. If the names are repeated, then part of the path is used. In case of failure to do so, a temporary name is adopted to avoid overwriting.
During decompression it is possible to force a method of regeneration of the path ignoring what is specified when compressing.
If the user uncompresses a file that already exists, the program shows the following dialog to determine whether it can be overwritten and how.
The file j:\raster\ras.img
already exists on the disk and is POSTERIOR to the compressed file.
File on disk:
15172 bytes, modified 01/16/2017 at 11:42:21
Compressed file:
2587417 bytes, modified 01/18/2017 at 13:14:46
Overwrite the file j:\raster\ras.img? (y/n/a/c):
The possible answers are 'y' if the user wants to overwrite this file, 'n' if the user does not want to overwrite this file, 'a' if you want to overwrite all the files (the user won't be asked again) and 'c' if you want to cancel to keep all the files (do not overwrite).
The following table illustrates how the 'directory tree' method works:
1234\map.mmm becomes 1234\map.mmm
M:\1234\map.mmm becomes M$\1234\map.mmm
\\server\resource\map.mmm becomes $\server\resource\map.mmm
..\map.mmm becomes $$\map.mmm (only when unable to go back in the tree directory)
Advanced functionalities
Several MMZX/MMZ files can be labeled as belonging to the same group. In this case, when the user opens more than one compressed map at the same time, MiraMon opens these files in the same session without asking. This allows the user to create web pages or BATCH processes that start combinations of MMZX/MMZ files without questioning the user about each individual file. (See parameter /GRUP in the syntax.)
A part of the file path can be replaced by compressing (see parameters of path variables in the syntax) with a nickname. When opening the map MiraMon changes this by the system environment variable, or by the value of the variable indicated in MiraMon, by section, or by one of the predefined alternative values in the MMZX/MMZ file (in this order). Each variable gives its descriptor the ability to question the user about its value when all the pre-established alternatives fail. When compressing a MMZX/MMZ file, the user can define an expected future update date, an expiration date and a list of sites from where to download future updates (see parameters /DATAACTUA=, /DATACADUCA=, / UBIC#= and /DESCUBIC#= to the syntax).
Dialog box of the application
Syntax
Syntax:
- MMZ 0 MMZFile [/OBRIR_NAVEGADOR] [/DESCOMPRIMIR_OPC]
- MMZ 1 MMZFile Dir [/US] [/REGENERACIO] [/DESCOMPRIMIR_OPC]
- MMZ 2 MMZFile DirFile [/S] [/US] [/REGENERACIO] [/RELATIU] [/ODBC] [/SDE] [/OPC] [/OPC_THUMBNAIL] [/CAPES_LLINATGE] [/GRUP] [/NOMVAR#] [/VALORVAR#] [/DESCVAR#] [/VAR#PATH#] [/DATAACTUA] [/DATACADUCA] [/UBIC#] [/DESCUBIC#]
- MMZ 3 MMZFile MMMFile [/US] [/REGENERACIO] [/RELATIU] [/ODBC] [/SDE] [/OPC] [/OPC_THUMBNAIL] [/CAPES_LLINATGE] [/CERTIFICAT] [/GRUP] [/NOMVAR#] [/VALORVAR#] [/DESCVAR#] [/VAR#PATH#] [/DATAACTUA] [/DATACADUCA] [/UBIC#] [/DESCUBIC#]
- MMZ 4 MMZFile EXEFile [/US] [/REGENERACIO] [/RELATIU] [/ODBC] [/SDE] [/OPC] [/OPC_THUMBNAIL] [/CAPES_LLINATGE] [/GRUP] [/NOMVAR#] [/VALORVAR#] [/DESCVAR#] [/VAR#PATH#] [/DATAACTUA] [/DATACADUCA] [/UBIC#] [/DESCUBIC#]
- MMZ 5 MMZFile IEntry NewValue
- MMZ 6 MMMFile
- MMZ 7 MMZFile MMMFile [/US] [/REGENERACIO] [/RELATIU] [/SDE] [/OPC] [/OPC_THUMBNAIL] [/CAPES_LLINATGE] [/GRUP] [/NOMVAR#] [/VALORVAR#] [/DESCVAR#] [/VAR#PATH#] [/DATAACTUA] [/DATACADUCA] [/UBIC#] [/DESCUBIC#]
- MMZ 8 MMZXFile Origin_F [/OPC_THUMBNAIL] [/CAPES_LLINATGE]
Options:
- 0:
Information about an MMZX or MMZ file.
- 1:
Uncompress an MMZX or an MMZ.
- 2:
Compress files from a directory (and subdirectories if specified).
- 3:
Compress an MMM or layer, and all its linked files.
- 4:
Compress an MSA.
- 5:
Change a value in the header of the file.
- 6:
Create certificates of MMM files or specific layers.
- 7:
Compress an MMM or a layer, but not including the linked files.
- 8:
Compress for preservation.
Parameters:
- MMZFile
(MMZ File -
Input parameter): This is the name of the compressed file (with or without extension) in MMZX, MMZ or ZIP format.
- Dir
(Directory -
Output parameter): It is the directory within which and from which the files will be uncompressed. It is only indicated in the decompression; it is optional and if not indicated, the working directory is used. If the map is compressed with the option /US=BACKUP, it is not used.
- DirFile
(Files of the directory to be compressed -
Input parameter): Directory from where the user will extract the files to be compressed. The use of wildcards (using '*' and '?') is allowed. It does not make any special interpretation of MiraMon files and, therefore, it does not follow their links.
- MMMFile
(MMM File -
Input parameter): It is the file to be compressed (with extension).
- EXEFile
(EXE File -
Input parameter): This is the name of the EXE MSA file to be compressed (with extension).
- IEntry
(Input Index -
Input parameter): This is the index of the compressed file to which the user will change a feature indicated in the header, indexed from 0.
- NewValue
(New Value -
Input parameter): New value in the header of the MMZX/MMZ file. At the moment, the user can only change the OBERTURA parameter that can take the value 1 or 0, or mark the file as installation file with INST_MM3.
- MMZXFile
(MMZX File -
Output parameter): This is the name of the compressed file (with extension) in MMZX format.
- Origin_F
(Original File -
Input parameter): This is the file to be preserved (with extension).
Modifiers:
/OBRIR_NAVEGADOR
(Open the browser with the file information)
Display the information of the compressed file in the Internet browser (in addition to screen). (Input parameter) /DESCOMPRIMIR_OPC (Uncompress OPC files) Uncompress OPC files (only applies when the file to be uncompressed is an MMZX). (Input parameter) /S
(Subdirectories)
Include files in subdirectories that may be in the directory. (Input parameter) /CERTIFICAT
(Certificate)
This should be indicated if the user wants to certify the files. If left empty, the files will not be certified. Combined with option 3 this allows the user to recompress and certify a MMZX or MMZ, or a layer that was not certified. (Only MiraMon Internet Map Publisher corporate license certifier applications). (Input parameter) /ODBC= (ODBC) Indicates how to compile the linked databases through ODBC (Indicate this parameter only when compressing). In all transforms to DBF format, extended DBF will be used whenever some loss of information would be produced by using classical DBF.- FBD_TO_DBF: Convert file type databases (e.g. MDB files) into DBF before compressing. If FBD_SRV_A_DBF is not indicated, the database files are compressed directly in the original format. In the latter case, if these databases contain links to other files, they will also be compressed with the fact that the links should always be written with a relative path.
- SRV_TO_DBF: Convert server databases (e.g. Oracle) to DBF before compressing. If not indicated, or FBD_SRV_A_DBF has been indicated, this type of database is not compressed, nor the possible links to other files that may contain.
- FBD_SRV_TO_DBF: Convert to DBF the two types of databases indicated above.
(Input parameter) /US= (Merge) Syntax simplified according to its use. They are indicated both when compressing and uncompressing.- BACKUP: To backup maps or layers and restore them to the same place.
- INTERNET: To make publications on the Internet, or on CD/DVD/USB.
- INTERCANVI: To exchange data with other users.
(Input parameter) /REGENERACIO= (Regeneration) This parameter refers to the method of regenerating the path when uncompressing, since when compressing it is indicated how to uncompress the files(s). If not prompted upon uncompressing, the value indicated when compressing is used and, if prompted, the pre-established criterion is ignored when compressing:- IDENTICATE: Path must be identical to the saved path (default value when compressing) (absolute as relative and relative as from the 'destination directory').
- IRELATIVA: Path relative to the unit of the file to be open (for example the MMM). In this unit the path is simplified as much as possible. The 'directory tree' criterion is applied to other files that are in other disk drives or in UNC addresses. (Example of UNC address: \\server\resource\map.mmm).
- TREE: The path is written completely above the current directory using the 'directory tree' criterion. (Recommended in the distribution of information by Internet/CD/DVD/USB.).
- NO_PATH: The uncompressed path is deleted, placing all the files in the destination directory, but avoiding names matches.
(Input parameter) /RELATIU= (Relative) If indicated, the paths inside the file will be saved as relative; if not indicated, the paths will be saved as absolute. In place of value a directory can be indicated, and in this case the paths are saved relative to the location of this directory. The user can also leave it blank and the path will be simplified as much as possible in the map unit (.mmm). UNC units or addresses other than those of reference are always kept as absolute. (Indicate this parameter only when compressing.) (Input parameter) /SDE= (ArcSDE/SDO to MiraMon) Indicates how ArcSDE and/or SDO-type spatial databases will be compressed (This parameter must be specified only when compressing). - SDE_A_DBF: Convert ArcSDE/SDO spatial databases to MiraMon formats before compression. If not specified, this type of database will not be compressed, only REL and/or connection files will be included.
(Input parameter) /OPC (OPC Files) Include OPC files (only applies when the compressed file is an MMZX). (Input parameter) /GRUP= (Group) Group name (only when compressing). (Input parameter) /NOMVAR#= (Variable name) Variable path name (only when compressing). (Input parameter) /VALORVAR#= (Variable value) Value to be replaced by the variable (only when compressing). (Input parameter) /DESCVAR#= (Variable description) Description of the variable (only when compressing). (Input parameter) /VAR#PATH#= (Variable path) Possible alternative values that the variable can take on when the file is uncompressed. (only when compressing). (Input parameter) /DATAACTUA= (Update date) Expected update date of the layer. Format: yyyymmdd (Input parameter) /DATACADUCA= (Expired date) Layout expiration date. Format: yyyymmdd (Input parameter) /UBIC#= (Location) Updated information location. (only when compressing). (Input parameter) /DESCUBIC#= (Location description) Description of the location of the updated information (only when compressing). (Input parameter) /OPC_THUMBNAIL= (Thumbnail of the file) JPEG image to be used as a thumbnail view of the file. This setting is ideal for ensuring that all sheets in a map series have the same thumbnail preview or view. By default, if this parameter is not specified, an attempt will be made to generate an image automatically from the files/s open in MiraMon, the application will invoke MiraMon and generate the map print in a small JPEG automatically; with a result that will generally be reasonable but, in some cases, unsatisfactory. If the setting is specified but left blank, no preview image (not recommended) will be set. (Only applies when the file to be compressed is an MMZX). (Input parameter) /CAPES_LLINATGE (Include lineage layers) Include all layers that are the source of the lineage of the layer to be compressed (Option not recommended). (Input parameter)
Finally, note that it is NOT possible to use the Simplified and Advanced Syntax at the same time.
Recommended syntax for map compression/decompression:
MMZ 3 MMZFile MMMFile /REGENERACIO=ARBRE [/CERTIFICAT]
MMZ 1 MMZFile Dir
Recommended syntax for compression and labeling for opening DBF files:
MMZ 2 MMZFile Taula.DBF /REGENERACIO=RELATIVA /RELATIU= [/CERTIFICAT]
MMZ 5 MMZFile 0 OBERTURA:1