-
Retalla: Layers clipping
This program allows you to clip IMG, JPG, WMS, and structured and not
structured vectors.
Layers clipping:
This program clips from an envelope (the coordinates (UTM, etc.) must be done in the clipping file units).
Clipping by mask:
This program clips from a polygonal object.
In files raster, the program extracts the window nearest to the requested
one and that wraps it completely.
In raster files, a clipping alternative way, more visual, is to use
MiraMon (File | Save as IMG/JPEG). In vectors, you can digitize a small file
that delimits the area and use it as clipping file.
With this application it is possible to save a clipping of a WMS server layer
·· (only the display part, equivalent to the GetMap request) or a
··clipping of a WMTS server layer (the display part
··equivalent to several GetTile requests or to several accesses to resources
··RESTful from the layer display templates).
··The WMS/WMTS layer to be clipped can be from any server that follows the
··OGC WMS/WMTS standards (from the server URL) or it can be
··any local server from the REL5 file (this last possibility
is much faster since the original tessellation of the layer can be·taken directly). The result is always a REL5 and a layer prepared at different zoom levels. As in the other options, the clipping can be done by envelope or by mask
··vector. When clipping is done by scope (option 1), and for each level of
··zoom, the prepared pieces of the original layer that fall
··totally or partially within the chosen scope are replicated. In the case of
··irregular mask (option 2) the program replicates the minimum necessary number of
··pieces, in addition, if a mask is provided, the areas external to the mask will be removed
·· (this last option adds a process that slows down ··obtaining the result).
Syntax:
- Retalla 1 InputFile OutputFile Xmin Xmax Ymin Ymax [/MULTIBANDA] [/PREFIX] [/TESSELLA_COMPLETA] [/PIRAMIDE_ZOOMS] [/NCOL_TESSELLA] [/NFIL_TESSELLA] [/TIPUS_CAPA] [/SERVICE_MD_URL] [/ID_CAPA_DEMANAR] [/TILE_MATRIX_SET] [/ALGORISME] [/SIMPLIFICA_VERTEXS]
- Retalla 2 InputFile OutputFile MaskFile [/COND#_CAMP] [/COND#_OP] [/COND#_VALOR] [/COND#_NEXE] [/COND#_PRIOR] [/MULTIBANDA] [/PREFIX] [/TESSELLA_COMPLETA] [/PIRAMIDE_ZOOMS] [/NCOL_TESSELLA] [/NFIL_TESSELLA] [/TIPUS_CAPA] [/SERVICE_MD_URL] [/ID_CAPA_DEMANAR] [/TILE_MATRIX_SET] [/ALGORISME] [/SIMPLIFICA_VERTEXS]
Options:
- 1:
The envelope to clip is indicated with MinX MaxX MinY and MaxY.
- 2:
The envelope to clip is indicated with an irregular mask, MaskFile (only for vectorial and WMS files). The external objects to the mask are eliminated.
Parameters:
- InputFile
(Input File -
Input parameter): Is the preexisting file to clip. This is the name of the REL 5 file in case of clipping WMS layers. En el cas de retall de capes WMS de servidors externs és una petició 'GetMap' (que segueix qualsevol de les versions de l'estàndard), que com a mínim inclou la URL de l'aplicació servidora, l'identificador de la capa a retallar i del seu estil de visualització, l'identificador del sistema de referència i el format en el que s'ha de sol·licitar les imatges. (Per ex. http://www.maps.cat/MiraMon.cgi?VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:23031&LAYERS=MCSC&FORMAT=image/gif&TRANSPARENT=TRUE&STYLES=SEMITRANSPARENT). En el cas de retall de capes WMTS en GET/KVP, és una petició 'GetTile', que com a mínim inclou la URL de l'aplicació servidora, l'identificador de la capa a retallar i del seu estil de visualització, l'identificador del patró de tall que segueix la capa i el format en el que s'ha de sol·licitar les imatges . (Per ex. http://www.opengis.uab.cat/cgi-bin/TiledWorld/MiraMon.cgi?VERSION=1.0.0&SERVICE=WMTS&REQUEST=GetTile&LAYER=AdminBoundaries&STYLE=default&FORMAT=image/png&TILEMATRIXSET=World84-90_CRS_84). En el cas del retall de capes WMTS en RESTful és la plantilla URL per accedir als recursos de visualització de la capa en el format sol·licitat; per ex: www.opengis.uab.cat/SITiled/world/AdminBoundaries/default/World84-90_CRS_84/{TileMatrix}/{TileRow}/{TileCol}.png. Els formats gif i png només se suporten en el retall de capes WMS/WMTS.
- OutputFile
(Output File -
Output parameter): Is the name of the resulting clipped file. This is a directory in case of a multiband clipping. This is the name of a REL 5 file in case of WMS layers (local and external servers).
- Xmin
(X minimum -
Input parameter): It is the X minimum coordinate of the output envelop. If these coordinates do not fit with the pixel grid defined by the first input image, they are adapted by excess.
- Xmax
(X maximum -
Input parameter): It is the X maximum coordinate of the output envelop. If these coordinates do not fit with the pixel grid defined by the first input image, they are adapted by excess.
- Ymin
(Y minimum -
Input parameter): It is the Y minimum coordinate of the output envelop. If these coordinates do not fit with the pixel grid defined by the first input image, they are adapted by excess.
- Ymax
(Y maximum -
Input parameter): It is the Y maximum coordinate of the output envelop. If these coordinates do not fit with the pixel grid defined by the first input image, they are adapted by excess.
- MaskFile
(Mask file -
Input parameter): Is the name of the file that defines an irregular polygon (only for WMS and vectorial layers). In this case, it is possible to indicate optionally a set of parameters that define the selection (for instance: /COND1_CAMP=). To know more about the values of these parameters continue the considerations of the general syntax document .
Modifiers:
/COND#_CAMP=
(Field of Condition #)
Field name of # condition of selection. It may be made up to 100 simple queries and 100 field names (COND#_CAMP) starting at index 1. (Input parameter) /COND#_OP=
(Operation of condition #)
Opertation of # condition of selection. It may be made up to 100 simple queries and 100 operations (COND#_OP) starting at index 1. (Input parameter) /COND#_VALOR=
(Value of condition #)
Value of # condition of selection. It may be made up to 100 simple queries and 100 values (COND#_VALOR) starting at index 1. (Input parameter) /COND#_NEXE=
(Nexus linking of condition #)
Nexus use to linking for the successive selections. In this case to linking between condition # and condition #+1. It may be made up to 100 simple queries and 99 nexus (COND#_NEXE) starting at index 1. (Input parameter) /COND#_PRIOR=
(Priority of nexus linking of condition #)
Priority of nexus use to linking for the successive selections. In this case to linking between condition # and condition #+1. It may be made up to 100 simple queries and 99 priorities (COND#_PRIOR) starting at index 1. This is an optional parameter. If it is not indicated the priority is just the order. (Input parameter) /MULTIBANDA (Multiband raster) In the case that the raster file raster is a part of a multiband raster all the bands are clipped. Does not apply in the case of WMS/WMTS clipping or vector layers. (Input parameter) /PREFIX= (Prèfix bandes ràster) In the case that the raster file is part of a multiband raster, a prefix must be indicated for each of the bands that will be generated in the output directory. This does not apply in the case of WMS/WMTS clipping. (Input parameter) /TESSELLA_COMPLETA (TESSELLA_COMPLETA) This parameter is specific to WMS layers. In the case of clipping local layers (REL 5) it only applies to irregular masks. In the case of external server layers it applies to both types of clipping, both by area and by irregular mask; in the case of clipping by area, it is used to obtain all the tiles of the same size, making an excess clipping if necessary. In the case of WMTS, complete tiles of the same size are always obtained, the tiles that are outside the area or the irregular mask are masked to the NODATA value. Therefore, in this case of WMTS there is no possibility of choosing and therefore this parameter does not apply. (Input parameter) /PIRAMIDE_ZOOMS (PIRAMIDE ZOOMS) List of zoom levels, separated by commas, at which the WMS layer from an external server is to be obtained; or, list of "tileMatrix" identifiers, separated by commas, at which the WMTS layer is to be obtained. This involves building a pyramidal structure of tiles or fragments of the image, where each level of the pyramid contains the layer at a given zoom level (or pixel side). In the case of WMS, this zoom level must be indicated in the units of the reference system in which the layer is being requested. The list should contain the most common zoom levels considering the scope of the layer and its resolution. In the case of WMTS, each tileMatrix has an associated zoom level. This parameter is mandatory for external WMS/WMTS servers and should not be indicated in other cases. (Input parameter) /NCOL_TESSELLA= (NCOL TESSELLA) Number of columns that each of the tiles that are requested from a WMS server must have to make a cut of one of its layers. This parameter is mandatory for external WMS servers and should not be indicated in other cases. In WMTS this parameter does not apply since the width of the tile is determined by the "TileMatrix". (Input parameter) /NFIL_TESSELLA= (NFIL TESSELLA) Number of rows that each of the tiles that are requested from a WMS server must have to make a cut of one of its layers. This parameter is mandatory for external WMS servers and should not be indicated in other cases. In WMTS this parameter does not apply since the height of the tile is determined by the "TileMatrix". (Input parameter) /TIPUS_CAPA= (TIPUS CAPA) Type of WMS/WMTS layer to be clipped. We will indicate 'I' if it is an image, 'P' if it is a polygon layer, 'L' if it is a line layer or 'S' if it is a symbol layer. This parameter can only be indicated for clippings from external WMS/WMTS servers. All layers are a pictorial representation (therefore, in raster format) but the objects they represent can be of different types. This parameter is only written in the output REL5 file, without affecting the execution of the application. This parameter is used so that the layer is better visualized when interpolations between pre-prepared zoom levels must be made. (Input parameter) /SERVICE_MD_URL= (SERVICE MD URL) URL of the service metadata. Only applies to WMTS layer clipping in RESTful, in this case it is mandatory since this data contains the description of the clipping pattern in which the layer must be requested. (For example: /SERVICE_MD_URL=http://www.miramon.uab.cat/ogc/wmts/OSM/1.0.0/WMTSCapabilities.xml). (Input parameter) /ID_CAPA_DEMANAR= (ID CAPA DEMANAR) Identifier of the WMTS layer to request. Only applies to RESTful WMTS layer clipping, in which case it is mandatory. (Input parameter) /TILE_MATRIX_SET= (TILE_MATRIX_SET) Identifier of the tileMatrixSet (or slice pattern) of the WMTS layer to request. Only applies to RESTful WMTS layer slicing, in which case it is mandatory. (Input parameter) /ALGORISME= (Algorisme) This parameter is used to determine the type of algorithm that the application will use to cut the vectors in the topological structure.- ESCOMBRATGE Based on the intersection of segments Bentley-Ottmann.
- DIRECTE: Based on the exploration of all segments against all segments to determine the intersections between Victor by the topological structure.
- AUTOMATIC: MiraMon automatically decides which of the two algorithms used.
(Input parameter) /SIMPLIFICA_VERTEXS (Simplify vertices) Simplify intermediate line vertices if it doesn't mean a change on the topology. (Input parameter)
