[GRASS-user] converting lines to polygons
Micha Silver
micha at arava.co.il
Tue Sep 28 03:34:11 EDT 2010
On 27/09/2010 20:29, Markus Metz wrote:
> Micha Silver wrote:
>
>> Cheers.
>> Although I think I misled you a bit. I was mistaken about the orange line
>> color in the digitizer. It simply indicates a boundary that is wholly shared
>> by two adjacent areas. *Not* a topological error.
>> In any case, importing polygon shapefiles first as lines (not boundaries),
>> doing the topology cleanup, and then convert to boundaries and add centroids
>> seems to be the smoother way to go.
>>
> I object because
>
> 1. you would need to replicate the cleaning steps done by v.in.ogr
> which has, amongst others, a snapping option
>
>
I never noticed that option.
> 2. adding centroids will add centroids to all areas, also those that
> where holes in polygons provided by OGR, e.g. a waterbodies shapefile
> with lakes and islands in lakes: the islands are not waterbodies and
> should not get a centroid
>
>
I think Bryan's original problem was areas being imported without
centroids. But in the general case, I see that importing lines, then
converting to boundaries and adding centroids would be wrong.
> 3. you will loose attributes because there is no (easy) way to link
> any attributes coming with the shapefile to newly generated centroids,
> e.g. land cover/land use shapefiles
>
Yes, this was clear.
> Markus M
>
>
Still, importing unclean shapefile polygons, and correcting the topology
is often accompanied by much hair pulling...
Thanks for the clarifications!
--
Micha
More information about the grass-user
mailing list