This function expects data to contain several X- and Y-columns. For example, consider data with columns x1, y1, x2, and y2. Suppose xColumns = c("x1", "x2") and yColumns = c("y1", "y2"). The result will contain nrow(data) polygons. Each one will have two vertices, (x1, y1) and (x2, y2) and POS values 1 and 2, respectively. If data includes an SID column, so will the result.
If data contains an EID and not a PID column, the function uses the EIDs as PIDs.
If data contains both PID and EID columns, the function assumes it is PolyData and ignores the EID
column.
Returns
PolySet with the same PIDs as those given in data. If data has an SID column, the result will include it.