这是indexloc提供的服务,不要输入任何密码
Skip to content

qtm() fails in interactive mode with data from zonebuilder #577

@Robinlovelace

Description

@Robinlovelace

See reproducible example below. Can anyone else reproduce this error message? Seems that the geometries are valid, at least according to sf::st_is_valid():

# Error in build process:
# https://github.com/zonebuilders/zonebuilder/runs/3009599916#step:9:233

remotes::install_github("mtennekes/tmap")

library(zonebuilder)
library(tmap)
library(sf)
z = zb_zone(london_c(), london_a())
summary(sf::st_is_valid(z))
plot(z)
mapview::mapview(z) # works
qtm(z) # works
tmap_mode("view")
qtm(z)

It says:

# Error: Shape contains invalid polygons. Please fix it or set tmap_options(check.and.fix = TRUE) and rerun the plot

Will retry after following the instructions...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions