# Working with GPKG data

{% hint style="info" %}
This is not an extensive list of the applications AddressBase Core can be used in; many other GIS software applications and/or databases can be used to load the product.
{% endhint %}

Ordnance Survey does not recommend specific suppliers or software products, as the most appropriate system will depend on many factors, for example, the amount of data being taken, resources available within the organisation, the existing and planned information technology infrastructure and the applications that AddressBase products can be used for

## Loading data into GIS applications

This section provides step-by-step instructions on how to load the GPKG format of AddressBase Core into commonly-used GIS software.

<details>

<summary>ArcGIS Pro</summary>

*Note - These instructions are based on ArcGIS Pro version 2.3.3. More recent releases should perform in a similar manner.*\
\
\&#xNAN;*Note –* Certain versions of ArcPro (for example, version 2.5) require GeoPackages to have a spatial index added before the data can be viewed on the map. This can be done in the Catalog by opening the Feature Class Properties window within the 'Indexes' page.\
\
![ArcGIS Pro feature class properties window showing the attribute index and spatial index options](https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FdIxyvkdlmq6LoNin2sEB%2FArcGISPropertiesWindow.png?alt=media\&token=daac8942-bf9a-48ee-8e00-7b27ae15ee76)

1. Create a new blank map project in ArcGIS Pro and select an appropriate map backdrop to use as context against which to display the data. Ensure that the coordinate reference system is set to *British National Grid*
2. Open the Catalog panel on the right-hand side of the main window.
3. Right-click on *Folders* and select *Add a new folder connection*.
4. Browse to the location of the GPKG file for the AddressBase Core product and select that folder.

\
\&#xNAN;*Note - Allow it a little time to make the connection as the ArcGIS Indexing server works in the background on the GPKG file before it is displayed. The national AddressBase Core GeoPackage file is over 13GB in size, so this will take a few minutes.*\
\
\&#xNAN;*When the process is complete, the AddressBase Core GPKG should appear as a database in the Catalog panel.*\\

<img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FEmne5QxryuOwBKNm0CDt%2F7.jpeg?alt=media" alt="ArcGIS Pro UI showing basemap and Catalog panel" data-size="original">

\
\&#xNAN;*Note* - *The coordinate reference system of the basemap should be set to British National Grid before loading the `main.abcore_address` element into the map backdrop.*

1. In the selected folder, click the arrow to the left of the GPKG file to expose the component element.\
   \&#xNAN;*This is the file which contains the data.*
2. Right-click on the *abcore* element – in this example, `main.abcore_address` – and then select *Add to Current Map*.\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2F8GC1mwbmze8KMyay2VhM%2F8.jpeg?alt=media" alt="ArcGIS Pro Catalog panel showing AddressBase Core GPKG folder" width="332"><figcaption><p>ArcGIS Pro Catalog panel showing AddressBase Core GPKG folder</p></figcaption></figure>
3. It will now appear in the Contents panel on the left-hand side of the main map window.\
   \&#xNAN;*Give the application a few minutes to load the data, especially if loading a national set.*\
   \
   \&#xNAN;*The screenshot below shows a smaller GPKG covering part of Hampshire which has been loaded into ArcGIS Pro using the method described above.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FKuRgyParHCQPFNNyASlD%2F9.jpeg?alt=media" alt="ArcGIS Pro UI showing AddressBase Core data on the basemap"><figcaption><p>ArcGIS Pro UI showing AddressBase Core data on the basemap</p></figcaption></figure>

</details>

<details>

<summary>ArcMap</summary>

*Note - These instructions are based on* ArcMap *version* 10.5.1. *More recent releases should perform in a similar manner.*\
\
\&#xNAN;*Note –* Certain versions of ArcMap (for example, version 10.8.1) require GeoPackages to have a spatial index added before the data can be viewed on the map. This can be done in the Catalog by opening the Feature Class Properties window within the 'Indexes' page.\
\
![ArcMap Feature Class Properties window showing Attribute Indexes options and spatial index options](https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2F2KnTXa6zh6RLnQI2BXaa%2FArcMapPropertiesWindow.png?alt=media\&token=b5a0e23a-19c5-488f-bc80-8973b5b61817)

1. In Arc Catalog, connect to the folder that contains the AB\_Core GeoPackage data.\
   \&#xNAN;*You will need to create a new folder connection if one doesn't exist.*\
   \
   \&#xNAN;*In the example below, the connection in Arc Catalog has been made and the GPKG has been expanded to show the `main.abcore_address` element containing the `AB_Core` data within the GPKG. This data which will be added to the backdrop mapping in ArcMap.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FfMtrfP9KorebmCTtYXy0%2Fimage.png?alt=media&#x26;token=b39b65f0-1723-4330-8f9e-0ea927616b81" alt="Arc Catalog showing Folder Connections in Catalog Tree" width="416"><figcaption><p>Arc Catalog showing Folder Connections in Catalog Tree</p></figcaption></figure>
2. In ArcMap, click *Add Data.*
3. In the Add Data dialog:
   * Navigate to the folder which contains the GPKG.
   * Click on the main `AB_Core` element within the GPKG to select it.
   * Click *Add*.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FUNp1EbMYbkRD1xflkZK1%2Fimage.png?alt=media&#x26;token=2f42ab08-2876-4993-8b93-2f9529790388" alt="ArcMap Add Data dialog"><figcaption><p>ArcMap Add Data dialog</p></figcaption></figure>

     \
     \&#xNAN;*The data from the GPKG loads into ArcMap.* \\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FJvoS7vKdRpbYHQ93ELOc%2Fimage.png?alt=media&#x26;token=f88e6126-4e0d-43d9-8f0c-2a8da9205275" alt="ArcMap UI showing AddressBase Core data in the Map area"><figcaption><p>ArcMap UI showing AddressBase Core data in the Map area</p></figcaption></figure>

     \
     \&#xNAN;*Note - Unlike in the CSV option, there is no need to specify a coordinate reference system for the AB\_Core data because that information already exists in the GPKG.*

     *However, you will have to change the coordinate reference system set for the backdrop map to use to British National Grid beforehand to get the data to display in its correct position in relation to the backdrop map.*

</details>

<details>

<summary>QGIS</summary>

*Note - These instructions are based on QGIS version 3.10.5. More recent releases should perform in a similar manner.*

1. Launch QGIS and select a suitable mapping backdrop to provide geographical context.\
   \&#xNAN;*The example below uses the open dataset, OS Zoomstack, to provide a mapping context.*
2. When loading CSV data, ensure that the map window coordinate reference system is set to *EPSG 27700 (British National Grid)*. \\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FR76pwhDD3eMDVM1cH9Zj%2Fimage.png?alt=media&#x26;token=bb391a3b-1e5d-4931-9f3b-5fc23d076aee" alt="QGIS UI showing OS Zoomstack as a backdrop map"><figcaption><p>QGIS UI showing OS Zoomstack as a backdrop map</p></figcaption></figure>
3. Click the *Add Vector Layer* icon in the in the Manage Layers toolbar on the left.\
   \&#xNAN;*To activate this toolbar, go to View > Toolbars > Manage Layers toolbar and make sure that Manage Layers Toolbar option is selected.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FJhDrodF7ujn9KM7DQCij%2Fimage.png?alt=media&#x26;token=d1baec82-fe05-4d8e-ab9b-516a4c8f9a9e" alt="QGIS Add Vector Layer icon" width="65"><figcaption><p>QGIS Add Vector Layer icon</p></figcaption></figure>
4. In Data Source Manager | Vector, click the ... (three dots) to the right of the Vector Dataset(s) field.\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2F5ZwJEgymqosfkoCQYOfh%2Fimage.png?alt=media&#x26;token=e0204dac-71c3-43b7-af09-c76464e0d043" alt="QGIS Data Source Manager | Vector dialog" width="563"><figcaption><p>QGIS Data Source Manager | Vector dialog</p></figcaption></figure>
5. In Open OGR Supported Vector Dataset(s), browse to the location of the folder in which the GPKG file is located, select the file to be loaded, and click *OK*.\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FJuyV4DJzXSFiBCWI9MKo%2Fimage.png?alt=media&#x26;token=059f34b1-6397-45b8-8b39-f961a2623851" alt="QGIS Open OGR Supported Vector Dataset(s) dialog" width="563"><figcaption><p>QGIS Open OGR Supported Vector Dataset(s) dialog<br></p></figcaption></figure>

   *Note - You can filter other files in the folder which are not GPKGs by setting the files of type box (in the bottom right-hand corner of the window) to GeoPackage (\*.gkpg \*.GPKG)*
6. In Data Source Manager | Vector, click *Add*.\
   \&#xNAN;*The GPKG data will now load into QGIS.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FbMMIRUSHDGA1C1JwtId1%2Fimage.png?alt=media&#x26;token=2d46b0f6-219c-4b05-8f07-9ee5fb3610fb" alt="QGIS Data Source Manager | Vector dialog" width="563"><figcaption><p>QGIS Data Source Manager | Vector dialog</p></figcaption></figure>
7. Click *Close*.\
   \
   The GPKG data is loaded into the map area.\
   \&#xNAN;*You can now interrogate and style the data with the tools available within QGIS.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2F90Kgk6jm8GH8EgE9kaSe%2Fimage.png?alt=media&#x26;token=369cc76f-0b3b-4d0a-a77b-4e30d08b274c" alt="QGIS UI AddressBase Core data on the backdrop map"><figcaption><p>QGIS UI AddressBase Core data on the backdrop map</p></figcaption></figure>

   \
   \&#xNAN;*Note - The GPKG data does not need a spatial index to be created as that indexing is normally held within the GeoPackage itself.*

</details>

<details>

<summary>MapInfo Professional</summary>

*Note - These instructions are based on MapInfo Professional version 16.0.4. More recent releases should perform in a similar manner.*

*Note - Versions of MapInfo Professional before the 16.0.0 release do not support the GPKG format. Versions from 16.0.0 onwards fully support the format.*

1. Launch MapInfo Professional.
2. Load a suitable backdrop map to provide context for the AB\_Core data.\
   \&#xNAN;*This can be map data held locally or from a wide variety of online sources, some of which are free to use. This example uses the OS Maps API light backdrop map, with the coordinate reference system set to EPSG 27700 (British National Grid).*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FWKltjjwtDX0DWmjNmZCO%2Fimage.png?alt=media&#x26;token=8ba41285-d24a-4c41-b1f6-49a7874fad2e" alt="MapInfo Professional UI showing backdrop map"><figcaption><p>MapInfo Professional UI showing backdrop map</p></figcaption></figure>
3. Select *Table* in the top menu and then select *Open > Table.*\
   \&#xNAN;*You can also do this using a quick launch button if it has been set up in MapInfo Professional.*
4. In the Open dialog:
   * Navigate to the AB\_Core GPKG folder location.
   * **Files of type**: Select *GeoPackage (\*.gpkg)*.
   * **Preferred View**: Select *Current Mapper.*\
     \&#xNAN;*This ensures that the data will display against the selected backdrop contextual mapping.*
   * Select the file to be loaded.
   * Click *Open*.

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FcwfkCmMPEmeTkpehJUfE%2Fimage.png?alt=media&#x26;token=5eb25a79-da90-4e8d-ad1d-965ef6d4fbd9" alt="MapInfo Professional Open dialog" width="321"><figcaption><p>MapInfo Professional Open dialog</p></figcaption></figure>
5. In the Select One or More Tables to Open dialog:\
   \&#xNAN;*In this dialog you can change the style of the loaded data one of several different available styles.*
6. Select a style and click *OK*.
7. Click *OK*.\
   \&#xNAN;*You can also specify the location of the newly created .TAB folder which will source the GPKG.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2Fm2827qfmOGRU1nHuRYzo%2Fimage.png?alt=media&#x26;token=66e5343c-9bfe-4858-b4b6-e9b8781db5b4" alt="MapInfo Professional Select One or More Tables to Open dialog" width="359"><figcaption><p>MapInfo Professional Select One or More Tables to Open dialog</p></figcaption></figure>
8. The GeoPackage data now loads into the map area.\
   \&#xNAN;*You can interrogate that data using any of the available tools.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FkrJQOzgVXpMD0L2qXh3K%2Fimage.png?alt=media&#x26;token=1bf205bd-15f8-49a5-9adf-fe2d64bc2509" alt="MapInfo Professional UI showing AddressBase Core data on the basemap"><figcaption><p>MapInfo Professional UI showing AddressBase Core data on the basemap</p></figcaption></figure>
9. You can easily browse the data by right-clicking on the new GPKG layer in the content panel and selecting *Browse*.\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FVkwnNi2dys3XgusLe4S3%2Fimage.png?alt=media&#x26;token=9ceac37a-641f-480b-ab39-17ad35c4cf7f" alt="MapInfo Professional UI showing AB_Core GPKG in the content panel" width="182"><figcaption><p>MapInfo Professional UI showing AB_Core GPKG in the content panel</p></figcaption></figure>
10. A new browser tab will appear alongside the map tab in the main display area.\\

    <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FbwJyp5rmOEnrJoR7cqCu%2Fimage.png?alt=media&#x26;token=d86cab4b-1ec3-4646-9988-e6a7327ec95f" alt="MapInfo Professional UI showing GPKG browser tab"><figcaption><p>MapInfo Professional UI showing GPKG browser tab</p></figcaption></figure>
11. Save the workspace in MapInfo Professional for future use.

</details>

<details>

<summary>CadCorp Map Modeller</summary>

*Note - These instructions are based on CadCorp Map Modeller version 9.*

1. Launch CadCorp Map Modeller.
2. Add a suitable backdrop map for use as a contextual backdrop:
   * Open a blank map and ensure that the default coordinate reference system is set to *British National Grid*.
   * Select *Add Overlay*.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FhC7On0K1yBVgb1nIkvHI%2Fimage.png?alt=media&#x26;token=7513689b-27ca-4aa3-a08f-f14fdb9f8d11" alt="CadCorp UI highlighting Add Overlay button"><figcaption><p>CadCorp UI highlighting Add Overlay button</p></figcaption></figure>
   * In Overlay Types, select *Web* > *Tile Dataset*, and then select *Next*.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FyQ08jnKuoNWvKsGyutbq%2Fimage.png?alt=media&#x26;token=627208fa-335b-4cd8-aa85-31f23d0539ed" alt="CadCorp Overlay Types dialog" width="401"><figcaption><p>CadCorp Overlay Types dialog</p></figcaption></figure>
   * In Tile Dataset, expand *Ordnance Survey (GB)* > *OS Open Zoomstack,* select one of the available styles and then click *Finish*.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FCNsw20KSQv1IWq4QWZS0%2Fimage.png?alt=media&#x26;token=01bff29d-deff-4aa8-ad40-c287c7884ae7" alt="CadCorp Tile Dataset dialog" width="405"><figcaption><p>CadCorp Tile Dataset dialog</p></figcaption></figure>

     *The backdrop map will load. Our example uses the 'Road' style version of the OS Open Zoomstack data as a backdrop. For this option, an internet connection is required. You could use a locally held overlay of data as an alternative option.*
3. To add the GPKG data:
   * Click *Add Overlay* in the top menu.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FDi0vskYLb42zdOektMbk%2Fimage.png?alt=media&#x26;token=d5c1d5e8-7add-489e-919f-edcbaf4614fd" alt="CadCorp UI showing backdrop map and highlighting Add Overlay button"><figcaption><p>CadCorp UI showing backdrop map and highlighting Add Overlay button</p></figcaption></figure>
   * In Overlay Types, select *Files* > *File* and then click *Next*.\\

     <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2Fre1a4OTUozbKu5Du4iFg%2Fimage.png?alt=media&#x26;token=fdfefebe-4ceb-4e2e-9696-07368de9ac75" alt="CadCorp Overlay Types dialog" width="431"><figcaption><p>CadCorp Overlay Types dialog</p></figcaption></figure>
4. In File Browser, locate the folder in which the AB\_Core data is stored, select the GPKG file, and then click *Finish*.\
   \&#xNAN;*Set the file type box (bottom right-hand field) to All known formats.* \\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FmF6mnx8OMwb4TPuuLWFE%2Fimage.png?alt=media&#x26;token=05aec916-9de6-483d-b45f-e47f04a049a8" alt="CadCorp File Browser dialog" width="380"><figcaption><p>CadCorp File Browser dialog</p></figcaption></figure>

   *The GPKG data will now load into CadCorp Map Modeller.*\
   \
   \&#xNAN;*The AB\_Core entry will display in the list of Maps in the left panel and the GPKG data should display against the backdrop map in the map area.*

**Displaying the address location**

You may need to change the styling to make the AB\_Core data visible:

1. Right-click the AB\_Core GPKG entry and select *Properties.*
2. In *Overlays > Styles* experiment with the symbol and point size options and click *OK* when satisfied.\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FXecWpGQGxbhqsDtmfDAZ%2Fimage.png?alt=media&#x26;token=54744006-35e0-46a1-8a7a-56e9f68194c6" alt="CadCorp Overlays dialog" width="443"><figcaption><p>CadCorp Overlays dialog</p></figcaption></figure>

   *This example uses a circle (Symbol field) and a point size of -0.05 (Point field) to make the data stand out against the backdrop mapping.*\\

   <figure><img src="https://1897589978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNpJpLP8RROUaWVQo5ea%2Fuploads%2FaYrSnr34giIgkRuADmOl%2Fimage.png?alt=media&#x26;token=04ae2704-ef84-4d28-834e-f58249d0437a" alt="CadCorp UI showing AddressBase Core data in the Maps panel and on the background map"><figcaption><p>CadCorp UI showing AddressBase Core data in the Maps panel and on the background map</p></figcaption></figure>

</details>
