Merge Tiles

Feature Description

Merge tiles refers to combining multiple raster or vector tiles stored locally or in MongoDB to update existing tiles or create new ones. This feature is commonly used to integrate data from different regions or from the same region at different periods, avoiding repetitive tile generation and improving work efficiency.

Supported merging methods include: MongoDB Tiles to MongoDB Tiles; Local tiles to MongoDB Tiles; Local tiles merged and stored as MongoDB tiles.

Before merging MongoDB Tiles, ensure MongoDB service is running locally. The tiles to be merged must meet the following conditions:

  • Consistent coordinate systems.
  • Identical tile sizes.
  • Consistent tile origin coordinates (adjustable through tile bounds parameters during map tile generation).
  • Same tile formats.

Feature Entry

  • Data Tab->Manage Tiles Group->Manage Tiles.

Steps

  1. Add Tiles: Supports adding MongoDB tiles and local tiles. For details, see Add Tiles.
  2. Merge Tiles: Click the Merge button in the Manage Tiles panel toolbar to open the Merge MongoDB Tile dialog.
  3. Select merge storage method in the left panel:
    • Merge to Existing Tile: Update existing tiles with selected tile content. Merge multiple data versions into existing tile data. Select tile name from the dropdown list.
    • Merge to New: Combine selected tiles into new tiles stored locally or in MongoDB.
      • Storage Format: Choose Original, Compact, or MongoDB format. For Original/Compact formats, set Target Tile Directory and Target Tile Name. For MongoDB format, configure Server Address, Database Name, Tile Name, Username, and Password.
      • Target Tile Directory: Set storage path for output tiles.
      • Target Tile Name: Specify output tile name.
      • Server Address: Enter MongoDB server address.
      • Database Name: Specify database name for storing map tiles.
      • Tile Name: Define map tile name.
      • Username/Password: Provide credentials if database requires authentication.
  4. Configure tile selection and merge order in the right panel:
    • Select tiles: Check tiles to participate in merging.
    • Tile order: The vertical sequence determines overlay results. Use ordering buttons to adjust merge sequence. Merging proceeds top-down. Example with Tile1 and Tile2:
    Tile Name
    Tile Order
    Illustration
    When ordered Tile1 above Tile2: Overlap areas show Tile2 covering Tile1
    When ordered Tile2 above Tile1: Overlap areas show Tile1 covering Tile2

    Overlap Handling:

    • Raster Tile Merging
      • For PNG tiles with transparent background: Overlap areas will be blended to handle edge matching.
      • For JPG_PNG format: PNG format used for tiles with invalid pixels (map edges), JPG otherwise. Automatic format selection in overlap areas resolves white edge issues.
      • Other tile formats: Overlap areas follow merge order for overlay operations.
    • Vector Tile Merging
      • Vector Data: Overlapping vector tiles follow merge order for overlay operations.
      • Tile Styles: For tiles with different styles, later tiles' style files replace earlier ones with same names; unique style files are preserved.
  5. Enable Multi-Processing: Set number of processes (default based on CPU threads: threads ≤16 defaults to threads-1; threads >16 defaults to threads-2). Adjust according to system resources to improve performance.
  6. Click OK to execute merging. Successful completion will show in output window.
  7. Example: Merging global shaded relief raster tiles stored locally and in MongoDB produces following result:
Figure: Merging Result of Local Tiles and MongoDB Tiles

Related Topics

Manage Tiles

Extract Tiles