[GRASS-user] import a folder full of shapefiles and reproject
on-the-fly?
Glynn Clements
glynn at gclements.plus.com
Thu Jul 24 10:32:28 EDT 2008
Moritz Lennert wrote:
> >>> Note this loads the Shapefiles as *layers* (in the GRASS meaning of it)
> >>> of a single output vector map. Not necessarily what one might want.
> >> No definitely not. Didn't know that. IMHO this should be changed...
> >
> > If you want to load multiple files as individual maps, run v.in.ogr in
> > a loop.
> >
> > I don't see any reason to add this functionality to every *.in.*
> > module, and even less reason to add it to some modules but not others.
> >
> > In general, each *.in.* module generates a single map. The only
> > exception which I can think of is for multi-channel (e.g. RGB) raster
> > files, where each channel is imported as a separate raster map (GRASS
> > itself doesn't support multiple channels in a raster map).
>
> I won't make an issue of this, but there is a difference in that
> v.in.ogr takes a data source (directory or file) as input, and this data
> source can contain many layers. AFAIK, it's the only *.in.* module to do
> this.
And it's only some formats. The OGR shapefile driver accepts a
directory as a data source, but most drivers don't. So far as OGR is
concerned, a directory of .shp/.dbf files is a single multi-layer map,
so that's how it gets imported.
> But I don't care enough to worry about it... loops work fine for me.
> Just don't really understand the advantage of loading all layers into
> different layers of a GRASS map...
Well, I'm not really sure of the reason for having multi-layer maps
(other than "that's how ArcGIS does it"). But given that we have them,
presumably this is how they are supposed to be used.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list