Learn R Programming

terra (version 1.7-83)

normalize.longitude: normalize vector data that crosses the dateline

Description

Normalize the longitude of geometries, move them if they are outside of the -180 to 180 degrees range.

Usage

# S4 method for SpatVector
normalize.longitude(x)

Value

SpatVector

Arguments

x

SpatVector

See Also

rotate for SpatRaster

Examples

Run this code
p <- vect("POLYGON ((120 10, 230 75, 230 -75, 120 10))")
normalize.longitude(p)

Run the code above in your browser using DataLab