Hi,


Thanks for your answers!

@paul: Overlay will not work as my polygons do not overlay any points.

@José: I know v.distance command, but I was interested in doing the same in
R.


So, if you have any idea on how to accomplish that in R!..

Mathieu

2011/6/16 José Miguel Barrios <jmbarriosg@gmail.com>

> Hi,
>
> What about using spgrass6 to interface with GRASS and use v.distance in
> GRASS.?
>
> http://grass.fbk.eu/grass62/manuals/html62_user/v.distance.html
>
>
> Regards,
>
> J.Miguel
>
> 2011/6/16 Mathieu Rajerison <mathieu.rajerison@gmail.com>
>
>> HI,
>>
>>
>> I've got a SpatialPointsDataFrame with labels of polygons but the polygon
>> objects do not contain these labels.
>>
>> I want to find a way to assign the labels to their nearest polygons.
>>
>> I tried spatstat:nncros but my SpatialPolygonsDataFrame, when coerced to a
>> psp object, is split up in many many lines. I couldn't find a way, with
>> spatstat to accomplish this operation. But there may be one (?)
>>
>> I found out the geosphere package with function dist2Line. It seems nice
>> because it works with both SpatialPointsData and SpatialPolygons.
>>
>> But when launching the command, I get:
>>
>> Erreur dans geosphere:::.pointsToMatrix(p) :
>>  Points are projected. They should be in degrees (longitude/latitude)
>>
>> So my questions are:
>> -is there a way to make this assignment easily with spatstat::nncross
>> -is geosphere::dist2Line preferrable and if so, how can I convert my
>> projected coordinates into lon/lat: any package existent? or necessary
>> to type in the formula
>> <
>> http://www.ehow.co.uk/how_8449009_convert-xy-coordinates-longitude-latitude.html
>> >?
>>
>>
>> Thanks in advance, any help would be appreciated
>>
>> Mathieu
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

	[[alternative HTML version deleted]]

