tps2d_seeds: Spatially Warp SpatialPoints Using A Set Of Reference Point...

Description Usage Arguments Value Examples

View source: R/tps2d_seeds.r

Description

Warp a the points in a .shp file using a thin plate spline established from a set of reference-target point pairs

Usage

1
2
tps2d_seeds(reference_seeds_shp, target_seeds_shp, target_ref_ID_pairs,
  outp_shp_fname)

Arguments

reference_seeds_shp

Point shapefile of reference seeds

target_seeds_shp

Point shapefile of target seeds

target_ref_ID_pairs

A two-column table that provides in the first column the FIDs of points in target_seeds_shp and in the second column their equivalent FID in reference_seeds_shp

outp_shp_fname

Filename for a .shp file to which to writ the results

Value

A SpatialPoints object with the points in reference_seeds_shp stretched to match the target point cloud. The X and Y coordinates of the original points in reference_seeds_shp are saved as the fields primalX and primalY in the attribute table of the output

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
target_ref_ID_pairs <- read.csv('E:/beckpie/temp/link_file.csv')
target_ref_ID_pairs <- target_ref_ID_pairs[complete.cases(target_ref_ID_pairs),]
reference_seeds_shp <- 'H:/FISE/forest/CanopyHealthMonitoring/PWN/flights_final/shp+stats/141120/141120_rgb/141120_rgb_all_trees.shp'
target_seeds_shp <- 'H:/FISE/forest/CanopyHealthMonitoring/PWN/flights_final/shp+stats/150727/150727_mca/150727_mca_some_trees.shp'
outp_shp_fname <- 'H:/FISE/forest/CanopyHealthMonitoring/PWN/flights_final/shp+stats/150727/150727_mca/150727_mca_all_trees_by_tps.shp'
tps2d_seeds(reference_seeds_shp, target_seeds_shp, target_ref_ID_pairs, outp_shp_fname)

## End(Not run)

pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.