Reprojecting Layers: A Step-By-Step Guide

Understanding Coordinate Reference Systems

A coordinate reference system (CRS) is a coordinate-based reference system that defines locations on the surface of the Earth. It consists of a set of numeric coordinates and parameters that determine how those coordinates relate to positions on the Earth’s surface. Common components of a CRS include a datum, projection, coordinate system, and units.

There are two main categories of CRSs used in GIS: geographic coordinate systems and projected coordinate systems. Geographic coordinate systems use latitude and longitude coordinates to define locations on a three-dimensional surface. These locations relate to an ellipsoidal model of the Earth. Popular geographic coordinate systems include WGS 1984, NAD 1983, and GDA 2020.

Projected coordinate systems project geographic coordinates onto a two-dimensional planar surface. This projection distorts Earth’s curved surface to allow it to be represented on a flat map. Popular projected CRSs include Universal Transverse Mercator (UTM), Lambert Conformal Conic, and Robinson. Using the same projected CRS is important for visualizing, analyzing, and mapping consistent spatial data.

When to Reproject Data

Reprojecting involves converting spatial data from one coordinate reference system to another. There are three main situations that typically require reprojection in GIS workflows:

Visualizing Layers Together

When visualizing spatial data layers together in GIS software, they should use the same coordinate reference system. Software like ArcGIS may automatically reproject layers “on-the-fly” for visualization. However, this can cause distortion and alignment issues. Permanently reprojecting data to the same CRS before visualizing ensures proper alignment.

Performing Spatial Analysis

Spatial analysis tools require input data layers with identical coordinate systems. Functions like intersection and distance calculations can return incorrect results if data is not in the same projected CRS. To properly analyze spatial relationships, input data must first be reprojected to a shared coordinate system.

Avoiding Distortion or Misalignment

Viewing data layers with different coordinate systems can cause distortion, misalignment, and inaccurate spatial relationships. Projecting from geographic to projected systems can also introduce distortion. Reprojecting to an appropriate shared CRS minimizes these issues and allows for accurate analysis and mapping.

Reprojecting Vector Data

Vector data representing points, lines, and polygons can be reprojected using the Project tool in ArcGIS. This converts features from one coordinate system to another while preserving their attributes and spatial relationships.

Using ArcGIS Project Tool

The key parameters for the Project tool are the input dataset, output location and name, and output coordinate system. Optionally, a transformation can defined to improve accuracy.

  1. Right click the layer in ArcMap Table of Contents > Data > Export Data to open the Export Data window
  2. Choose the Output Coordinate System from the dropdown menu > Select a Transformation if desired
  3. Click the Environments button to set Workspace, Processing Extent, and other environment settings
  4. Click OK to run the Project tool

Example Code for Project Tool

The following Python code reprojects a feature class to UTM Zone 10N:

import arcpy

# Overwrite existing outputs
arcpy.env.overwriteOutput = True

# Input feature class
in_features = r"C:\GIS\Data\cities.shp"

# Output feature class
out_feature_class = r"C:\GIS\Data\cities_10N.shp" 

# Output coordinate system
out_coordinate_system = arcpy.SpatialReference(26910) 

# Run Project tool
arcpy.Project_management(in_features, out_feature_class, out_coordinate_system)

Checking Results Visually and with Metadata

Zooming to the layer extent shows it matches the new coordinate system’s grid. Reviewing metadata with the Describe tool confirms the updated spatial reference information matches the targeted output CRS.

Reprojecting Raster Data

The Project Raster tool reprojects raster datasets like aerial photos, elevation data, and satellite imagery to new coordinate reference systems. It resamples cell values appropriately during conversion.

Using ArcGIS Project Raster Tool

Key parameters for Project Raster include the input raster, output location/name, output coordinate system, and cell size. A cell size that matches the input is commonly used.

  1. Search for Project Raster in the ArcToolbox Search window > Double click to open tool
  2. Fill in all the parameter values
  3. Click OK to run

Example Code for Project Raster Tool

This Python snippet reprojects a GeoTIFF CRS using a defined transformation:

import arcpy

# Input GeoTIFF
in_raster = r"C:\GIS\Data\elevation.tif"  

# Output reprojected raster
out_raster = r"C:\GIS\Data\elevation_10N.tif"

# Output coordinate system 
out_coordinate_system = arcpy.SpatialReference(26910)

# Cell size
cell_size = 30

# Transformation  
transform = "NAD_1983_To_WGS_1984_5"  

# Run
arcpy.ProjectRaster_management(in_raster, out_raster, out_coordinate_system, 
                               transform, cell_size)

Checking Results Visually and with Metadata

Swiping between the input and output in ArcMap reveals proper geographic alignment. The output raster’s spatial reference metadata matches the targeted CRS and parameters.

Best Practices for Reprojection

Follow these best practices when reprojecting GIS data to minimize issues:

Backing Up Original Data

Always make backups of your original datasets before reprojection. This provides a clean copy you can reference or revert to if needed.

Choosing Suitable Output Coordinate System

Select an appropriate output CRS based on your study area, required accuracy, and intended analysis tasks. Be consistent across data layers for effective spatial analysis.

Checking Alignment with Other Layers

After reprojection, visualize and inspect outputs alongside existing layers to verify proper alignment with no gaps or overlaps between features.

Leave a Reply

Your email address will not be published. Required fields are marked *