Hi,

You could use igraph package to do this
See Barry Rowlingson's method  : http://rpubs.com/geospacedman/routing

Otherwrise, with OSM data, you can use osmar package.
But I don't think you can coerce a SpatialLines object to an osmar one.
Maybe if you convert your data into OSM XML data using GDAL first ?
http://osmar.r-forge.r-project.org/

Hope this helps,

Mathieu


2013/10/24 Daisuke Murakami <muraka51@sk.tsukuba.ac.jp>

> Thank you very much!
> Daisuke
>
> > Have you looked at http://cran.r-project.org/web/views/Spatial.html,
> > specifically the `rgeos` package?
> >
> > Cheers,
> > Roman
> >
> >
> >
> >
> > On Wed, Oct 23, 2013 at 11:03 AM, Daisuke Murakami <
> > muraka51@sk.tsukuba.ac.jp> wrote:
> >
> >> Hi everyone,
> >>
> >> I try to calculate railway distances from a railway station to the other
> >> stations on R.
> >> I have shp files of the stations and railway.
> >>
> >> Does anyone know useful R package/function for the distance calculation?
> >>
> >> Sincerely,
> >> Daisuke
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> R-sig-Geo@r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
> >
> >
> > --
> > In God we trust, all others bring data.
> >
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

