mapdeck icon indicating copy to clipboard operation
mapdeck copied to clipboard

earcut

Open dcooley opened this issue 5 years ago • 0 comments

The base Polygon uses mapbox's javascript earcut

The C++ code is a header-only and will be exported from decido

Goal

Build a primitive 'TriangleLayer' which bypasses the javascript earcutting and uses pre-cut Type32Array([ ]) (interleaved array) built from the C++ code within R.

TODO

  • [ ] interleave mesh.3d object
  • [x] polygon.cpp calls interleave::earcut
  • [ ] non-extruded polygons use add_triangles
    • [x] binaryStartIndices is the index of each geometry, not each triangle
  • [ ] non-extruded && stroked, add also a PathLayer
  • [ ] extruded continues to use PolygonLayer in non-binary format?
    • [ ] or through a spatialwidget::create_interleaved() function?
  • [x] highlighting each polygon on hover
  • [x] tooltip works
  • [ ] getElevation prop works
  • [ ] change scatterplot_data to match the structure of polygon_data.data.data
  • [ ] test the coloured vertices are correct
    • [ ] is the highest yellow and lowest purple?
    • [ ] what happens to the first / last coordinate (is it coloured n-1, or n+1)
  • [x] sfheaders list column issue resolved

  • [x] interleave 0.1.1 on CRAN
  • [x] geometries 0.2.1 on CRAN
  • [x] sfheaders 0.4.2 on CRAN
  • [ ] spatialwidget 0.2.4 on CRAN

dcooley avatar Apr 30 '20 22:04 dcooley