HOW TO

Export a hosted feature layer as a CSV file with BNG coordinates in ArcGIS Online

Last Published: June 5, 2024

Summary

In ArcGIS Online, Web Mercator (WGS84) is the coordinate system of basemaps in the default basemap gallery, and layers have their respective spatial reference and transformations defined at a service level. Refer to ArcGIS Online: Maps for more information.

Due to the default coordinate system used in ArcGIS Online, when exporting a hosted feature layer to a CSV format, the x,y coordinates displayed in the CSV file are longitude and latitude coordinates formatted in WGS84. However, hosted feature layers using the British National Grid (BNG) coordinate system with north and east coordinate values can be exported as a CSV file with BNG coordinates included. 

This article provides three methods to export a hosted feature layer as a CSV file with BNG coordinates in ArcGIS Online.

Procedure

Using the Data tab on the item details page

Export a hosted feature layer as a CSV file with BNG coordinates in ArcGIS Online by creating north and east fields using the Data tab on the item details page.

  1. Sign in to ArcGIS Online.
  2. Navigate to the feature layer and open the item details page.
  3. Disable editing and sync for the hosted feature layer.
    1. Click the Settings tab.
    2. Under Feature layer (hosted), uncheck Enable editing and Enable Sync (required for offline use and collaboration).
    3. Click Save.
The editing and sync settings disabled for the hosted feature layer
  1. Create two new fields for the north and east coordinate values.
    1. Click the Data tab > Fields.
    2. Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
Naming the new field in the Add Field window
  1. Repeat Steps 4(a) and 4(b) to create a new field for the east coordinates.
  1. Calculate the coordinate values for the two new fields.
    1. Click the Table tab.
    2. In the attribute table, click the name of the north field and click Calculate.
The Calculate option on the north field in the attribute table
  1. In the Calculate Field window, click Arcade to open the Arcade Calculator.
  2. In the expression box, type the Arcade expression provided below.
Geometry($feature).y
  1. Click OK.
The Arcade expression in the Arcade Calculator expression box
  1. Repeat Steps 5(b) through 5(e) for the east field with the Arcade expression provided below.
Geometry($feature).x

The Arcade expressions calculate the x,y coordinates of each feature based on the coordinate system of the data. The image below shows the two new fields in the attribute table populated with the respective north and east coordinate values for each feature.

The newly created fields with the north and east coordinate values in the attribute table
  1. Enable editing and sync for the hosted feature layer again on the Settings tab.
  2. Export the feature layer as a CSV file. Refer to ArcGIS Online: Export data from hosted feature layers for more information.

The image below shows the exported CSV file with coordinate values in the BNG format.

The exported CSV file with coordinate values in BNG format

Using a form in ArcGIS Online Map Viewer

Export a hosted feature layer as a CSV file with BNG coordinates in ArcGIS Online by creating north and east fields using a form in ArcGIS Online Map Viewer.

  1. Sign in to ArcGIS Online.
  2. Navigate to the feature layer and open the item details page.
  3. Create two new fields for the north and east coordinate values.
    1. Click the Data tab > Fields.
    2. Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
Naming the new field in the Add Field window
  1. Repeat Steps 3(a) and 3(b) to create a new field for the east coordinates.
  1. Click the Overview tab > Open in Map Viewer to open the feature layer in ArcGIS Online Map Viewer.
  2. In Map Viewer, on the Settings (light) toolbar, click More > Forms. The Configure form window is displayed.
Navigating to the Forms option on the Settings toolbar The Configure form window
  1. In the form builder, drag and drop the two new fields from Step 3 into the form canvas.
Note:
Alternatively, double click the fields to add them to the form canvas.
  1. Calculate the coordinate values for the two new fields.
    1. On the form canvas, select the north field. The Properties pane is displayed.
    2. In the Properties pane, scroll down to Calculated expression and click The icon in the Calculated expression section.
The north field on the form canvas and the Properties pane
  1. In the Calculated expressions window, click New expression. The New expression window is displayed.
  2. In the expression box, type the Arcade expression provided below.
Geometry($feature).y
  1. Click Done.
The Arcade expression in the New expression window expression box
  1. Repeat Steps 7(a) through 7(e) for the east field with the Arcade expression provided below.
Geometry($feature).x
  1. In the Configure form window, click OK.
  2. Export the feature layer as a CSV file. Refer to ArcGIS Online: Export data from hosted feature layers for more information.

The image below shows the exported CSV file with coordinate values in the BNG format.

The exported CSV file with coordinate values in BNG format

Using a form in the ArcGIS Field Maps Designer web app

Export a hosted feature layer as a CSV file with BNG coordinates in ArcGIS Online by creating north and east fields using a form in the Field Maps Designer web app.

  1. Sign in to ArcGIS Online.
  2. Navigate to the feature layer and open the item details page.
  3. Create two new fields for the north and east coordinate values.
    1. Click the Data tab > Fields.
    2. Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
Naming the new field in the Add Field window
  1. Repeat Steps 3(a) and 3(b) to create a new field for the east coordinates.
  1. Create a web map with the hosted feature layer. Refer to ArcGIS Online: Get started creating maps (Map Viewer) for more information.
  2. Open the map in the Field Maps Designer web app.
  3. In the form builder, drag and drop the two new fields from Step 3 into the form canvas.
Note:
Alternatively, double click the fields to add them to the form canvas.
  1. Calculate the coordinate values for the two new fields.
    1. On the form canvas, select the north field. The Properties pane is displayed.
    2. In the Properties pane, scroll down to Calculated expression and click The icon in the Calculated expression section.
The north field on the form canvas and the Properties pane
  1. In the Calculated expressions window, click New expression. The New expression window is displayed.
  2. In the expression box, type the Arcade expression provided below.
Geometry($feature).y
  1. In the Calculated expressions window, click New expression. The New expression window is displayed.
The Arcade expression in the New expression window expression box
  1. Repeat Steps 7(a) to 7(e) for the east field with the expression provided below.
Geometry($feature).x
  1. On the form canvas, click Save to map The Save to map icon.
  2. Export the feature layer as a CSV file. Refer to ArcGIS Online: Export data from hosted feature layers for more information.

The image below shows the exported CSV file with coordinate values in the BNG format.

The exported CSV file with coordinate values in BNG format

Article ID: 000031822

Software:
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options