{"id":18722589,"url":"https://github.com/mdsumner/polydar","last_synced_at":"2025-11-11T05:30:20.943Z","repository":{"id":72211726,"uuid":"261374810","full_name":"mdsumner/polydar","owner":"mdsumner","description":"WIP R package for polylidar","archived":false,"fork":false,"pushed_at":"2020-05-05T13:03:00.000Z","size":201,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T12:16:58.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2002.01886","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-05T06:05:03.000Z","updated_at":"2020-05-05T13:03:03.000Z","dependencies_parsed_at":"2023-02-24T05:30:20.934Z","dependency_job_id":null,"html_url":"https://github.com/mdsumner/polydar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fpolydar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fpolydar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fpolydar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fpolydar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/polydar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587244,"owners_count":19663892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:42:07.846Z","updated_at":"2025-11-11T05:30:17.187Z","avatar_url":"https://github.com/mdsumner.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# polydar\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nA very raw port of [polylidar](https://github.com/JeremyBYU/polylidar) to try\nbuilding an R package with it. \n\nWhat I did: \n\n* clone polylidar\n* cp polylidar/polylidar -R polydar/\n* cp polylidar/examples polydar/examples\n* mv polydar/polylidar polydar/src\n* create polydar/Makevars\n* cp polydar/examples/cpp/simple-2d.cpp polydar/src/simple-2d-polydar.cpp\n\nand modified that to call what was main from R as `IntegerVector polydar`. \n\nSet up all the Rcpp and roxygen stuffs - you need `usethis::use_rcpp()` and you need to ensure roxygen is applied when you build i.e. *check 'Install and restart' for roxygen*. \n\nWIP\n\n## TODO\n\n- [ ] convert to headers usage\n- [x] input data from R\n- [x] input configuration from R\n- [ ] extract polygons and triangles\n- [ ] explore configuration and examples\n\n## Not a proper R package yet\n\nStill doing naughty stuff so beware. \n\n```\nR CMD check results ────────────────────────────────────── polydar 0.0.1 ────\nDuration: 45.1s\n\n\u003e checking if this is a source package ... WARNING\n  Subdirectory ‘src’ contains:\n    glue.hpp\n  These are unlikely file names for src files.\n\n\u003e checking Rd metadata ... WARNING\n  Rd files with duplicated alias 'polydar':\n    ‘polydar-package.Rd’ ‘polydar.Rd’\n\n\u003e checking for GNU extensions in Makefiles ... WARNING\n  Found the following file(s) containing GNU extensions:\n    examples/cpp/Makefile\n  Portable Makefiles do not use GNU extensions such as +=, :=, $(shell),\n  $(wildcard), ifeq ... endif, .NOTPARALLEL See section ‘Writing portable\n  packages’ in the ‘Writing R Extensions’ manual.\n\n\u003e checking top-level files ... NOTE\n  Non-standard file/directory found at top level:\n    ‘examples’\n\n\u003e checking pragmas in C/C++ headers and code ... NOTE\n  Files which contain pragma(s) suppressing diagnostics:\n    ‘src/include/parallel_hashmap/phmap.h’\n    ‘src/include/parallel_hashmap/phmap_bits.h’\n\n\u003e checking compiled code ... NOTE\n  File ‘polydar/libs/polydar.so’:\n    Found ‘_ZSt4cerr’, possibly from ‘std::cerr’ (C++)\n      Object: ‘polylidar.o’\n    Found ‘_ZSt4cout’, possibly from ‘std::cout’ (C++)\n      Objects: ‘polylidar.o’, ‘simple-2d-polydar.o’\n  \n  Compiled code should not call entry points which might terminate R nor\n  write to stdout/stderr instead of to the console, nor use Fortran I/O\n  nor system RNGs.\n  \n  See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.\n\n0 errors ✓ | 3 warnings x | 3 notes x\nError: R CMD check found WARNINGs\nExecution halted\n\nExited with status 1.\n```\n\n\n## Usage\n\nNone yet. \n\nAll it does is run the simple2d example, with input data option, config optional: \n\n```{r simple}\npolydar:::polydar()\n\n#\u003e Simple C++ Example of Polylidar\n#\u003e Polylidar took 0 milliseconds processing a 5 point cloud\n#\u003e Point indices of Polygon Shell: [3,0,1,2]\n\n#\u003e Detailed timings in milliseconds:\n#\u003e Delaunay Triangulation: 0.01; Mesh Extraction: 0.00; Polygon Extraction: 0.01\n```\n\n\nThis is starting to show a bit more interesting stuff: \n\n```{r data}\nxy \u003c- matrix(unlist(quakes), ncol = 2L)\npolydar:::polydar(xy)\n\n\npolydar::polydar(c(quakes$long, quakes$lat))\n```\n\n```\nSimple C++ Example of Polylidar\nPolylidar took 1 milliseconds processing a 1000 point cloud\nPoint indices of Polygon Shell: [662,619,837,601,828,973,954,661,692,539,717,667,674,874,638,598,847,799,953,921,755,618,816,732,805,873,640,781,604,649,950,562,745,830,627,564,504,783,677,922,959,648,853,594,521,964,691,612,877,576,901,505,663,510,818,751,744,586,917,688,589,770,690,992,531,941,753,655,558,925,867,913,879,798,508,650,932,889,773,791,957,936,826,536,945,827,893,549,578,754,694]\n[699,589,645,818,538,809,690]\n[666,675,679,523,659]\n[668,672,800,991,673,669,861,557,942,725,985,847,923,710]\n[929,700,675]\n[872,661,522]\n[802,737,551,704,804,741,681,897,872]\n[764,587,708]\n[597,762,951,950]\n[553,709,951]\n[944,554,871]\n[296,253,125,133,190]\n[133,457,432,362]\n[362,443,155]\n[390,493,327,58]\n[312,152,43,293,418,60,254,389,3,121,194,258,384,285,379,233,460,340,182,454,398,70,360,178,314,26]\n[236,164,38,251,76,309,163,279,15,159,62,84,453,455,244,114,305,421,95,297,356,342,355,492]\n[211,17,54,444,368,56,395,201,138,82,57,129,311,324,238,167,411,185,94,410,353,198,287,286,187,352,408,189,250,205,68,274,256,497]\n\nDetailed timings in milliseconds:\nDelaunay Triangulation: 0.95; Mesh Extraction: 0.19; Polygon Extraction: 0.20\n[1] 0\n```\n\n\n---\n\n## Code of Conduct\n  \nPlease note that the polydar project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fpolydar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fpolydar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fpolydar/lists"}