Package 'mbquartR'

Title: Finding Manitoba Quarter Sections
Description: This package has four main functions: 1) download the Manitoba Original Survey Legal Descriptions data set; 2) find the coordinates of a quarter sections given the legal land description (e.g., "NE-11-33-29W"); 3) find the legal land description using coordinates (lat and long); and 4) plot these points on a map.
Authors: Alex Koiter [aut, cre] (<https://orcid.org/0000-0002-9355-9561>, Associate Professor, Department of Geography and Environment, Brandon University), Emily H Markowitz [rev] (Research Fisheries Biologist, Alaska Fisheries Science Center, NOAA Fisheries | U.S. Department of Commerce. Emily reviewed the package for rOpenSci, see https://github.com/ropensci/software-review/issues/658)
Maintainer: Alex Koiter <koitera@brandonu.ca>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2025-03-11 21:18:39 UTC
Source: https://github.com/ropensci/mbquartR

Help Index


Finding Manitoba, Canada, quarter sections made easier

Description

mbquartR is an R package for locating quarter sections in Manitoba using lat/long coordinates or the legal land descriptions using the Manitoba Original Survey Legal Descriptions data set from the DataMB website (https://geoportal.gov.mb.ca/).

Details

There are four main functions in this package:

  1. Download the Manitoba Original Survey Legal Descriptions data set

  1. Search for legal land descriptions using lat and long coordinates

  1. Search for lat and long coordinates using legal land descriptions

  1. Plot search results on an interactive map

Author(s)

Maintainer: Alex Koiter koitera@brandonu.ca (ORCID) (Associate Professor, Department of Geography and Environment, Brandon University)

Other contributors:

  • Emily H Markowitz (Research Fisheries Biologist, Alaska Fisheries Science Center, NOAA Fisheries | U.S. Department of Commerce. Emily reviewed the package for rOpenSci, see https://github.com/ropensci/software-review/issues/658) [reviewer]

See Also

Useful links:


Quickly find MB quarter sections on a map

Description

Map the output of search_legal() or search_coord(), similar data frame, or a vector of legal land descriptions onto an interactive Leaflet map.

Usage

map_quarter(x, map.type = "Esri.WorldImagery")

Arguments

x

Output from search_legal() or search_coord(), similar data frame, or a vector of legal land descriptions.

map.type

Base map: see https://leaflet-extras.github.io/leaflet-providers/preview/ for available options

Details

Map displays the centre point and estimates the boundaries for quarter sections.

Map locations using a data frame which must include a column named legal containing legal land descriptions.

Map locations using a vector of legal land descriptions.

Value

A Leaflet map

Examples

search1 <- search_legal(x = c("NE-11-33-29W1", "SW-20-2-1W1"))
map_quarter(x = search1)

search2 <- search_coord(long = c(-101.4656, -99.99768),
lat = c(51.81913, 49.928926))
map_quarter(x = search2)

search3 <- c("NE-11-33-29W1", "SW-20-2-1W1")
map_quarter(x = search3)

Manitoba Original Survey Legal Descriptions data

Description

A subset of data from Manitoba Original Survey Legal Descriptions data

Usage

mbquartR_example

Format

mbquartR_example

A data frame with 4 rows and 14 columns:

FID

Unique ID number

Formal Legal Description

The formal legal description (Leading zeros on numbers)

Quarter

Quarter Section value

SECTION

Section value

TOWNSHIP

Township value

RANGE

Range value

x, y

Center Coordinates

...

Source

https://geoportal.gov.mb.ca/


Download the MB quarter section data

Description

Downloads the full list of quarter sections and coordinates from the Manitoba Geoportal. Note that when the Geoportal is unavailable, data is downloaded from an archived version from the package repository on Github.

Usage

quarters_dl(force = FALSE, ask = TRUE, quiet = FALSE)

Arguments

force

Logical. If TRUE, forces a re-download of the data. Note this data shouldn't require regular (or any) updates.

ask

Logical. If TRUE, ask to create the cache folder for MB quarter section data

quiet

Logical. If TRUE, suppresses status messages while downloading the data

Details

This data set should be static.

Value

Nothing. But has the side effect of downloading a .csv file of Manitoba Original Survey Legal Descriptions and coordinates to the cache folder (cache_dir()).

Examples

quarters_dl()

Search for the nearest quarter section using latitude and longitude

Description

Find the quarter section(s) and other legal division types closest to provided coordinates. Returns the legal land description. Users must use provide coordinates in the decimal degree format.

Usage

search_coord(long, lat)

Arguments

long

Numeric. Vector of longitudes (decimal degree) with resolution up to one hundred thousandth of a degree. Values outside of bounds will return error (-102.0 to -88.9 degrees).

lat

Numeric. Vector of latitudes (decimal degree) with resolution up to one hundred thousandth of a degree. Values outside of bounds will return error (49.0 to 60.0 degrees).

Details

The longitudinal extent of Manitoba ranges from approximately -102.0 to -88.9 degrees (negative values indicate western hemisphere).

The latitudinal extent of Manitoba ranges from approximately 49.0 to 60.0 degrees (positive values indicate northern hemisphere).

A legal land description consists of four values separated by a -

  1. Quarter Section (SW)

  2. Section (9)

  3. Township (8)

  4. Range (6E1)

For example: A legal land description of SW-9-8-6E1 can be interpreted as the Southwest Quarter of Section 9, Township 8, Range 6 East of the 1st Meridian.

#' Other land division types can have different naming conventions and include:

  • RL = River lot (e.g., RL-11-Oak Island)

  • Lot = Township lot (e.g., 10-54-27W1)

  • OT = Outer two mile lot (e.g., OT-11A-St. Clements)

  • PL = Parish lot (e.g., PL-R-St. Andrews)

  • SL = Settlement lot (e.g., SL-2-Roman Catholic Mission Property)

  • WL = Wood lot (e.g., WL-179-Portage La Prairie)

Value

A tibble of the centre latitude and longitude coordinates, corresponding legal land descriptions, land division type, the user provided latitude and longitude coordinates, and distance in metres from the provided coordinates to the centre of the closest quarter section.

Examples

search_coord(long = c(-101.4656, -99.99768), lat = c(51.81913, 49.928926))
x <- data.frame(long = c(-101.4656, -99.9976), lat = c(51.81913, 49.92892))
search_coord(long = x$long, lat = x$lat)