build_mapping_data {mapindiatools}R Documentation

Internal map creation tools

Description

'build_mapping_data()' creates the modified shapefiles used by the 'mapindia' package.

'ea_crs()' returns the World Geodetic System 1984 projection method (CRS) used by this package and 'mapindia'.

'compute_centroids()' computes the modified centroids for each state or district polygon using a center-of-mass technique on the largest polygon in the region.

Usage

build_mapping_data(type = c("states", "districts"), input_file, output_file)

ea_crs()

compute_centroids(polygons, iterations = 3, initial_width_step = 10)

Note

Using these functions externally is not recommended since they make certain undocumented assumptions that may not work with all inputs.

It is strongly recommend that the 'mapindia' package is used directly.

References

Gert (2017). “How to calculate polygon centroids in R (for non-contiguous shapes).” <https://gis.stackexchange.com/a/265475>.


[Package mapindiatools version 1.0.1 Index]