Skip to content

st_transform in duckdb creates all-INF geometry points? #34

Description

@cboettig
library(dplyr)
library(duckdbfs)
load_spatial()

pad_tract = open_dataset("https://minio.carlboettiger.info/public-biodiversity/pad-us-4/pad-by-tract.parquet")

pad_tract |>
  select(STATE, FIPS, geom) |>
  filter(STATE == State) |> 
  distinct() |>
  mutate(geom = st_transform(geom, "EPSG:4326", "EPSG:3857")) |>
  head() |> 
  to_sf()

all geom points are INF!

But fine with sf:

  pad_tract |>
  select(STATE, FIPS, geom) |>
  filter(STATE == State) |> 
  distinct() |>
  to_sf(crs = "EPSG:4326") |>
  mutate(geom = st_transform(geom, "EPSG:4326", "EPSG:3857")) |>
  mutate(area  = st_area(geom)) |> 
  summarise(total = sum(area))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions