nptscot / osmactive

Extract active travel infrastructure from OSM
https://nptscot.github.io/osmactive/
Other
9 stars 0 forks source link

Get function working #17

Closed joeytalbot closed 7 months ago

joeytalbot commented 7 months ago

There is still an error when running devtools::check(). It seems to be linked to the examples:

❯ checking examples ... ERROR
  Running examples in ‘osmactive-Ex.R’ failed
  The error most likely occurred in:

  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: osm_edinburgh
  > ### Title: Data from edinburgh's OSM network
  > ### Aliases: osm_edinburgh
  > ### Keywords: datasets
  > 
  > ### ** Examples
  > 
  > library(sf)
  Linking to GEOS 3.12.1, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
  WARNING: different compile-time and runtime versions for GEOS found:
  Linked against: 3.12.1-CAPI-1.18.1 compiled against: 3.10.2-CAPI-1.16.0
  It is probably a good idea to reinstall sf (and maybe lwgeom too)
  > names(osm_edinburgh)
   [1] "osm_id"     "name"       "highway"    "cycleway"   "bicycle"   
   [6] "lanes"      "sidewalk"   "segregated" "other_tags" "geometry"  
  > head(osm_edinburgh)
  Simple feature collection with 6 features and 9 fields
  Geometry type: MULTILINESTRING
  Dimension:     XY
  Bounding box:  xmin: -3.194737 ymin: 55.95514 xmax: -3.186586 ymax: 55.95921
  Geodetic CRS:  WGS 84
       osm_id                   name     highway cycleway bicycle lanes sidewalk
  71  3992791             York Place    tertiary     <NA>    <NA>     1     <NA>
  185 4049896           Leith Street     primary     <NA>    <NA>     2     <NA>
  197 4071161       Broughton Street   secondary     <NA>    <NA>     2     both
  198 4071162          Dublin Street residential     <NA>    <NA>  <NA>     both
  241 4084027 North St Andrew Street  pedestrian     <NA>    <NA>  <NA>     <NA>
  242 4084028   North St Andrew Lane     service     <NA>    <NA>  <NA>     <NA>
      segregated
  71        <NA>
  185       <NA>
  197       <NA>
  198       <NA>
  241       <NA>
  242       <NA>
                                                                                                other_tags
  71  "embedded_rails"=>"tram","sidewalk:left"=>"separate","sidewalk:right"=>"no","wikidata"=>"Q102108491"
  185                                               "lit"=>"yes","ref"=>"A900","sidewalk:both"=>"separate"
  197                  "incline"=>"up","lit"=>"yes","ref"=>"B901","sidewalk:both:surface"=>"paving_stones"
  198                                                                         "incline"=>"up","lit"=>"yes"
  241                                                                           "foot"=>"yes","lit"=>"yes"
  242                                                                                                 <NA>
                            geometry
  71  MULTILINESTRING ((-3.187851...
  185 MULTILINESTRING ((-3.186586...
  197 MULTILINESTRING ((-3.190781...
  198 MULTILINESTRING ((-3.194218...
  241 MULTILINESTRING ((-3.192841...
  242 MULTILINESTRING ((-3.194737...
  > plot(osm_edinburgh)
  > 
  > 
  > 
  > base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
  > base::cat("osm_edinburgh", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
  > ### * <FOOTER>
  > ###
  > cleanEx()

  detaching ‘package:sf’

  > options(digits = 7L)
  > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
  Time elapsed:  2.547 0.1 2.746 0 0 
  > grDevices::dev.off()
  null device 
            1 
  > ###
  > ### Local variables: ***
  > ### mode: outline-minor ***
  > ### outline-regexp: "\\(> \\)?### [*]+" ***
  > ### End: ***
  > quit('no')

   *** caught segfault ***
  address 0x5bb5eea2b651, cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault (core dumped)
Robinlovelace commented 7 months ago

Can you reproduce the error on your laptop Joey? Cannot reproduce it on my laptop and suspect it's caused by the computer you're running the code on. Closing for now, feel free to re-open if you can reproduce on other machines.

Reasoning: I've seen this message before on the same machine you're using, I think this is a duplicate of a previously opened (and closed) issue https://github.com/nptscot/npt/issues/77