[GRASS-user] GADM & Polygon files in general

Markus Metz markus.metz.giswork at googlemail.com
Mon Aug 9 15:10:04 EDT 2010


Thomas, Timothy (IFPRI) wrote:
>
> It leads naturally into a few questions.
>
>
> 2)  Since I have over 1,000 hours of computer time in converting using
> GRASS 6.4 on Linux with 8GB RAM, what in the world happened in GRASS 7
> that it can now do it in only 4 hours???
>
First, I imported the whole thing at once, not each country
separately. Second, some under-the-hood modifications in GRASS 7 of
the cleaning procedures result in reduced memory consumption and
faster import.

> 3)  Would someone be able to tell me whether the commands I have been
> using are the most efficient and correct, or whether that was the cause
> of the slow speed in the first place?
>
> For importing a shapefile, I used a command like:
>
>    v.in.ogr dsn=gadm1 layer=usa_gadm1 out=usa_gadm1 -o

Why the -o flag? GADM shapefiles come with a *.prj file, i.e.
projection information is available and should not be ignored.
>
> And if they do not have great boundaries, a command like
>
>    v.in.ogr dsn=gadm1 layer=usa_gadm1 out=usa_gadm1 snap=0.00002 -o
>
Looks ok, but gadm is AFAICT clean, snapping boundaries is not necessary.

> To combine 2 countries, I would use something like
>
>    v.patch -e in=usa_gadm1,can_gadm1 out=namer_gadm1
>
Watch out for category values when patching. I would prefer to import
the whole thing at once, or the county you are interested in.

> And to repair the boundaries, something like
>
>    v.clean namer_gadm1 out=namer_cln_gadm1 tool=snap,break,rmdupl
> thresh=0.00002

Looks ok, but for gadm this should not be necessary.

Markus M


More information about the grass-user mailing list