ScenGen Map Files

In ScenGen, there are five mandatory files associated with each map, plus optional files. A map, RegionXYZ, consists of the following files:
  1. Maps/Map_RegionXYZ.mapconfig - Map configuration file. This is the top-level file for a map in ScenGen. It contains the map meta-data about the map, such as its coordinate boundaries and pointers to the image, terrain, and vector-data files.
  2. MapData/RegionXYZ.iscz - Map image (skin) is a simple-compressed ppm image file.
  3. XYZRegion_TextureMap_land.xml.scz - General XML file for input to terrain elevation calculations, such as propagation,
  4. Scenario_RegionXYZ_TextureMap.dat - Top-level file for WinFrame3D (WF3D Viewer). Sets initial viewing position (camera position), and references the other files needed by WF3D, such as the map-skin, mission-scenario, and CES link-results animations files.
  5. XYZRegion.wfl.scz - Map-skin file for 3D Viewer. Attaches map-image to terrain-elevation surface, for viewing terrain-related visualizations such as elevation contours.
  6. MapData/RegionXYZ.vmap - Optional vector data. XML file(s) containing names and coordinates of towns, cities, roads, streets, rivers, and area boundaries for over-laying onto maps.
The first five files are mandatory. The vector data is optional, but recommended. Vector data can be provided at variable detail levels, such that small towns/streets do not appear until close-zoom. Unlike image-maps, vector data is always rendered sharp at all zoom levels. Hint: Use map-images only for background texture. All names, labels, town and road markings should be in vector format. Public sources for vector data include KML/KMZ files. The map files are normally configured automatically by the Map-Creator Tool.

The following figure shows how the map files are created.

The following figure shows how the map files are used by the ScenGen tools.

More detail about each type of file by directory follows:

  1. Maps Directory -

    The "Maps" directory contains the top-level ".mapconfig" files. The mapconfig files contain the meta-data about each map. It tells where the map-image (or skin) file is located, where the vector-map-data file is located, if any, and what the coordinates of the map-edges are, both in relative (meters) and absolute (degrees Lat/Lon). This file also defines the object (platform or vehicle) icons or shapes, for rendering sprites in MIL-2525 symbology, etc..

       Example:
    	<Map_Image  File = "../MapData/SFBayRegionTextureMap.iscz" />
    	<Map_Native_Coords west="-88150.4" north="55555.6" east="88150.4" south="-55555.6" />
    	<Map_Units units="km"/>
    	<Map_LatLong west="-123" north="38" east="-121" south="37" />
    	<VectorData file="../MapData/Sanfran2.vmap" />
    	<def_obj> AH
    	 <drawline   x1="0.0 " y1="-0.45"   x2="0.8" y2="0.35" />
    	 <drawline   x1="-0.8" y1="0.35"   x2="0.0" y2="-0.45" />
    	</def_obj>
    
    	
  2. MapData Directory -

    The "MapData" directory contains the map-images (or skins) files. These are usually stored in simple-image-compress (.iscz) format. (They can be decompressed to a PPM file with image_dscz.) This directory may also contain any vector data (.vmap) associated with a map.

    VectorMap file objects all contain a level attribute that controls the first zoom level at which the object becomes visible when xooming-in. The following table shows the level values correspnding to the zoom ranges, where the zoom-range is the width of map surface being displayed in Km.
    Level Map Zoom Range (Km)
    2 1
    4 4
    6 15
    8 60
    10 250
    12 1,000
    14 4,000

    Colors are specified in Red-Green-Blue from 0=dark to 255=bright.

    	Example VectorMap file:
    
    		<VectorMap name="Utopis">
    		 <Road name="A300" level="4" thick="0.25" style="0" red="0" blue="255" green="0" >
    		        <vrtx lat="39.5347" lon="48.2712">
    		        <vrtx lat="39.5347" lon="48.2712">
    			...
    		 </Road>
    		 <Town name="Bowada" level="3" thick="1" style="1" red="0" blue="0" green="38" >
    		        <vrtx lat="39.9623" lon="47.3566">
    		 </Town>
    		 <Area name="Isba Reserve" level="5" thick="1" style="2" red="80" blue="48" green="63" >
    		        <vrtx lat="39.6887" lon="46.7388">
    			...
    		 </Area>
    	

    Vector data can be entered manually by starting ScenGen with the
                -create_vecmap xx
    command-line option, where xx is the name of the vector file to create. A special drawing palet will pop up on the screen. Use it to record new vector objects by pointing and clicking on the map. Note: This function is primarily intended only for very advanced users, or the tool maintainers themselves.

    You can also point the GUI temporarily at previously created vector maps with the -vecmap xx command-line option, where xx is the name of the vector file to read-in. This is a temporary alternative to embedded the vector file name in the map configuration file. Multiple maps can all point to the say, or multiple vector files.

  3. Map_Data Directory -

    The Map_Data directory contains elevation map data files, which are used for 3D imagery.

    Three (3) files are associated with each map (XYZ) in this directory:

      XYZRegionTextureMap_land.xml.scz - Terrain elevation xml file in simple compression format. This file is used by multiple tools, including special models and WF3d, to resolve the land height at a given map coordinate.
      	 Example:
      		<elevation_surface name="landmass" north="55555.6" east="88150.4" 
      		  south="-55555.6" west="-88150.4" ncols="121" nrows="60" vscale="8.0" >
      	 	 <row> 48 0 10 0 0 0 0 0 0 0 10 106 158 325 122 141 288 238 183 ... </row>
      		 ...
      		 </row> ..... </row>
      		</elevation_surface>
      	
    • Scenario_XYZRegionTextureMap.dat - Top-level WinFrame file, includes the other files for WF3d, and sets initial camera position.

    • XYZRegion.wfl.scz - Map-skinning file for WF3d. Raises or lowers slices of map-image to match terrain undulations. Converts directly to OpenGL calls. Includes directive to visually exaggerate terrain height (vertical scale factor at last line). Units are in meters.
      	  Example:
      		<def_obj> terrain
      		 <image file="../../MapData/SFBayRegionTextureMap.iscz" >
      		  <slc x="0" y="1"> <vrt x="-88150.4" y="48" z="-55555.6"/>
      		  <slc x="0" y="0.983333"> <vrt x="-88150.4" y="0" z="-53703.7"/>
      		  <slc x="0.0" y="0826446"> <vrt x="-86693.3" y="0" z="-53703.7"/>
      		  <slc x="0.00826446" y="1"> <vrt z="-86693.3" y="0" z="-55555.6"/>
      		 </image>
      		 <image> ...
      		  ...
      		 </image>
      		</def_obj>
      		<inst_obj> name="land" kind="terrain" x="0" y="0" z="0" xang="0" yang="0" zang"0" </inst_obj>
      		<scaleobj_y name="land" T="0.1" scale="8" />