Hi,

You could use spatstat::nndist/nnwhich to find the nearest points.

Best,

Mathieu

2012/1/27 Antoine Lucas <antoinelucas@gmail.com>

> Dear All,
>
> I have build a small package, that main object is to compute:
>
> 1. city names that are close to another city
> 2. city names that are close to a zipcode
>
> I have two questions:
>
> -------------
> a. for now, dataset is french data (zipcode + city + lat,lon): I would
> like someting like:
>
> library("mynewpackage")
>
> setDefaultCountry("fr")
> getCityNearToZipCode(1234)  => french city list
>
> setDefaultCountry("uk")
> getCityNearToZipCode(1234)  => uk city list
>
> for now, there is only one dataset that I use directly in my R functions...
>
> -------------
> b. Is this package needed, or is it redunctdant with an existing package ?
>
> Antoine.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

