Skip to main content

Silent import

Scope​

This page is intended for operators who are authorized to manage the MapCore™ Map Layer Server.

This page presents information required to add layers to MapCore™ Map Layer Server without using the MapCore™ GUI, a process known as silent import. The silent import procedure requires that operators directly access server folders, and therefore it cannot be implemented remotely.

warning

Operator mistakes during silent import will prevent the import of data to the server. Refer to Silent Import Mechanism Pros and Cons to fully understand the advantages and disadvantages of the silent import vs. GUI import of layers.

Silent import allows the operator to add layers without the use of a GUI by manually creating an import package comprising layer data (see Layer data) and a package descriptor (see Package Descriptor) where these materials are referenced and layer parameters are defined. The import package is saved to a folder accessible by the MapCore™ Map Layer Server (see Silently Import New Layer) and then automatically added to the map repository, as the server periodically scans the folders containing packages for additions or updates. Refer to Silently Import New Layer for detailed instructions.

Silent Import Mechanism Pros and Cons​

The table below describes the pros and the cons of using the silent import mechanism.

Table 5-1 Silent import mechanism pros and cons

IssueProsCons
DataThe files are not duplicated, thereby saving time and disk space. When adding layers using the GUI, files are transferred from the client machine to the server (even if it is the same machine).The operator manually copies data to folders that are used by the server. A misuse might cause harm to other mapping material and data.
AccuracyThe operator can use more options to set unusual materials (e.g., special textures and additional parameters that are usually not considered).Without a GUI process that guides the operator, complexity and probability of human error increase.
TimeWhen the original dataset is particularly large (e.g., 3D model comprising tens of GBs and possibly thousands of files), the GUI upload process may take days. Silently importing the data, the operator may zip all data to a single file which is then copied to the server and unzip there, there by shortening to several hours.As above, increased risk for human error.

Silently Import New Layer​

Before starting the silently import procedure, consult Silent Import Folder Layout for recommended structure and location of silently imported data. This will bear on your choice of file locations, file names, and use of relative and absolute path names in the package descriptor.

  1. Copy layer data (see Layer data) to a target folder that is accessible by the server.

  2. Create a package descriptor as described and named in Package Descriptor. Pay particular attention to the use of relative and absolute path names in the package descriptor.

  3. Save the package descriptor to the silent import package folder located under the ExternalLayers folder (see Silent Import Folder Layout). Upon its next scan of the ExternalLayers folder, the MapCore™ Map Layer Server will upload the layer to the map repository. The server scans the ExternalLayers folder every ImportScansInterval seconds (60 by default; see Server Parameters). Once processed, the package descriptor is renamed to <name>.json.imported if the import succeeded, or to <name>.json.failed if it failed.

Silent Import Folder Layout​

Figure 5-1

Figure 5-1 Silent import folder and file structure

A silent import package comprises two logical entities: layer data and package descriptor. For MapCore™ Map Layer Server to import data, the import package must be placed under the silent import data folder, which, in turn, is always located under the data repository folder. The silent import data folder must be named ExternalLayers. Refer to System Folders and Configuration Files for details on MapCore™ Map Layer Server directory structure and recommendations for customizing it to prevent data loss in the event of server update.

There are no limitations on the structure of the ExternalLayers folder. However, it is recommended that both the layer data and the package descriptor of the import package reside in a single folder. The following structure is highly recommended for ease of use and maintenance:

It is recommended that data be organized in a meaningful way, such as geographic locality, under the ExternalLayers folder (e.g., <PackageFolder 1> in Figure 5-1 above). Within the ExternalLayers/<PackageFolder 1> folder, it is recommended to store all layers pertaining to the subject of <PackageFolder 1>. While each subfolder of the ExternalLayers folder may contain several layers, each layer can have only one corresponding package descriptor. Thus, within each <Subfolder *n*>, it is recommended to store as many <LayerData> subfolders as necessary, each with its corresponding package descriptor file (e.g., <LayerData 1> with its corresponding package descriptor file<PackageData 1.json>, in Figure 5-1 above). There are no limitations on folder names within the ExternalLayers. However, the package descriptor JSONfile name must start with the string Packagedata (e.g., PackageData_Netanya.json).

A relative data path in the PackageData<*>.json is resolved from the data repository folder, not from the folder of the package descriptor, so it starts with ExternalLayers (e.g., ExternalLayers/<PackageFolder 1>/<LayerData 1>), as in the examples below. Such a path keeps working wherever the data repository folder is moved. For layer data outside the data repository folder, use an absolute path.

Layer data​

A layer's data can reside in any folder as long as it is referenced correctly by the package descriptorJSON file. Refer to Silent Import Folder Layout for details on recommended data structure.

Package Descriptor​

The package descriptor is a JSONfile, the name of which must start with the string PackageData (e.g., PackageData_Netanya.json).

The package descriptor has two main parameters as detailed in the following table.

Table 5-2 Package descriptor parameters

ParameterDescription
ExportingServerHostNameWhen creating the package manually leave this field empty. Its value will auto-populate when the package is created by a special tool.
MapLayerConfigBlock of information describing layer-specific parameters following the schema detailed in User-specific Layer Parameters. See below for detailed examples per layer types. An exact description of parameters of all layer types may be found in the file ServerConfig.xsd file that is located in same folder as McMapLayerServer executable. Refer to System Folders and Configuration Files for further information.

It is recommended to use relative paths for the layer data along these lines: ExternalLayers/Data/RAWDTM/DTM. Absolute paths can be recognized as follows:

  • In Linux, an absolute path begins with /

  • In Windows, an absolute path begins with <disk letter>:\ such as C:\

Examples per layer type are presented in the following sections. Package descriptors of raw material and raw traversability layers (RAW_MATERIAL, RAW_TRAVERSABILITY) follow the raw raster example, with a Material or a Traversability block, respectively, in place of the Raster block (see Material and Traversability Parameters). The block must match the layer type; otherwise the layer is not imported.

Native Layer​

Native layer package descriptors are fairly simple in form since all parameters have been converted into native MapCore™ format, so there is no need to define parameters separately as done for raw layers. Below is an example for a native layer package descriptor file. NativeLayerPath may point either to the native layer’s folder or to a 3TZ archive file (*.3tz) holding the layer.

Example file name: PackageDataDTM-Israel1.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "Netanya-group",
"Title": "IsraelDTM-1",
"LayerType": "NATIVE_DTM",
"Group": "Netanya-group",
"NativeLayerPath": "C:\\maps\\IsraelDTM-GW-Streaming"
}
}

Raw Raster Layer​

Example file name: PackageDataRawRaster.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "RAWMACCABIM",
"Title": "RAWMACCABIM",
"LayerType": "RAW_RASTER",
"LayerUUID": "05aca8c5-b65f-458c-bf79-59e512a56f17",
"Group": "RAWMACCABIM",
"RawLayerInfo": {
"TilingScheme": "GLOBAL_LOGICAL",
"CoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
},
"Raster": {
"Location": [
{
"LocationType": "FOLDER",
"Path": "ExternalLayers/Data/RAWRASTER/Raster"
}
]
}
}
}
}

Raw Vector Layer​

Example file name: PackageData_RawVector.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "PolyVector",
"Title": "PolyVector",
"LayerType": "RAW_VECTOR",
"Group": "PolyVector",
"RawLayerInfo": {
"CoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
},
"Vector": {
"DataSource": "ExternalLayers/Data/RawVector/Polygon/polygon.shp",
"SourceCoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
},
"MinScale": 0.0,
"MaxScale": 50.0,
"MaxScaleFactor": 0.0003499999875202775
}
}
}
}

Raw 3D Model Layer​

For raw 3D model layers, TilingScheme and the coordinate system are ignored, since the model is served as is. DataSourceDirectory may point either to the 3D Tiles folder or to a 3TZ archive file (*.3tz).

Example file name: PackageDataRAW_3D_MODEL.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "ElbitCampus",
"Title": "Elbit Campus - Hamachshev 2, Netanya",
"LayerType": "RAW_3D_MODEL",
"LayerUUID": "857d38a3-925f-4bda-a67a-1fe9392205c5",
"Group": "ELBIT",
"RawLayerInfo": {
"TilingScheme": "GLOBAL_LOGICAL",
"CoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
},
"Model3D": {
"DataSourceDirectory": "ExternalLayers/Data/RAW_3D_MODEL/Elbit_3DTiles"
}
}
}
}

Raw Vector 3D Extrusion Layer​

Example file name: PackageDataRAW_3D_MODEL.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "Natanya-buildings",
"Title": "Natanya-buildings",
"LayerType": "RAW_VECTOR_3D_EXTRUSION",
"LayerUUID": "063d7c6e-3a2c-4f4f-969f-cbbe0cfe19f7",
"Group": "Netanya-group",
"RawLayerInfo": {
"TilingScheme": "GLOBAL_LOGICAL",
"CoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
},
"Vector3DExt": {
"DataSource": "ExternalLayers/Data/net/net/net.shp",
"DtmLayerId": "Netanya-group",
"SideDefaultTexture": {
"TextureFile": "ExternalLayers/Data/net/Asphalt_01.png",
"Scale": {
"X": 512.0,
"Y": 1920.0
},
"PlacementFlags": {
"X": [
"NONE"
],
"Y": [
"NONE"
]
}
},
"RoofDefaultTexture": {
"TextureFile": "ExternalLayers/Data/net/Asphalt_02.png",
"Scale": {
"X": 512.0,
"Y": 512.0
},
"PlacementFlags": {
"X": [
"NONE"
],
"Y": [
"NONE"
]
}
},
"HeightColumn": "height"
}
}
}
}

Raw Vector S-57 Layer​

Example file name: PackageDataS57.json

Example file content:

{
"ExportingServerHostName": "",
"MapLayerConfig": {
"LayerId": "allS57",
"Title": "allS57",
"LayerType": "RAW_VECTOR",
"Group": "Vector4",
"RawLayerInfo": {
"CoordinateSystem": {
"SRIDType": "EPSG",
"Code": 3006
},
"Vector": {
"DataSource": "ExternalLayers/Data/S57",
"StylingFormat": "S52",
"Locale": "SV",
"SourceCoordinateSystem": {
"SRIDType": "EPSG",
"Code": 4326
}
}
},
"ClientMetadata": {
"AutoLoad": 1,
"AutoView": 1,
"MinScale": 0,
"MaxScale": 50000000,
"FillEmptyTilesByLowerResolutionTiles": 0,
"IsPhotoRealistic": 0,
"MapType": "RASTER",
"MapSubType": "WMTS"
}
}
}

Verified against MapCore 12.5.0