Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The large dataset will return as sf #7

Merged
merged 2 commits into from
Dec 27, 2018
Merged

The large dataset will return as sf #7

merged 2 commits into from
Dec 27, 2018

Conversation

uribo
Copy link
Owner

@uribo uribo commented Dec 27, 2018

Summary

ファイルサイズが大きい場合でもsfとして返却(listではなく)するように。

read_fgd("FG-GML-563804-BldA-20180101-0001.xml")
#> Simple feature collection with 50796 features and 2 fields
#> geometry type:  POLYGON
#> dimension:      XY
#> bbox:           xmin: 138.5 ymin: 37.33333 xmax: 138.625 ymax: 37.41667
#> epsg (SRID):    4326
#> proj4string:    +proj=longlat +datum=WGS84 +no_defs
#> First 10 features:
#>                 gml_id   bld_type                       geometry
#> 1   K17_4986013440_1-2   普通建物 POLYGON ((138.6072 37.41399...
#> 2   K17_4986013440_2-2   普通建物 POLYGON ((138.5697 37.37463...
#> 3   K17_4986013440_3-2   普通建物 POLYGON ((138.5367 37.35836...
#> 4   K17_4986013440_4-2 堅ろう建物 POLYGON ((138.5798 37.33831...
#> 5   K17_4986013440_5-2   普通建物 POLYGON ((138.6058 37.39034...

また、読み込み時に時間がかかる問題を下記のように改善。

bench::mark(
+   read_fgd("FG-GML-563804-BldA-20180101-0001.xml"),
      max_iterations = 3
+ )
#> # A tibble: 1 x 14
#>   expression      min   mean  median    max `itr/sec` mem_alloc  n_gc n_itr total_time result   memory    time  gc     
#>   <chr>        <bch:> <bch:> <bch:t> <bch:>     <dbl> <bch:byt> <dbl> <int>   <bch:tm> <list>   <list>    <lis> <list> 
#> 1 read_fgd(fi…  1.41m  1.41m   1.41m  1.41m    0.0118    1.13GB    86     1      1.41m <sf [50… <Rprofme… <bch… <tibbl…
#> Warning message:
#> Some expressions had a GC in every iteration; so filtering is disabled. 

さらに改善 68de03d

bench::mark(
  read_fgd("FG-GML-563804-BldA-20180101-0001.xml"))
#>  # A tibble: 1 x 14
#>  expression      min   mean  median    max `itr/sec` mem_alloc  n_gc n_itr total_time result   memory    time  gc     
#>  <chr>        <bch:> <bch:> <bch:t> <bch:>     <dbl> <bch:byt> <dbl> <int>   <bch:tm> <list>   <list>    <lis> <list> 
#>    1 read_fgd(fi…  27.2s  27.2s   27.2s  27.2s    0.0368    1.14GB    34     1      27.2s <sf [50… <Rprofme… <bch… <tibbl…
#> Warning message:
#> Some expressions had a GC in every iteration; so filtering is disabled. 

Related Issues

Close #6

@uribo uribo merged commit 438b08b into master Dec 27, 2018
@uribo uribo deleted the issue/6 branch December 27, 2018 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant