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

Error: reverse geocoding functions #10

Closed
uribo opened this issue Dec 22, 2017 · 0 comments
Closed

Error: reverse geocoding functions #10

uribo opened this issue Dec 22, 2017 · 0 comments

Comments

@uribo
Copy link
Owner

uribo commented Dec 22, 2017

いくつかの条件でエラーが発生。
ポリゴンに含まれない座標の場合には0行のデータが返却されてほしい

library(jpndistrict)
find_pref(longitude = 130.4412895, latitude = 30.2984335)
# Simple feature collection with 1 feature and 2 fields
# geometry type:  MULTIPOLYGON
# dimension:      XY
# bbox:           xmin: 128.3947 ymin: 27.01758 xmax: 131.2065 ymax: 32.31167
# epsg (SRID):    4326
# proj4string:    +proj=longlat +datum=WGS84 +no_defs
# # A tibble: 1 x 3
# pref_code prefecture          geometry
# <chr>      <chr>  <simple_feature>
#   1        46   鹿児島県 <MULTIPOLYGON...>

find_pref(125.2468750000, 24.7145833333)
# Error: `.x` is empty, and no `.init` supplied

# こっちのエラーは別物  
find_city(141.3468, 35.68949)
# Error: `.x` is empty, and no `.init` supplied
# In addition: Warning message:
#   In jpmesh::coords_to_mesh(longitude, latitude, mesh_size = "80km") :
#   Longitude / Latitude values is out of range.

find_pref()以外にも ラップしてるfind_cityでもエラーはおこる

@uribo uribo closed this as completed in 7976ebe May 1, 2018
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

No branches or pull requests

1 participant