HOW TO
Coordinate system conversion using PyProj is required when working with non-spatial (tabular) datasets containing latitude and longitude values referenced to a geographic coordinate system. These datasets must be converted into a projected coordinate system before mapping in ArcGIS Pro to ensure correct alignment with other spatial data. PyProj provides a transformation method to convert geographic coordinates into spatial coordinates.
Prerequisites to convert the coordinate system: • Install PyProj in the ArcGIS Pro cloned Python environment using Package Manager. Refer to ArcGIS Pro: Add a package for more information. • Activate the ArcGIS Pro cloned Python environment. Refer to ArcGIS Pro: Activate an environment from the Package Manager page for more information.
python

Note: The following Python code illustrates this workflow. Results may vary depending on input values.
# import Transformer from pyproj
from pyproj import Transformer
# Create a transformer from ETRS89 Geographic (EPSG:4258) to ETRS89 / UTM Zone 30N (EPSG:25830)
# Always verify EPSG codes for both source and target coordinate systems.
transformer = Transformer.from_crs("EPSG:4258", "EPSG:25830", always_xy=True) # Use always_xy=True to ensure longitude/latitude order consistency
# Input your own coordinates (longitude, latitude)
# Recommended to test with a small sample before converting large datasets
coordinates = [
(-4.647129, 55.576963),
(-4.650153, 55.576684),
(-4.649489, 55.575063),
(-4.646428, 55.575322)
]
# Apply the Transformer here
for lon, lat in coordinates:
easting, northing = transformer.transform(lon, lat)
print(f"{easting:.4f}, {northing:.4f}")
The Python interpreter prompt below shows the output of the converted coordinate values.



and select the CSV file.
to open the Coordinate System window.
Article ID: 000039567
Get help from ArcGIS experts
Start chatting now