Opened 14 years ago

Closed 6 years ago

#1021 closed enhancement (wontfix) multiple files are merged when using only dsn= without layer=

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-releasebranch64
Keywords: ogr Cc: pcav
CPU: All Platform: All


When pointing to a directory which contains several SHAPE files (or presumably other OGR supported files) by defining dsn= without using layer=, it imports all files into the output map which is typically undesired.

Suggestion: add a check if the DSN is file based and if layer= was omitted, in that case refuse to importand complain about the missing layer= parameter.

Change History (7)

comment:1 by mmetz, 14 years ago


But if dsn points to a shapefile directly and layer is omitted, only this one shapefile is imported. And a directory may hold only one shapefile, so only one layer would be imported anyways.

Alternative: have a new -a flag to import all layers in given dsn. Without -a flag, if only one layer is found, import it, if more layers are found, list them (same like -l flag) and exit with a helpful message like "Please select layer to be imported or import all with -a". I would like to preserve the possibility to import all layers in a given (file-based) dsn, e.g. a *.gpx or *.kml file, but since the most common usage seems to be importing one OGR layer only, importing several OGR layers into one GRASS vector map could be triggered by this new flag. Disadvantage is that this adds yet another option to

comment:2 by martinl, 8 years ago


comment:3 by martinl, 8 years ago

Type: defectenhancement

comment:4 by martinl, 8 years ago


Milestone renamed

comment:5 by martinl, 6 years ago

What is status of this issue?

in reply to:  5 comment:6 by mmetz, 6 years ago

Replying to martinl:

What is status of this issue?

From the manual:

    OGR layer name. If not given, all available layers are imported

That should be clear enough. Resolve as "read the manual"?

comment:7 by neteler, 6 years ago

Resolution: wontfix
Status: newclosed

It was opened 8 years ago (G6.4), so probably the manual got better since then :-) Closing.

Note: See TracTickets for help on using tickets.