walkerke / crsuggest

Get appropriate CRS suggestions for your spatial data in R
Other
128 stars 7 forks source link

Long processing time #8

Closed PMassicotte closed 2 years ago

PMassicotte commented 2 years ago

I am trying to use the suggest_crs() function on a geojson file. However, I had to stop the execution after ~1h because it was still not finished. This is not too big (I think), so I am not sure what causes this long processing time.

library(sf)
library(crsuggest)

url <- "https://github.com/Robinlovelace/Creating-maps-in-R/raw/master/data/test-multifeature.geojson"
sf <- st_read(url)

# This never finish  
suggest_crs(sf)

Thank you for the great package by the way.

PMassicotte commented 2 years ago

Found it was going into an infinite loop here:

https://github.com/walkerke/crsuggest/blob/8656543046459b15ddebb77ebef03ce5f04f869a/R/suggest_crs.R#L144-L149