[GRASS-user] import more kml from directory
Hamish
hamish_b at yahoo.com
Mon Feb 21 18:25:41 EST 2011
Gabriele wrote:
> Probably my question is trivial, but I can not fix.
> 1) I want to import many files. kml (all in the same
> folder) and then I
> would like a merge(with v.patch).
> I tried to import v.in.ogr all together .... maybe I'm
> wrong.
I'll let others talk about new developments in v.in.ogr and
the GUI which may help with that.
but from the unix command line (or Msys command line in MS
Windows) you could do like:
- make sure filenames are SQL compliant (no dots except the.kml,
start with a letter, ..)
- run a little loop on the unix command line:
for file in *.kml ; do
v.in.ogr dsn="$file" output=`basename $file .kml`
done
then to patch them all together:
v.patch out=merged_kml in=`g.mlist vect sep=, pattern="*"`
(refine pattern= to just your input maps as needed, or leave
that out to list all vector maps)
> 2) Maybe I can do a merge of all files with ogr2ogr?
perhaps
?
Hamish
More information about the grass-user
mailing list