[GRASS-user] large shapefile not importing properly with v.import

Markus Metz markus.metz.giswork at gmail.com
Mon Oct 23 14:01:22 PDT 2017


On Mon, Oct 23, 2017 at 3:49 PM, Helmut Kudrnovsky <hellik at web.de> wrote:
>
> Markus Metz-3 wrote
> > On to the next one:
> >
> > On Fri, Oct 20, 2017 at 10:07 PM, Helmut Kudrnovsky <
>
> > hellik@
>
> > > wrote:
> >>
> > [...]
> >>
> >> o World database of protected areas (~ 1 GB):
> >>
> >> https://www.protectedplanet.net/
> >
> > First problems: lots of warnings like
> > WARNING: Degenerate island (1 vertices)
> > WARNING: Feature (cat
> > <XY>
> > ): degenerated polygon (1 vertices)
> >
> > These are invalid geometries in the input
> >>
> >> >The real cleaning happens only if the snap option is set to > 0.
> >
> > From the WDPA manual:
> > "There are many overlapping protected areas in the WDPA. These can be
> > overlapping areas with
> > different IUCN categories or the overlap of national protected areas
with
> > designations under
> > regional or international conventions and agreements."
> >
> > Thus I would not regard all overlapping areas as errors. I used a
spatial
> > subset for testing:
> > v.in.ogr spatial=5.467,43.842,14.3,50.558
> > that's the Alps and a bit around.
> >
> > v.in.ogr suggests a snapping value in the range 1e-5, 1e-13. I started
> > with
> > 1e-9 and got rid of the warnings like
> > WARNING: Unable to calculate area centroid
> >
> > but some incorrect boundaries remained in the output. With snap=1e-8,
> > these
> > incorrect boundaries disappeared.
> >
> > The output contains lots of small areas. According to GIS_AREA in the
> > attribute table, the smallest areas in the input are larger than 100
> > square
> > meters, so I cleaned with v.clean tool=rmarea thresh=100, getting rid of
> > 60% of all areas in the output.
> >
> > In earlier years, the WDPA was separated into different shapefiles: one
> > for
> > marine areas, one for IUCN I-VI, one for all other areas. Now everything
> > is
> > in one shapefile / GDB. When importing these data, a spatial and an
> > attribute filter should be set for v.in.ogr.
>
> thanks for also testing this data set. I'll add some notes in the wiki
about
> importing these datasets.

Maybe we should revise the messages provided by v.in.ogr and v.import.

Overlapping polygons are not a problem if polygons are indeed overlapping,
as in these and other datasets. The message in v.in.ogr needs to be
rephrased accordingly and tests for real topological errors (incorrect
boundaries, incorrect centroids) need to be added.

IMHO this is worth a new enhancement ticket, but it should also be
discussed in the user ml to get feedback about how to improve v.import and
v.in.ogr.

Another problem is that these and other vector datasets provide polygons in
one layer that should be (have previously been) provided in separate
layers, e.g. different shapefiles. Users need to read the documentation of
these datasets (not of GRASS GIS) and then decide what features should be
imported.

Markus M

>
> thanks.
>
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171023/e3d2cb7c/attachment-0001.html>


More information about the grass-user mailing list