Skip to content

Commit

Permalink
correction for #94
Browse files Browse the repository at this point in the history
  • Loading branch information
SymbolixAU committed May 28, 2019
1 parent 0e0feea commit b1000c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Rcpp::List mesh_to_sf( Rcpp::List& mesh, Rcpp::StringVector vertices ) {
// as we're working with polygons, we can turn the coordinates into list of matrices
size_t n_row = ib.nrow();
size_t n_col = ib.ncol();
size_t n_coords = vb.nrow();

Rcpp::List sfc( n_col );
Rcpp::List z( n_col ); // for creating a list-column of the z attributes
Expand All @@ -39,7 +40,7 @@ Rcpp::List mesh_to_sf( Rcpp::List& mesh, Rcpp::StringVector vertices ) {

for( i = 0; i < n_col; i++ ) {
polygon_indeces = ib(_, i);
Rcpp::NumericMatrix a_polygon( n_row, n_row ); // the number of cols of ib teslls us the number of sets of coordinates
Rcpp::NumericMatrix a_polygon( n_row, n_coords );
Rcpp::List sfg(1);
Rcpp::NumericVector z_values( n_row ); // each 'col' contains the index of the xyz1 coords

Expand Down

0 comments on commit b1000c8

Please sign in to comment.