Skip to content

Commit

Permalink
Merge branch 'master' of github.com:r-spatial/lwgeom
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Feb 9, 2024
2 parents 85a6526 + dfbce98 commit a95440a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lwgeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ Rcpp::NumericMatrix CPL_endpoint(Rcpp::List sfc) {
Rcpp::CharacterVector CPL_sfc_to_wkt(Rcpp::List sfc, Rcpp::IntegerVector precision) {

std::vector<LWGEOM *> lwgeom_cw = lwgeom_from_sfc(sfc);
Rcpp::CharacterVector out;
Rcpp::CharacterVector out(lwgeom_cw.size());
for (size_t i = 0; i < lwgeom_cw.size(); i++) {
char *wkt = lwgeom_to_wkt(lwgeom_cw[i], WKT_EXTENDED, precision[0], NULL);
out.push_back(wkt);
out[i] = wkt;
free(wkt);
}
return out;
Expand Down

0 comments on commit a95440a

Please sign in to comment.