GeoJSON Map Generation
Overview
The Oracle Network Management System Operations Mobile App uses electrical facility maps in GeoJSON format (see http://geojson.org for details). Oracle Network Management System provides tools and scripts (collectively referred to as the GeoJSON generator) to build GeoJSON versions of your electrical facility maps. In addition to electrical facility map, OMA can support GeoJSON Offline Landbase Maps. Details on configuring these is described later in this document.
Directory Location
The GeoJSON files required by the Mobile App should be generated in the $OPERATIONS_MODELS/export directory. The GeoJSON generator takes each *.mb file in your NMS electric model and creates a corresponding *.geojson file.
The $OPERATIONS_MODELS/export directory is created by the Model Build Services when the -export parameter is provided on the Model Build Service startup. The Model Build Service will also create an .mb file in the $OPERATIONS_MODELS/export directory for every map built in the system. These .mb files are the inputs to the GeoJSON file generator.
In addition to the individual GeoJSON files, a zip file (mapset.zip) containing all of the files will be created in the $OPERATIONS_MODELS/export directory. This file will be used by the Operations Mobile Application when it is set to perform doing a bulk download of the maps.
Build Processes
Once you have the $OPERATIONS_MODELS/export directory created and populated with the source .mb files, you will need to create a custom script to convert your .mb files to GeoJSON files. Use the OPAL script, OPAL-build-mobile-maps, as a template for your script to create GeoJSON files:
1. Copy ${NMS_HOME}/OPAL/bin/OPAL-build-mobile-maps to ${NMS_BASE}/[project]/bin/[project]-build-mobile-maps.
2. Edit the [project]-build-mobile-maps script based on requirements of the GeoJSON file generation. Example changes: filter out object, skip landbase maps, cleanup data issues, and so on.
3. Add a call to the product version of the nms-build-mobile-map script from your [project]‑postbuild script. The nms-build-mobile-maps script has a mutex scheme to prevent multiple copies of this process from running at once.
GeoJSON Configuration File
The GeoJSON generation process requires a [project]_geojson_export.dat file to do the following:
Identify the classes of objects in the source .mb files to convert to GeoJSON file features.
Identify the attributes to bring into the GeoJSON files for each object class.
Define the coordinate conversion parameters to convert the .mb file coordinates to the mobile app required coordinate system.
Create a copy of the template ($NMS_BASE/OPAL/sql/OPAL_geojson_export.dat) and save it as ${NMS_HOME}/[project]/sql/[project]_geojson_export.dat.
The header of the file has the instructions needed to configure the objects included in the GeoJSON maps.
Electrical objects in the GeoJSON files will be required to have the following attributes:
FeatureType: High level feature type (for example, Electric).
Layer: Layer name within the FeatureType (for example, Switch, Transformer, Fuse).
DeviceType: Descriptive class of the device (for example, Three Phase OH Primary).
Symbol: Symbology to apply to the device. For electric objects, add a suffix (-0PEN, -CLOSED, -MIXED) for the nominal state (for example, Transformer‑CLOSED, Switch‑OPEN)
Phase: Phases of the device (A, B, C, AB, AC, BC, ABC).
NomStatus: Nominal Status of the device (OPEN, CLOSED, MIXED).
NomClosedPhases: The nominally closed phases for the device (for example, A).
HandleClass: Handle Class number of the device from the Classes table in NMS (for example, 123).
HandleIndex: Handle Index number of the device (for example, 1002).
Partition: Partition number the device belongs to (for example, 1047).
DeviceId: Alias name of the device (for example, F1461).
Feeder: Feeder name the device belongs to (for example, 2414). This feeder value must match the NMS feeders table feeder_name value to allow OMA to use the color for that feeders table row.
Substation: Substation name that the device or the device’s feeder belongs to (for example, Lake Sub).
Location: Descriptive location or address of the device.
IntPartitions: An array of internal world partitions the object belongs to.
GeoJSON Map Deployment
The GeoJSON Maps consist of two types of files:
[mapname].geojson files: GeoJSON versions of the NMS map files.
mobile_geojson_maps.json files: The index file for the GeoJSON maps
To get the maps to the OMA client, the following methods are supported:
At any time, you can go to the map librarian section of the OMA map page and request an updated server map index file (mobile_geojson_maps.json), and compare it to the already installed files, and download any outdated GeoJSON map files. OMA will also automatically check the server for updated maps on initial navigation to the map page, if new maps are available, it will inform the user.
GeoJSON Offline Landbase Maps