[R-sig-Geo] Combining SpatialLines into SpatialPolygons
Roger Bivand
Roger@Biv@nd @ending from nhh@no
Mon Jul 30 15:37:33 CEST 2018
Please use plain text only, and provide a small reproducible example,
possibly demonstrating in code and data what you claim about "finding
solutions". I assume that you have already tried rgeos::gPolygonize().
Consider using its example to generate your reproducible example. You may
find that scaling also matters.
Roger
On Mon, 30 Jul 2018, Антон Морковин wrote:
>
> Dear all,
>
> I have a kml file with a huge set of lines, which actually depict a grid of
> many rectangles. I want to unite these lines into polygons (i.e., each
> rectangle must be a separate spatial polygon), but I failed to find a
> function which does it directly.
>
> I found several solutions on how to convert to polygons a set of isolated
> closed lines. But with my file, these methods can produce nothing more than
> a set of "polygons" with only one line each. The only way I can imagine is
> to convert these lines into a raster and then polygonize it, but this method
> probably would lack accuracy.
> If anyone knows how to deal with such tasks, please help me. Thank you in
> advance!
>
>
> Best regards,
> Anton A. Morkovin
>
> Zoological Museum of M.V. Lomonosov Moscow State University
> Russia, 125009 Moscow, Bolshaya Nikitskaya Str. 2.
> * Personal page: http://istina.msu.ru/profile/Anton_Morkovin/
> * Bibliography of scientific works on birds of Russia
> * The Birdwatchers union "Birds of Moscow and the Moscow
> region" || Facebook || VK || Twitter
>
>
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the R-sig-Geo
mailing list