MicroStrategy ONE

Using an ESRI Shapefile

Download the ESRI Map visualization plug-in provided for you and follow the steps below.

  1. Copy the Shapefile to the plug-in folder

    An ESRI shapefile contains three types of files: .dbf, .shp, and .shx. The names of all three files must be the same. Copy all three files to the shp folder in the plug-in folder—plugins/ConnectorForMap/shp.

  2. Modify the geo shape configuration file so the ESRI Map visualization can use your Shapefile

    Navigate to mstrGeoShapesConfig.xml, located under xml/config in your plug-in folder, and open it in a text editor. Do the following:

    • Add a child <layer> element to the <layers> element.
    • Set the value of the ml attribute of the <layer> element to be the relative path of the corresponding .shp file.
    • Add a child <shape> element to the <shapes> element.
    • Set the value of the shapeKey attribute of the <shape> element to be the field name that will be used to match the shapes with the data.
    • Set the value of the shapeCat attribute to a unique integer value to identify your custom shape.

    The code in the modified file should look like the code shown below.

    Copy
    <layers>
        <layer id="1000" title="US States SHP File" ml="shp/us_states.shp">
        </layer>
    </layers>
    <shapes>
        <shape id="905"
            custom="true"
            plugin="ConnectorForMap"
            desc="CUS States SHP File"
            roleId="2"
            type="Polygon"
            default="false"
            shapeKey="NAME"
            layerId="1000"
            shapeCat="10001"
        />
    </shapes>

    Since a feature in the sample US states ESRI Shapefile has the following fields:

    Copy
    {
        "STATEFP": "06",
        "STATENS": "01779778",
        "AFFGEOID": "0400000US06",
        "GEOID": "06",
        "STUSPS": "CA",
        "NAME": "California",
        "LSAD": "00",
        "ALAND": 403483823181,
        "AWATER": 20483271881 
    }

    We need to use the NAME field to match the shapes with the data. To do this, we set the value of the shapeKey attribute to be NAME in the <shape> element, as we did above.

  3. Confirm that you can use the custom shapes

    • Restart MicroStrategy Web.
    • Use the ESRI Map visualization in a VI dashboard and select Area Map as the Map Type on the Properties panel.
    • Expand the Boundaries drop-down in the ESRI Properties panel. Make sure that it includes the description for your custom shapes as an option.
    • Choose the option for your custom shapes. The Map visualization reads the .shp file specified in the ml attribute of the <layer> node in mstrGeoShapesConfig.xml, and renders the appropriate custom shapes.