yoverx: Height / width ratio

Description Usage Arguments Examples

Description

Quick function for getting the 1/aspect ratio of a geometry

Usage

1
yoverx(geom, osm = T)

Arguments

geom

an sp geometry object

Since map objects have varying aspect ratios, saving them to files results in lots of whitespace. This function enables you to specify the output dimensions in the same ratio as the sp object.

Examples

1
2
3
x = 800 # width in pixels
y = yoverx(basemap)
png(filename, width = x, height = y)

townleym/mSpatial documentation built on May 31, 2019, 6:46 p.m.