Map Files - Map Background Shapefile Handling
September 25, 2012
Organization
Overview
Updating Map Shapefiles
Overview
AWIPS2 handles map backgrounds differently than AWIPS1 did. The Maps.py file
is no longer used for creating map backgrounds. Instead, a PostGIS maps database is used
in conjunction with xml configuration. Consequently, there is a change to how local
maps are added to the system. These maps are available across all perspective in CAVE and are
not specific to GFE.
Maps.py and localMaps.py are now only used to generate edit areas from maps database tables.
Updating Map Shapefiles
- Any site level .shp, .shx and .dbf map files should be placed into the
/awips2/edex/data/utility/edex_static/site/LLL/shapefiles/table_name directory
where table_name is unique.
- To import one shapefile at a time, execute the
/awips2/database/sqlScripts/share/sql/maps/importShapeFile.sh script with the following
arguments: shapefile, scheme (mapdata), table (shapefile name), geometry simplification
levels (not used for Point data), user, port, and awips root directory. For detailed
instructions on how to do this, see the
Importing
Map Shapefiles into AWIPS2 using importShapeFile web page.
- Next, you will need to add bundle files procedures. To do this, access the Localization
perspective in CAVE and browsing to the Bundles->Maps folder. MB3 on the Maps folder and
create a new xml file which corresponds to the shapefile folder. Copy and modify the contents
from an existing file.
- Line and Polygon shapefiles - in the resourceData element, change the value of the
table element to the name of the database table (shapefile folder name), and the mapName
to the label to show in the Map menu in CAVE. If labels are required in the new map, then edit
the labelField in the Capability element. Otherwise, delete the capability element with type
labelableCapability. The value for the labelField relates to a column in the database table
with the same name. For example, the value CWA for the labelField refers to the values in the
cwa column of the CWA table in the mapdata scheme.
- Point shapefiles - in the resourceData element, change the type attribute to
dbPointMapResourceData, change the value of the table element to the name of the new database
table name (shapefile filder name), and the mapName to the label to show in the Map menu in CAVE. If labels
are required in the new map, then edit the labelField in the Capability element. Otherwise,
delete the capability element with type labelableCapability. The value for the labelField
relates to a column in the database table with the same name. For example, the value CWA for
the labelField refers to the values in the cwa column of the CWA table in the mapdata scheme.
For more information on configuring the resource data options, the
MapResourceDataConfigOptions
page provides more details on configuring the capabilities and resources for a map.
- Save to SITE level and restart CAVE.
See the server
configuration overview for information on how to make changes that
are supported to the map backgrounds.