> For the complete documentation index, see [llms.txt](https://docs.os.uk/more-than-maps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/more-than-maps/advanced-applications/os-ngd-data-in-dashboards/os-power-bi-map-visual/os-power-bi-map-visual-getting-started-guide/displaying-your-own-geometries-within-the-power-bi-visual/loading-spatial-data-into-the-visual.md).

# Loading spatial data into the visual

Loading spatial data into the visual using the Upload Manager provides an alternative means to add your own polygons or other geometries onto the map, and have them symbolised according to values from your Power BI data model.

{% hint style="info" %}

### Which approach to choose?

In some circumstances, it may be preferable to have your spatial data included in the data model instead. See the [Displaying your own geometries within the Power BI Visual page](/more-than-maps/advanced-applications/os-ngd-data-in-dashboards/os-power-bi-map-visual/os-power-bi-map-visual-getting-started-guide/displaying-your-own-geometries-within-the-power-bi-visual.md) for an in-depth look at the differences between the methods.
{% endhint %}

#### Using the Upload Manager

Launch the Upload Manager by selecting the toggle on the *Upload geospatial data* settings pane. You need to have added some data to at least one field of the visual first, before this will work.

<figure><img src="/files/3ff958c5e74f824368b4f512f41313c2316bcbaa" alt="A screenshot of the Upload geospatial data tab showing the Upload Manager option toggled to off"><figcaption></figcaption></figure>

You can browse to select the file you want to upload; this can either be a GeoJSON file, a TopoJSON file, or a shapefile (either zipped or as individual files).

{% hint style="info" %}

#### Things to note

* If you are uploading a shapefile, please ensure that all component files (.shp, .shx, .dbf, .prj, .cpg) are included in the zip or uploaded together if uploading individual files.
* GeoJSON / TopoJSON files should contain latitude / longitude coordinates; shapefiles may be in other coordinate systems but a .prj file must be provided to allow the visual to project the data onto the map.
* The maximum file size is 50Mb but we recommend you use smaller files than this, as the uploaded data will be stored in the report.
* The dataset must include at least one unique column, which you'll be able to match to a field in the Power BI data model.
* If there are any problems with the geometries in the file (for example, self-intersections), then the uploader will attempt to repair them, but if it can't manage it then an error will be displayed.
  {% endhint %}

Once you've uploaded a file, it will be scanned to identify which columns / attributes contain unique values. These columns will be available to be joined to data from your PowerBI data model.\
The remaining (non-unique) columns will also be listed, and can be included in the report if you select the *Load all columns to report* checkbox.

{% hint style="info" %}

#### More information on the Load all columns to report checkbox

Choosing *Load all columns to report* will allow you to use these columns in pop-ups instead of adding data to the *Features Layer: Pop-ups* field well. For example, the uploaded file may contain all the information you want to display to users, and you want to use the Power BI data simply to filter / slice what is shown.

However, this may reduce performance and increase the size of your report if you have a lot of columns in your data, so we recommend only selecting this option if you need it.
{% endhint %}

If the columns seem to be correct, then select *Load Data* to load the data into the Power BI report. Note that if no unique columns are found, this button will not be enabled and you won't be able to use this dataset in the visual.

<figure><img src="/files/a1181e36be7b8b744dd356836b1eb39bade116e9" alt="A screenshot showing the load data option shown in the Power BI report"><figcaption></figcaption></figure>

{% hint style="info" %}

### Unloading data

The data are only transferred into Power BI when you press Load Data.

After loading the data, during the **same session** of the visual, you can re-open the dialog and remove the data by pressing the rubbish bin icon; the button will then change to *Unload data* and this will remove the data from the report.

If you reload the visual after choosing *Load data* (for example, by switching to a different report tab and back again), the file information and the rubbish bin icon will **not** be present when you re-open the dialog. This is because only data that have been transferred into Power BI can be saved between sessions.

If you want to remove the loaded data from the report later (after the visual has been reloaded), you can just re-add the same dataset, or a different one (this will replace what was loaded before in the report), and then follow the above steps to unload it. The only reason for doing this would be to reduce the report's file size; there is no effect on the functionality of the visual.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.os.uk/more-than-maps/advanced-applications/os-ngd-data-in-dashboards/os-power-bi-map-visual/os-power-bi-map-visual-getting-started-guide/displaying-your-own-geometries-within-the-power-bi-visual/loading-spatial-data-into-the-visual.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
