sf_fix_crs: Fix SF CRS

View source: R/sf_fix_crs.R

sf_fix_crsR Documentation

Fix SF CRS

Description

Fixes mis-specified coordinate reference system (CRS) with respect to the geospatial object's coordinate units. Ensures that the CRS matches the feature geometry units.

Usage

sf_fix_crs(obj)

Arguments

obj

sf object; The geospatial object to be corrected.

Details

Geospatial features generated using the GeoJSON format often contain a CRS that does not match the feature geometry coordinate units. The GeoJSON format made the choice to not even try: [RFC 7946 - The GeoJSON Format](https://datatracker.ietf.org/doc/html/rfc7946#page-12).

Value

the geospatial object with CRS correctly defined to match feature coordinate geometry.


FluvialGeomorph/fluvgeo documentation built on June 10, 2025, 12:03 p.m.