Distorted Custom Shape using Shape Map in Power BI Desktop (July 2016+)

A lot of design tools support the ESRI format as an export target for custom shapes, e.g. OpenJUMP.

This format needs to be converted to TopoJSON using e.g. an online converter like www.mapshaper.org.

This online converter needs both the .shp and .dbf file of the ESRI format, then click export in the top right corner, select TopoJSON, and give the .json file a name.

Add the Shape Map to the Power BI Desktop designer, add some value to the Location metric, and click the Pencil button, Shape, Add Map and select the .json file.

After using the custom shape in the Shape Map component (starting from the Power BI Desktop July 2016 update) you may find that the shape is distorted, even when cycling through the three possible projection modes: equirectangular, mercator, and orthographic. This is especially true if you want to use a simple flat floorplan or blueprint, and not a map projected on a sphere.

To fix this, update the transform tag in the .json file:

For example, change

"transform":{"scale":[0.381270903347,0.33018868306],"translate":[41,352.00000000000006]}

into

"transform":{"scale":[0.01,0.02],"translate":[0,0]}

and add the .json file again using Add Map.

No comments: