[GRASS5] Re: [bug #2034] (grass) v.in.shape: ERROR: Polygon controller contained error.

Radim Blazek blazek at itc.it
Fri Jul 25 05:42:40 EDT 2003


On Friday 25 July 2003 09:22, Moritz Lennert wrote:
> Harmisch Bowman via RT said:
> >> just being curious: does "v.in.ogr" in GRASS 5.1 accept the file?
> >>
> >> Markus
> >
> > Yes, it does.
>
> In my case, v.in.ogr accepts the file, but the result is not very good,
> with many areas being attributed the wrong attribute and some receiveing
> no attribute at all. The file is pretty complicated since there are a lot
> of tiny islands in large areas and the centroids of these islands are
> sometimes attributed to the large area.

After v.clean, I expect? Are you sure that the input shapefile is correct?
Especially if areas containing islands realy have holes inside?
To check this, use v.format and then d.vect cats= to display one area only, 
you should see also islands of that area. You can also check this in ArcExplorer.
If you don't see any islands, area is one polygon without holes 
and islands you see if you display everything, are just other areas above,
that would mean incorrect shapefile which is impossible to import correctly to GRASS 
(areas may not overlap).

Problem may be also in GRASS, either v.clean fails (I know that it is possible)
but then centroids should be correctly placed, and only attachement to areas 
is wrong (try to query centroids instead of areas),
or Vect_get_point_in_poly_isl() in v.in.ogr fails, but Vect_get_point_in_poly_isl() is 
inherited from 5.0 and I have had never problems with centroid placement.

Could I get the shapefile or at least one or few areas causing those errors?

Radim




More information about the grass-dev mailing list