Select Page
Basic - Supported map layer formats

Supported map layer formats

Walter Maps supports the following formats:

  • Shape-format
  • Ordinary TIFF 
  • GeoTIFF
  • JPEG
  • WMS/WMTS (viewing only).

Supported coordinate systems

For the Shape format, ordinary TIFF, GeoTIFF, and JPEG, only projected coordinate systems (i.e. X and Y coordinates and not Latitude and Longitude coordinates) are valid and all the layers in the map must share the same projected coordinate system. Layers lacking coordinate systems will inherit the presently used coordinate system in Walter Maps.

For WMS/WMTS layers, both projected coordinate systems (i.e. X,Y coordinates) and geographic coordinate systems (i.e. Latitude, Longitiude coordinates) are valid.

The Shape vector file format

For the Shape format, attributes for integers, floating point numbers, and strings can be viewed and edited. In the Free and Pro version of Walter Maps you can:

  • add and delete points, lines and polygons

In Walter Maps Pro the following editing is supported:

  • Cut polygons by temporary cutting lines or by lines in other layer
  • Merge geometries
  • Split multi-part geometries
  • Clean polygon layers, e.g. remove spikes and micro-gaps
  • Create new point, line, or polygon vector layers
  • Adding of fields
  • Deleting fields is not possible in order to preserve data consistency towards other unknown systems

Required files for the shape format

In order for Walter Maps to use and recognize the shape format, the following files are needed:

  • *.shp
  • *.shx
  • *.dbf

Optional files for the shape format

Optional files for the shape format are:

  • *.prj

The ordinary TIFF and GeoTIFF raster file formats

For the TIFF and GeoTIFF, rasters can be viewed and single raster cell values can be measured. The following color formats and data types are supported by the TIFF and GeoTIFF raster formats:

  • 8 bit grayscale
  • 8 bit color indexed
  • 24 or 32 bit color (alpha channel not considered by Walter Maps in 32 bit color format)
  • Multispectral (n-bands) 8 bit, where the three first bands will be visualized as RGB color
  • Single band or Multispectral (n-bands) 16 bit (unsigned short or signed short), where the first band will be visualized in grayscale
  • Single band or Multispectral (n-bands) 32 bit (unsigned int or signed int), where the first band will be visualized in grayscale
  • Single band or Multispectral (n-bands) 32 bit (float), where the first band will be visualized in grayscale
  • Single band or Multispectral (n-bands) 64 bit (double), where the first band will be visualized in grayscale

Required files for the oridnary TIFF format

In order for Walter Maps to use and recognize the ordinary TIFF format, the following files are needed:

  • *.tif
  • *.tfw

Required files for the GeoTIFF format

In order for Walter Maps to use and recognize the GeoTIFF format, the following file is needed:

  •  *.tif

Optional files for the ordinary TIFF and GeoTIFF formats

Optional files for the TIFF and GeoTIFF formats are:

  • *.rrd and *.aux
  • *.tif.aux.xml

The JPEG raster file format

For the JPEG format, rasters can be viewed and single raster cell values can be measured. The following color formats and data types are supported by the JPEG raster format:

  • 8 bit grayscale
  • 24 bit color

Required files for the JPEG format

In order for Walter Maps to use and recognize the JPEG format, the following files are needed:

  •  *.jpg
  • *.jgw

Optional files for the JPEG format

Optional files for the JPEG formats are:

  • *.rrd and *.aux
  • *.jpg.aux.xml

WMS/WMTS web map services

Walter Maps Free and Pro supports viewing of online web map services. In Walter Maps Pro you can export these to offline rasters in GeoTIFF format. The connection to the specific web map server is made through a local service description XML file. The format of the WMS and WMTS xml files is described in the extrernal GDAL links link 1 and link 2 respectively. In Walter Maps the xml is saved as *.wmwmx (Walter Maps web map xml).

Required files for the WMS/WMTS formats

In order for Walter Maps to use and recognize the the WMS/WMTS formats, the following file is needed:

  • *.wmwx

Example of WMS/WMTS *.wmwmx files

The first example is for viewing of the USGS Topological Map

You can download the USGS Topological Map *.wmwmx file from topographic_map_of_usa.wm_layer.zip. In Walter Maps Pro you can also open the link directly from an URL download. 

The second example is for viewng of USGS Aerial Imagery (appr. 12 feet/4 m resolution)

You can download the USGS Arial imagery *.wmwmx file from usgs_imagery_only.wm_layer.zip. In Walter Maps Pro you can also open the link directly from an URL download. 

New Orleans, Louisiana (LA), USA. Open street map tiles overlaid on top of the USGS aerial imagery.

Basic - Other supported files

Other Supported  files

Beside the basic map layer formats, Walter Maps also supports the following:

  • Walter Maps map package (*.wm_map.zip)
  • Walter Maps layer package (*.wm_layer.zip)
  • Symbols in SVG format (*.svg)
  • Walter Maps symbol package (*.wm_symbols.zip)
  • Walter Maps language files (*.lang)

Walter Maps map package (*.wm_map.zip)

Walter Maps map package is a compressed zip-file containg all your map layers in the map, all layer symbologies, all media files (images, videos), projection information, and all user symbols. In Walter Maps, when saving all your layers to dropbox, device (applicable to Android devices only), or to e-mail, a map package will automatically be created and saved.

The saved map package can be opened from dropbox, your device (applicable to Android devices only), and from an URL-link (Walter Maps Pro only). Any map package produced by Walter Maps Pro (or Free) can be opened in Walter Maps Free (and Pro, of course).

The Walter Maps map package is an open format, i.e. you can produce your own map packages in your own system. Please, see the section “Advanced – Building your own Walter Maps map packages” below for more information.

Walter Maps layer package (*.wm_layer.zip)

Walter Maps layer package is a simple compressed zip-file containg one or more map layers and their required files. You can easily produce your own layer packages by compressing all required files to the root of a zip file. Layer packages containing other files not recognized as map layers will not be opened at all by Walter Maps.

In Walter Maps, when saving one of your layers to dropbox, device (applicable to Android devices only), or to e-mail, a layer package will automatically be created and saved.

The saved layer package can be opened from dropbox, your device (applicable to Android devices only), and from an URL-link (Walter Maps Pro only). Any layer package produced by Walter Maps Pro (or Free) can be opened i Walter Maps Free (and Pro, of course).

Symbols in SVG format (*.svg)

All points in a vector point layer are visualised by symbols in SVG format. You can use your own point symbols and you download the from dropbox or from your device (applicable to Android devices only). SVG symbols can be produced in for example Adobe Illustrator or in the open source software Inkscape. Walter Maps does not support all fancy stuff of the SVG-format. Therefor, in order for the SVG-files to work with Walter Maps, please follow these simple technical guide lines:

  • Convert all text to paths
  • Convert all strokes to paths
  • Do not use gradients of colors within SVG objects, use only single colors

Walter Maps symbol package (*.wm_symbols.zip)

Walter Maps symbol package is a simple compressed zip-file containg one or more svg files. You can easily produce your own symbol packages by compressing all svg files to the root of a zip file.  Symbol packages containing other files not recognized as svg files will not be opened at all by Walter Maps.  

The symbol packages can be opened from dropbox, your device (applicable to Android devices only), and from an URL-link (Walter Maps Pro only). 

Walter Maps language files (*.lang)

Walter Maps language files are simple text files, defining all text strings in Walter Maps in different languages. I you want to create your own language files, please follow the guidelines provided in the section “Advanced – Creating your own langauage files” below.

The Walter Maps langauage files can be opened from Dropbox or from your device  (applicable to Android devices only).

Basic - Import and export vector formats (Walter Maps Pro)

Import/export vector point formats

Walter Maps supports the following import/export vector point format:

  • Walter Maps point text format (*.wmtxt) 

Walter Maps supports the following export only format:

  • Microsoft Excel (*.xls)

Walter Maps point text format (*.wmtxt)

Walter Maps is a simple semi-colon separated text file for importing point features (point geometries and their attributes) to a point shape file.

The structure of the text file is as:

X;FIELDB;y;FIELDD;FIELDE
345;;234.6;33.8;
366;22;22;44;23.5
223;;334;55;TEXT EXAMPLE 2
334;text example 1;123;i; 

In order for the file to be imported the following requirements must be fullfilled:

  • All field names and values must be separated by semi colons “;”.
  • Field names should not be longer that 8 characters and should be built from the characters “A-Z”, “a-z”, “_”, and “0-9”.
  • The number of semi colons per row must allways be equal to (number of fields -1), even for rows with missing values.
  • All floating point numbers shall use “.” as decimal delimiter.
  • The first row consists of unique field names.
  • There must exist one Y and one X field (both upper and lower case allowed).
  • There must not exist any row with missing X and Y values.
  • Missing values are allowed for other fields than the X and Y fields.
  • No other existing map layer in Walter Maps must have the same base name as the file you are about to import. 
  • If the length of a text fields exceeds 253 characters, the text field will be shortened to 253 characters.

Importing files in point text format (*.wmtxt)

These files can only be imported from Dropbox, your device (applicable to Android devices only) and from URL downloads. You can download the above example file example from example.wmtxt. You can also open the link directly from an URL download in Walter Maps.

Files in Walter Maps point text format (*.wmtxt) can neither be included in Walter Maps map packages *.wm_map.zip, nor in Walter Maps layer packages *.wm_layer.zip. 

Exporting vector layers to point text format (*.wmtxt)

All vector layers in Walter Maps, even line and polygon layers, can be exported to Walter Maps text format (*.wmtxt). The vector layers can be exported to Dropbox, your device  (applicable to Android devices only), or to e-mail.

As X and Y values, the centroid (mid point) is calculated for each geometry. The centroid is guaranteed to be within or on the boundary of each geometry. For line and polygon layers, no geometry is exported, beside the centroid (mid point).

Exporting vector layers to Microsoft Excel (*.xls)

All vector layers in Walter Maps, even line and polygon layers, can be exported to Excel format (*.xls). The structure of the xls-file is the same as for the Walter Maps point text format above. The vector layers can be exported to Dropbox, your device  (applicable to Android devices only), or to e-mail.

Advanced - Building your own Walter Maps map packages

Walter Maps can easily be used as a field data collection tool for entrepreneurs, organizations and systems in need of that. Through our open and well documented map package format and map document format, you can easily create your own collection of maps for distribution to your collegues, partners, customers, and friends. Of course, you can use Walter Maps to produce your map packages, but sometimes you migth want produce the map packages automatically from your own systems. The formats for the map package and the map document are based on open standards, i.e. it is based on the zip-file format, ordinary text files, and JSON text files. The map package consits of a single zip file where you put all your map layers and other needed configuration files.

You don´t need to read this manual section if you are not going to build your own Walter Maps map packages.

Source code

In the end of this section you will find a link with c++ source code for saving and loading the Walter Maps map document in JSON-format. Of course, you can use your own language of choice for reading and saving JSON-files.

Future expansion

The Walter Maps map document is built to cope with future expansions, i.e. a lot of fields in the map document are not used for the moment. Only few and small future format changes will therefore occure. Your efforts for coding your own map package creation routines will therefore not be in vain, not now and not for the future.

Naming convention

The map package should always end with *.wm_map.zip in order to be recognized by Walter Maps. When exporting a map package from Walter Maps it will always be named like WALTERMAPS_20170323_123838.wm_map.zip, i.e. it will be named by the current device date and time. When producing your own map packages, you can name it differently as long as it ends with *.wm_map.zip.

Contents of the map package

The map package shall at minimum contain the following files:

  • The map document, i.e. waltermapsdoc.json
  • Walter Maps projected coordinate system definition file, i.e. waltermapsdeviceprojection.txt 
  • and map layer(s), i.e. GeoTIFF/TIFF-, JPEG-, Shape-, or WMS/WMTS-defintion files
    • For GeoTiff:
      • Required file:
        *.tif
      • Optional files: 
        *.rrd and *.aux
        *.tif.aux.xml
    • For ordinary TIFF:
      • Required files:
        *.tif
        *.tfw
      • optional files:
        *.rrd and *.aux
        *.tif.aux.xml
    • For JPEG:
      • Required files:
        *.jpg
        *.jgw
      • Optional files:
        *.rrd and *.aux
        *.jpg.aux.xml
    • For WMS/WMTS:
      • Required file:
        *.wmwmx
    • For Shape:
      • Required files:
        *.shp, *.shx, and *.dbf
      • Optional files:
        *.prj

The required and optional files above shall all be placed in the root of the compressed map package zip file.

The projection definition file – waltermapsdeviceprojection.txt

Lets start with the file waltermapsdeviceprojection.txt. This file only contains a single line of text, identifying the currently used projected coordinate system. As text string you should use the human readable EPSG string identifier (i.e. do not use the EPSG numerical ID). For example, the file waltermapsdeviceprojection.txt can contain the string “sweref99 tm” or “nad83(harn) / new york central” (without quotation marks). For a full list of projected coordinate systems please visit http://spatialreference.org/

The map document – waltermapsdoc.json

In the examles below, comments will be added after two slashes “//” even though they are not valid comments in json files. Manadatory fields will be marked with M, non used fields for future expansion will be marked with F, valid ranges vill be given after letter R, and default mandatory values will be given after letter D. The only valid data types are integer (e.g. 3 or 48), double (e.g. 3.14159265), boolean (i.e. true/false), or string. Max and Min below denotes the maximum and minimum value for the present data type.  

The mapdocument waltermapsdoc.json is a human readable utf-8 encoded json text file containing the information of all layers in the map package and how to visualize them. In it its simplest format it looks like:

{
  "WalterMapsDoc":
  {
    "m_version": 1,            
// map document version, integer, M, D:1
    "m_scale": 50000,           // map scale, integer, M, R:100-Max
    "m_centre_x": 805070.14,    // map centre x, double, M, R:Min-Max
    "m_centre_y": 7316487.44,   // map centre z, double, M, R:Min-Max
    "m_centre_z": 0,            // map centre x, double, M, F, D:0
    "m_layers": [],             // Array of map layers, in this case an empty array
    "m_epsg": ""                // Projected coord system string, M, F, D:""
  }
}

The simple example above makes actually no sense since your map package should contain at least one map layer.

Verifying your json file

When developing your json file export you can verify your json-file against the schema file waltermapsdoc_schema.json. Verification can be made at http://www.jsonschemavalidator.net/. There you paste the schema to the left and your json file to the right.

Example 1, Map document with one raster layer

The map package for example 1 can be downloaded from http://waltermaps.com/wp-content/tutorials/waltermaps_map_package_and_document_format/map_package_1_raster.wm_map.zip The map package can also be directly opened in Walter Maps Pro through direct URL download.

The projected coordinate system identifier file waltermapsdeviceprojection.txt contains the single text line:

SWEREF99 TM

The map in example 1 looks like below and contains only one GeoTiff raster called topomap.tif.

The symbology definition (WaltermapsLayerSymbology section in the json file below) for rasters and vector layers are exactly the same. Even though some of the fields only are valid for raster layers and vice versa, they shall not be omitted in the json document in any case.

The map document waltermapsdoc.json for this file looks like this:

{
  “WalterMapsDoc”: {  
    “m_version”: 1,                        // Map document version, integer, M, D:1
    “m_scale”: 25889,                      // Map scale, integer, M, R:100-Max
    “m_centre_x”: 805626.3946720988,       // Map centre x, double, M, R:Min-Max
    “m_centre_y”: 7316273.550794094,       // Map centre y, double, M, R:Min-Max
    “m_centre_z”: 0,                       // Map centre z, double, M, F, D:0
    “m_layers”: [                          // Array of map layers, in this case 1 layer
      {
        “WalterMapsLayer”: {
          “m_version”: 1,                  // Map layer version, integer, M, D:1
          “m_name”: “topomap.tif”,         // Layer file name, string, M
          “m_path”: “maps\/topomap.tif”,   // Full path to layer, string, always starts with the 
                                           // folder "maps\/". 
The folder delimiter "/" is always 
                                           // escaped by "\", M
                                           // Note that the DOS/Windows back slash path delimiter "\"
                                           // is not allowed, not even escaped like "\\" 

          “m_uuid”: “9838f62e-51dd-48cd-9547-61694098a0ff”,
                                           // Unique identifier for the layer,string, M,D:uuid
          “m_type”: 2,                     // Layer type, integer, M, R:1-2
                                           // 1 = vector
                                           // 2 = raster
          “m_subType”: 4,                  // Layer sub type, integer, M, R:1-5 and 7
                                           // 1 = vector point
                                           // 2 = vector line
                                           // 3 = vector polygon
                                           // 4 = Raster Tiff or GeoTiff
                                           // 5 = Raster JPEG
                                           // 7 = Raster WMS or WMTS

          “m_order”: 0,                    // Map layer order, integer, M, R:0-(m_numLayers-1)
                                           // 0 = top layer in the map
          “m_selected”: false,             // Layer is selected or not, boolean, M, F, D:false
          “m_visible”: true,               // Layer is visible or not, boolean, M
          “m_geometryEditable”: false,     // Layer choosen for edit, boolean, M
                                           // Only one of the layers can be choosen for edit
          “m_attributeEditable”: false,    // For future expansion, boolean, M, F, D:false  
          “m_infoable”: false,             // Vector layer attributes can shown and edited, or
                                           // Raster layer values can be shown,
                                           // boolean, M
                                           // This setting can only be true for one of the layers 

          “m_isClipLayer”: false,          // Vector line layer can be used for clipping of polygon 
                                           // layers, boolean, M
                                           // This setting can only be true for one of the line layers
          “m_valid”: true,                 // Layer is valid or not, boolean, M, D:true
          “m_epsg”: “—“,                 // EPSG for layer, string, M, F, D:”—“
          “m_browsable”: false,            // Layer is a so called quick alternating layer,
                                           // boolean, M
          “m_quickInfoAttribute”: “”,      // Vector layer is a quick info layer, string, M, F, D:””
          “m_symbology”: [                 // Array of symbologies for the present layer,
                                           // in this case 1 symbology
            {
              “WalterMapsLayerSymbology”: {
                “m_version”: 1,            // Map layer symbology version, integer, M, D:1
                “m_name”: “”,              // Name of symbology, string, M, R:”” – any string
                “m_selectionQuery”: “”,    // Attribute query, string, M, R:”” – any valid query string
                “m_placement”: “”,         // Placement, M, F, D:””
                “m_fillColors”: [          // Array of fill colors for polygons. At present one
                                           // and only one fill color is used regardless
                                           // of layer type 
                  {
                    “m_red”: 221,          // Red value for fill color, integer, M, R:0-255
                    “m_green”: 221,        // Green value for fill color, integer, M, R:0-255
                    “m_blue”: 221,         // Blue value for fill color, integer, M, R:0-255
                    “m_alpha”: 255         // Alpha value for fill color, integer, M, R:0-255
                  }
                ],
                “m_lineColors”: [          // Array of line colors for polygon borders
                                           // and lines. At present one and only

                                           // one line color is used regardless of layer type
                  {
                    “m_red”: 51,
                    “m_green”: 51,
                    “m_blue”: 51,
                    “m_alpha”: 255
                  }
                ],
                “m_symbolColors”: [        // Array of symbol colors for points
                                           // At present one and only one

                                           // symbol color is used regardless of layer type
                                           // Note that: if color for symbol is {0,0,0,0} the symbol
                                           // will 
be colored with the original colors of the
                                           // SVG-symbol

                  {
                    “m_red”: 51,
                    “m_green”: 51,
                    “m_blue”: 51,
                    “m_alpha”: 255
                  }
                ],
                “m_mean”: [],              // Array of raster statistics, mean, leave this empty
                “m_stdDev”: [],            // Array of raster statistics, stddev, leave this empty
                “m_min”: [],               // Array of raster statistics, min, leave this empty 
                “m_max”: [],               // Array of raster statistics, max, leave this empty
                “m_userMin”: [],           // Array of raster statistics, userMin, leave this empty
                “m_userMax”: [],           // Array of raster statistics, userMax, leave this empty
                “m_stddevFactor”: [],      // Array of raster statistics, stdDevFactor, leave this empty
                “m_Band1”: 1,              // Raster band RGBA-mapping 1, integer, M, F, D:1
                “m_Band2”: 2,              // Raster band RGBA-mapping 2, integer, M, F, D:2
                “m_Band3”: 3,              // Raster band RGBA-mapping 3, integer, M, F, D:3
                “m_Band4”: 0,              // Raster band RGBA-mapping 4, integer, M, F, D:0
                “m_BandAlpha”: 4,          // Raster band RGBA-mapping alpha, integer, M, F, D:4
                “m_colorRampColors”: [],   // Vector of color ramp colors, leave this empty
                “m_visibleFromScale”: 1,   // Layer is visible from scale, integer, M, R:1-Max
                “m_visibleToScale”: 1000000000,
                                           
// Layer is visible to scale, integer, M, R:1-Max
                “m_transparency”: 0,       // Layer transparency, integer, M, R:0-100
                “m_transparentRasterColor”: “”,
                                           // Single gray scale value for full raster transparency,
                                           // string, M, R:””, “0”, “1” … “255”
                “m_trasparentThreshold”: “”,
                                           // Threshold gray scale value for full raster transparency,
                                           // string, M, R:”-255″, “-254” … “”, “0”, “1” … “255”
                “m_fillType”: 1,           // Polygon fill type, integer, M, R:0-1
                                           // 0 = none
                                           // 1 = solid
                “m_lineWidth”: 1,          // Line width for polygon borders or lines, integer, M, R:0-100
                “m_isLineWidthProc”: false,// Line width is in meters (false) or % of screen width (true),
                                           // boolean, M
                “m_lineType”: 1,           // Line type for poygon borders or lines, integer, M, R:0-1
                                           // 0 = none
                                           // 1 = solid
                “m_symbolSize”: 3,         // Size for point symbols, integer, M, R:0-100
                “m_isSymbolSizeProc”: false,
                                           
// Symbol size is in meters (false) or % of screen width (true),
                                           // boolean, M
                “m_symbolType”: “”,        // Full path for the present SVG point symbol, string, M
                “m_stretchType”: 0,        // Raster stretch type, integer, M, F, D:0
                “m_shallLabel”: false,     // Shall label (note for future use), boolean, M, F, D:false
                “m_labelField”: “—“,     // Label attribute field, string, M, R:”—” – any valid 
                                           // attribute name
                                           // If a valid attribute name ís given, the layer will be labeled
                “m_labelPlacement”: “”,    // Label placement, string, M, F, D:””
                “m_labelTypeface”: “Arial”,// Label typeface, string, M, F, D:”Arial”
                “m_labelSize”: 8,          //  Label text height, integer, M, R:0-100
                “m_isLabelSizeProc”: false,// Label text height is in meters (false) or % of screen 
                                           // width (true), M

                “m_labelColors”: [         // Array of label colors.
                                           // At present one and only one

                                           // label color is used regardless of layer type
                  {
                    “m_red”: 51,
                    “m_green”: 51,
                    “m_blue”: 51,
                    “m_alpha”: 255
                  }
                ],
                “m_labelBold”: false,      // Is label text bold, boolean, M, F, D:false
                “m_labelItalic”: false     // Is label text italic, boolean, M, F, D:false
              }                            // End WalterMapsLayerSymbology
            }                              
          ],                               // End m_symbology array
          “m_readFromURL”: “”,             // Layer data pull adress for future use, string, M, F, D:”” 
          “m_writeToURL”: “”               // Layer data push adress for future use, string, M, F, D:””
        }                                  // End WalterMapsLayer
      }
    ],                                     // End m_layers array
    “m_epsg”: “”                           // EPSG for document, string, M, F, D:””
  }                                        // End WalterMapsDoc
}                                          // End JSON file

Example 2, Map document with one raster layer and one vector layer 

The map package for example 2 can be downloaded from http://waltermaps.com/wp-content/tutorials/waltermaps_map_package_and_document_format/map_package_1_raster_1_vector.wm_map.zip
The map package can also be directly opened in Walter Maps Pro through direct URL download.

The projected coordinate system identifier file waltermapsdeviceprojection.txt contains the single text line:

OWN_PROJ

That identifier is not a registered EPSG identifier, so in this case the document has to provide its own definition of the projection. The definition is provided in the file waltermaps.prj which is an ESRI projection definition file. The file contains the following text information:

PROJCS["OWN_PROJ",GEOGCS["GCS_SWEREF99",DATUM["D_SWEREF99",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

The map in example 2 looks like below and contains one GeoTiff raster called topomap.tif and a vector polygon layer called estate.shp

The map document waltermapsdoc.json for this map package looks like (already explained fields are omitted):

{
  “WalterMapsDoc”: {
    …
    “m_layers”: [                         // Array of map layers, in this case 2 layers
      {
        “WalterMapsLayer”: {              // Map layer 1 (vector polygon layer)
          “m_version”: 1,
          “m_name”: “estate.shp”, 
          “m_path”: “maps\/estate.shp”,
          …
          “m_order”: 0,                   // Top most layer in map
          …
          “m_symbology”: [                // Array of symbologies for the present layer,
                                          // in this case 1 symbology
            {
              “WalterMapsLayerSymbology”: {
                “m_version”: 1,
                “m_name”: “My default symbology”,
                                          // This time it is given a name
                “m_selectionQuery”:””,    // No selection query is set, i.e.
                                          // all polygons are shown  
                …
                “m_fillColors”: [         // Polygons are filled with a blue color
                  {
                    “m_red”: 0,
                    “m_green”: 107,
                    “m_blue”: 179,
                    “m_alpha”: 255
                  }
                ],
                “m_lineColors”: [          // Lines are in yellow color
                  {
                    “m_red”: 255,
                    “m_green”: 236,
                    “m_blue”: 1,
                    “m_alpha”: 255
                  }
                ],
                …
                “m_transparency”: 50,       // 50% transparency 
                …
                “m_lineWidth”: 5,               
                “m_isLineWidthProc”: false, // Line width is 5 meters
                … 
                “m_labelField”: “TEXT”,     // Polygons will be labeled with the
                                            // content of the “TEXT” field
                …
                “m_labelSize”: 36,
                “m_isLabelSizeProc”: false, // Label text height is 40 meters
                “m_labelColors”: [          // Labels are in red color
                  {
                    “m_red”: 225,
                    “m_green”: 3,
                    “m_blue”: 80,
                    “m_alpha”: 255
                  }
                ],
                …
              }  
            } 
          ],
          …
        }             
      }, {
        “WalterMapsLayer”: {                // Map layer 2 (raster layer)
          “m_version”: 1,
          “m_name”: “topomap.tif”,
          “m_path”: “maps\/topomap.tif”,
          …
          “m_order”: 1,
          …
          “m_symbology”: [
            {
              “WalterMapsLayerSymbology”: {  // As in example 1 above
              …                           
              }                              
            }
          ],
          “m_readFromURL”: “”,
          “m_writeToURL”: “”
        }
      }
    ],
    “m_epsg”: “”
  }
}

Example 3, Map document with one raster layer and two vector layer with complex symbology, own point symbols and media files (photos/videos)  

The map package for example 3 can be downloaded from 
http://waltermaps.com/wp-content/tutorials/waltermaps_map_package_and_document_format/map_package_1_raster_2_vector_multiple_symbology.wm_map.zipThe map package can also be directly opened in Walter Maps Pro through direct URL download.

The map in example 3 looks like below and contains one GeoTiff raster called topomap.tif, one polygon vector layer estate,shp, and one vector point layer POI.shp.

Multiple symbology and user symbols

In this example multiple symbology for the point layer, i.e. depending one or more particular field values the vector point file is symbolised in more than one fashion. In this particular case the field “TYPE” in the poi.shp file is symbolised i three ways depending on the field values (‘FRIENDS’;’TRUCK’;’REINDEER’). Three SVG-symbols are used for the symbology. Two of the, user_symbols/reindeer.svg and user_symbols/friends.svg, are user defined symbols. All the user defined symbols must be stored in the map package zip file in the folder user_symbols.

Pairing media files to single points, lines or polygons

In this example two media files, album/POI/560e4475-fa62-45a7-bde3-006538afc21c/WM_20170424_203521.jpg and album/POI/51746716-3ec5-44cf-8fc3-6075c69e02b8/WM_20170424_203433.mp4 are paired with two of the points, the most southern truck and the reindeer respectively. In order to pair a media files with a particular point, line, or polygon, the vector layer has to have a string field named “UUID” . For the particular point, line, or polygon, the field “UUID” has to be filled with a unique value (preferably fill with a UUID). The media files should be stored in a folder with a name built from “album“, the base name of the particular vector file (e.g. “POI” from the file name POI.shp), and the field value of the UUID field (e.g. “560e4475-fa62-45a7-bde3-006538afc21c“). The resulting path for the media file will be album/POI/560e4475-fa62-45a7-bde3-006538afc21c/WM_20170424_203521.jpg . The actual media file does not necessarily be named like WM_20170424_203521.jpg. Any valid file name will do fine.

The map document

The map document waltermapsdoc.json for this map package looks like (already explained fields are omitted):

{
 “WalterMapsDoc”: {
  …  
  “m_layers”: [
   {
    “WalterMapsLayer”: {                        // As in example 2 above
     …                                        
    }
   }, {
    “WalterMapsLayer”: {                        // As in example 2 above
     …                                        
    }
   }, {
    “WalterMapsLayer”: {                        // Map layer 3 (vector point layer)
     “m_version”: 1,
     “m_name”: “POI.shp”,
     “m_path”: “maps\/POI.shp”,
     “m_uuid”: “f91b6eac-b150-4ffc-ae7d-f07c9b883103”,
     “m_type”: 1,
     “m_subType”: 1,
     “m_order”: 0,
     …
     “m_symbology”: [                           // Array of 3 symbologies
      {
       “WalterMapsLayerSymbology”: {            // Start symbology no 1
        “m_version”: 1,
        “m_name”: “Trucks”,
        “m_selectionQuery”: “TYPE=’TRUCK'”,     // Layer selection
        …
        “m_symbolColors”: [                     // Symbol is filled with a single red color
         {
          “m_red”: 227,
          “m_green”: 0,
          “m_blue”: 27,
          “m_alpha”: 255
         }
        ],
        …
        “m_symbolSize”: 70,
        “m_isSymbolSizeProc”: false,            // Symbol size is 70 m
        “m_symbolType”: “symbols\/000427_transportation_interstate_truck.svg”,
                                                // Present symbol is a Walter Maps built 
                                                // in symbol. Note that the path
                                                // for built in symbols shall start
                                                // with the folder “symbols\/”
        …
       }                                        // End symbology no 1
      }, {
       “WalterMapsLayerSymbology”: {            // Start symbology no 2
        “m_version”: 1,
        “m_name”: “Friends”,
        “m_selectionQuery”: “TYPE=’FRIENDS'”,   // Layer selection
        …
        “m_symbolColors”: [                     // {0,0,0,0} The symbol will 
                                                // be colored with the original
                                                // colors of the SVG-symbol
         {
          “m_red”: 0,
          “m_green”: 0,
          “m_blue”: 0,
          “m_alpha”: 0
         }
        ],
        …
        “m_symbolSize”: 80,
        “m_isSymbolSizeProc”: false,            // Symbol size is 80 m
        “m_symbolType”: “user_symbols\/friends.svg”,
                                                // User provided symbol
                                                // Present symbol is a user provided 
                                                // symbol. Note that the path for
                                                // user symbols shall start
                                                // with the folder “user_symbols\/”
        …
       }                                        // End symbology no 2
      }, {
       “WalterMapsLayerSymbology”: {            // Start symbology no 3
        “m_version”: 1,
        “m_name”: “Reindeers”,
        “m_selectionQuery”: “TYPE=’REINDEER'”,  // Layer selection
        … 
        “m_symbolColors”: [                     // {0,0,0,0} The symbol will 
                                                // be colored with the original 
                                                // colors of the SVG-symbol
          “m_red”: 0,
          “m_green”: 0,
          “m_blue”: 0,
          “m_alpha”: 0
         }
        ],
        …
        “m_symbolSize”: 80,
        “m_isSymbolSizeProc”: false,            // Symbol size is 80 m
        “m_symbolType”: “user_symbols\/reindeer.svg”,
                                                // User provided symbol
                                                // Present symbol is a user provided 
                                                // symbol. Note that the path for
                                                // user symbols shall start
                                                // with the folder “user_symbols\/”
        …
        “m_labelField”: “TEXT”,                 // Points will be labeled with
                                                // the content of the “TEXT” field
        …
        “m_labelSize”: 22,                      
        “m_isLabelSizeProc”: false,             // Label height 22 m  
        “m_labelColors”: [                      // Label is in blue color
         {
          “m_red”: 0,
          “m_green”: 107,
          “m_blue”: 179,
          “m_alpha”: 255
         }
        ],
        …   
       }                                         // End symbology 3
      }
     ],                                          // End symbology array  
     “m_readFromURL”: “”,
     “m_writeToURL”: “”
    }
   }
  ],
  “m_epsg”: “”
 }
}                                                // End WalterMapsDoc 

Source code in C++

From this link you can download a single c++ header file, implementing saving and loading of the Walter Maps map document. The code is only dependent on the small and efficient ESJ library (extremely simple JSON for C++). The code can be used directly in your c++ project, or it can serve as pseudo code for your programming language of choice.

Advanced - Translating Walter maps into your own language

In this video tutorial we will show you how to translate Walter Maps into your own language.

For translating, you need the english language file english.lang to start with. You can download it here.

For editing multi-lingual text files you need a text editor supporting that. We usually use BabelPad for that purpose. Babelpad can be downloaded here.

Advanced - Create validating data collection forms (Walter Maps Pro)

Create validating data collection forms

When editing attributes in Walter Maps, your field names and values are visible in a scroll list view. The only built-in validations while changing or adding values are that you can’t add non-numerical strings to number fields and you can’t add floating point numbers into integer number fields.

In many field data collection scenarios you want to guarantee the quality of the data that are collected, e.g.  you don’t want to forget data collection for certain fields and you only want to collect values within specific intervals. In Walter Maps Pro it is easy to add that functionality by adding a rule-file to your shape file. If your shape file is called parcels.shp your rule-file should be called parcels.rul. The rule file cannot be created within Walter Maps. This is something you have to create in an ordinary text editor.

Rule-file example (parcels.rul)

The rule file is a text file in JSON format and must be coded in ANSI 8-bit text format (for now, UTF-8 text files are not supported). An example (parcels.rul) is shown below.

The first key “attributes” is a value-array of the fields in your shape file that you want to be effected by your rules. Fields that you don´t want to apply rules for, should not be listed in the “attributes” value-array. The field/attrubite names are case sensitive, i.e. the field/attribute names in the rule file must exactly match the names in the corresponding dbf file.

The next keys “UUID”, “REF” etc, are the actual rules for each field. The rules are implemented as JSON key:value pairs. All keys and values must be text strings and must be surrounded by double quotes, except for the boolean values true and false.

Basic rules

unique (true/false) if true the field value must be unique. The check is performed when editing/adding attribute values. This is not checked when editing your geometries, e.g. while splitting a polygon. Default false.
modifiable (true/false) if false the field value can not be modified once set. Default true.
editable (true/false) if false the field is visible but not changable. Default true.
not_null (true/false) if true the field cannot be empty. Only applicable to text fields. Default false.
not_zero (true/false) if true a number field cannot be empty or cannot be 0. Default false.

Default values

If a field is not set, you can specify what default value that field should be assigned. The key is default and the value can be a number, a string, or a default value auto-assigner, i.e. the values starting with waltermaps_ in the above example. As mentioned earlier, even the number values must be surrounded by double quotes. 

The following auto-assigners can be used:

waltermaps_name assigning the name-string registered in the General Settings section of the app
waltermaps_task assigning the task-string registered in the General Settings section of the app
waltermaps_deviceid assigning a string that contains present device unique id
waltermaps_uuid assigning a UUID string
waltermaps_time assigning a time string according to the current time format setting in the General Settings section of the app
waltermaps_date assigning a date string according to the current date format setting in the General Settings section of the app
waltermaps_date_time assigning a date + “_” + time string according to the current date and time format settings in the General Settings section of the app
waltermaps_date_dd_space_MM_space_yyyy assigning date string of format “31 01 2017”
waltermaps_date_dd_forslash_MM_forslash_yyyy assigning date string of format “31/01/2017”
waltermaps_date_ddMMyyyy assigning date string of format “31012017”
waltermaps_date_dd_hyphen_MM_hyphen_yyyy assigning date string of format “31-01-2017”
waltermaps_date_yyyy_space_MM_space_dd assigning date string of format “2017 01 31”
waltermaps_date_yyyy_forslash_MM_forslash_dd assigning date string of format “2017/01/31”
waltermaps_date_yyyyMMdd assigning date string of format “20170131”
waltermaps_date_yyyy_hyphen_MM_hyphen_dd assigning date string of format “2017-01-31”
waltermaps_time_hhmmss_24 assigning time string of format “231855”
waltermaps_time_hh_colon_mm_colon_ss_24 assigning time string of format “23:18:55”
waltermaps_time_hh_dot_mm_dot_ss_24 assigning time string of format “23.18.55”
waltermaps_time_hhmmss_space_PMorAM 
assigning time string of format “111855 PM”
waltermaps_time_hh_colon_mm_colon_ss_space_PMorAM assigning time string of format “11:18:55 PM”
waltermaps_time_hh_dot_mm_dot_ss_space_PMorAM assigning time string of format “11.18.55 PM”
waltermaps_centroid_x assigning the x centriod of present geometry
waltermaps_centroid_y assigning the y centriod of present geometry
waltermaps_length assigning the length or the perimeter of the present geometry
waltermaps_area assigning the area of the present geometry

Value constraints

The following keys are used for value constraints:

regexp constraining a string value by regular expression
set constraining a string or a number value to a predefined set of values e.g. [ “1”, “2”, “3” ] or [ “DODGE”, “FIAT”, “TOYOTA”, “VOLVO” ] 
range constraining a number value to a specific interval, e.g. [ “0.1”, “62” ]

ge constraining a number value to be greater or equal to a specific value
gt constraining a number value to be greater than a specific value
le constraining a number value to be lesser or equal to a specific value
lt constraining a number value to be lesser than a specific value

 

Alias and message strings

The following keys are used for alias and message string in order to make data collection more understandable:

alias changing the field name to a somewhat more understandable name
description adding a description in the input dialog box while editing the field
error_message adding a more understandable error message, displayed in the error message dialog box

Example file

The above rule file example can be downloaded hereThe JSON-file must be coded in ANSI 8-bit text format (for now, UTF-8 text files are not supported).

Validation of the rule file

Structural validation of your rules can be made at https://jsonlint.com/ . Once validated at https://jsonlint.com/ you should validate the functionality in Walter Maps Pro.