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.
- Sign in to ArcGIS Online.
- Navigate to the feature layer and open the item details page.
- Disable editing and sync for the hosted feature layer.
- Click the Settings tab.
- Under Feature layer (hosted), uncheck Enable editing and Enable Sync (required for offline use and collaboration).
- Click Save.
- Create two new fields for the north and east coordinate values.
- Click the Data tab > Fields.
- Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
- Repeat Steps 4(a) and 4(b) to create a new field for the east coordinates.
- Calculate the coordinate values for the two new fields.
- Click the Table tab.
- In the attribute table, click the name of the north field and click Calculate.
- In the Calculate Field window, click Arcade to open the Arcade Calculator.
- In the expression box, type the Arcade expression provided below.
Geometry($feature).y
- Click OK.
- 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.
- Enable editing and sync for the hosted feature layer again on the Settings tab.
- 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.
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.
- Sign in to ArcGIS Online.
- Navigate to the feature layer and open the item details page.
- Create two new fields for the north and east coordinate values.
- Click the Data tab > Fields.
- Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
- Repeat Steps 3(a) and 3(b) to create a new field for the east coordinates.
- Click the Overview tab > Open in Map Viewer to open the feature layer in ArcGIS Online Map Viewer.
- In Map Viewer, on the Settings (light) toolbar, click More > Forms. The Configure form window is displayed.
- 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.
- Calculate the coordinate values for the two new fields.
- On the form canvas, select the north field. The Properties pane is displayed.
- In the Properties pane, scroll down to Calculated expression and click .
- In the Calculated expressions window, click New expression. The New expression window is displayed.
- In the expression box, type the Arcade expression provided below.
Geometry($feature).y
- Click Done.
- Repeat Steps 7(a) through 7(e) for the east field with the Arcade expression provided below.
Geometry($feature).x
- In the Configure form window, click OK.
- 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.
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.
- Sign in to ArcGIS Online.
- Navigate to the feature layer and open the item details page.
- Create two new fields for the north and east coordinate values.
- Click the Data tab > Fields.
- Click Add. In the Add Field window, specify a name to indicate the north coordinates for Field Name and click Add New Field.
- Repeat Steps 3(a) and 3(b) to create a new field for the east coordinates.
- Create a web map with the hosted feature layer. Refer to ArcGIS Online: Get started creating maps (Map Viewer) for more information.
- Open the map in the Field Maps Designer web app.
- 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.
- Calculate the coordinate values for the two new fields.
- On the form canvas, select the north field. The Properties pane is displayed.
- In the Properties pane, scroll down to Calculated expression and click .
- In the Calculated expressions window, click New expression. The New expression window is displayed.
- In the expression box, type the Arcade expression provided below.
Geometry($feature).y
- In the Calculated expressions window, click New expression. The New expression window is displayed.
- Repeat Steps 7(a) to 7(e) for the east field with the expression provided below.
Geometry($feature).x
- On the form canvas, click Save to map .
- 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.