Skip to content

strange polygon rendering #106

@mtennekes

Description

@mtennekes

Trigger: r-tmap/tmap#1121

s = structure(list(geometry = structure(list(structure(list(structure(c(3.62670515398615e-05, 
3.62670515398615e-05, 3.77296938360038e-05, 3.77296938360038e-05, 
3.62670515398615e-05, 9.08826083510764e-06, 1.0550903139861e-05, 
1.0550903139861e-05, 9.08826083510764e-06, 9.08826083510764e-06
), dim = c(5L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
    structure(c(5.50918858216808e-06, 5.50918858216808e-06, 7.32517647183648e-06, 
    7.32517647183648e-06, 5.50918858216808e-06, 3.18579548496766e-05, 
    3.36739427469333e-05, 3.36739427469333e-05, 3.18579548496766e-05, 
    3.18579548496766e-05), dim = c(5L, 2L))), class = c("XY", 
"POLYGON", "sfg")), structure(list(structure(c(7.21988539476866e-05, 
7.21988539476866e-05, 7.31879430255417e-05, 7.31879430255417e-05, 
7.21988539476866e-05, 4.14544515931645e-05, 4.24435406661171e-05, 
4.24435406661171e-05, 4.14544515931645e-05, 4.14544515931645e-05
), dim = c(5L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
    structure(c(7.82876725983538e-05, 7.82876725983538e-05, 7.9548932920494e-05, 
    7.9548932920494e-05, 7.82876725983538e-05, 6.60124527940975e-05, 
    6.72737131139732e-05, 6.72737131139732e-05, 6.60124527940975e-05, 
    6.60124527940975e-05), dim = c(5L, 2L))), class = c("XY", 
"POLYGON", "sfg")), structure(list(structure(c(0.000128377892510356, 
0.000128377892510356, 0.000129484623579259, 0.000129484623579259, 
0.000128377892510356, 3.23834455470926e-05, 3.34901766076588e-05, 
3.34901766076588e-05, 3.23834455470926e-05, 3.23834455470926e-05
), dim = c(5L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
    structure(c(9.51278314168574e-05, 9.51278314168574e-05, 9.82132986515658e-05, 
    9.82132986515658e-05, 9.51278314168574e-05, 2.54662525200462e-05, 
    2.85517197611975e-05, 2.85517197611975e-05, 2.54662525200462e-05, 
    2.54662525200462e-05), dim = c(5L, 2L))), class = c("XY", 
"POLYGON", "sfg")), structure(list(structure(c(6.35502494797136e-05, 
6.35502494797136e-05, 6.62827274079997e-05, 6.62827274079997e-05, 
6.35502494797136e-05, 6.54561183877692e-05, 6.81885963221527e-05, 
6.81885963221527e-05, 6.54561183877692e-05, 6.54561183877692e-05
), dim = c(5L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
    structure(c(9.25457408758073e-05, 9.25457408758073e-05, 9.49902564837203e-05, 
    9.49902564837203e-05, 9.25457408758073e-05, 7.61563309623742e-05, 
    7.86008465647854e-05, 7.86008465647854e-05, 7.61563309623742e-05, 
    7.61563309623742e-05), dim = c(5L, 2L))), class = c("XY", 
"POLYGON", "sfg")), structure(list(structure(c(4.23535150762523e-05, 
4.23535150762523e-05, 4.48252683284254e-05, 4.48252683284254e-05, 
4.23535150762523e-05, 9.17956102357174e-05, 9.42673634850319e-05, 
9.42673634850319e-05, 9.17956102357174e-05, 9.17956102357174e-05
), dim = c(5L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
    structure(c(0.000147277882182394, 0.000147277882182394, 0.000149370171021954, 
    0.000149370171021954, 0.000147277882182394, 1.47642767477035e-05, 
    1.68565655876928e-05, 1.68565655876928e-05, 1.47642767477035e-05, 
    1.47642767477035e-05), dim = c(5L, 2L))), class = c("XY", 
"POLYGON", "sfg"))), class = c("sfc_POLYGON", "sfc"), precision = 0, bbox = structure(c(xmin = 5.50918858216808e-06, 
ymin = 9.08826083510764e-06, xmax = 0.000149370171021954, ymax = 9.42673634850319e-05
), class = "bbox"), crs = structure(list(input = "EPSG:4326", 
    wkt = "GEOGCRS[\"WGS 84\",\n    ENSEMBLE[\"World Geodetic System 1984 ensemble\",\n        MEMBER[\"World Geodetic System 1984 (Transit)\"],\n        MEMBER[\"World Geodetic System 1984 (G730)\"],\n        MEMBER[\"World Geodetic System 1984 (G873)\"],\n        MEMBER[\"World Geodetic System 1984 (G1150)\"],\n        MEMBER[\"World Geodetic System 1984 (G1674)\"],\n        MEMBER[\"World Geodetic System 1984 (G1762)\"],\n        MEMBER[\"World Geodetic System 1984 (G2139)\"],\n        MEMBER[\"World Geodetic System 1984 (G2296)\"],\n        ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n            LENGTHUNIT[\"metre\",1]],\n        ENSEMBLEACCURACY[2.0]],\n    PRIMEM[\"Greenwich\",0,\n        ANGLEUNIT[\"degree\",0.0174532925199433]],\n    CS[ellipsoidal,2],\n        AXIS[\"geodetic latitude (Lat)\",north,\n            ORDER[1],\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        AXIS[\"geodetic longitude (Lon)\",east,\n            ORDER[2],\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n    USAGE[\n        SCOPE[\"Horizontal component of 3D system.\"],\n        AREA[\"World.\"],\n        BBOX[-90,-180,90,180]],\n    ID[\"EPSG\",4326]]"), class = "crs"), n_empty = 0L), 
    split__id = 1:10), sf_column = "geometry", agr = structure(c(split__id = NA_integer_), levels = c("constant", 
"aggregate", "identity"), class = "factor"), row.names = c(NA, 
10L), class = c("sf", "data.frame"))

Compare

leaflet() |> addPolygons(data = s)
Image

with

 leaflet() |> addGlPolygons(data = s)
Image

@tim-salabim Is leafgl still actively maintained, or do you put all time in geoarrowDeckgl? If so, totally understandable of course, and exciting. For tmap this means that we may have to set use_WebGL to FALSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions