Opened 11 years ago

Closed 3 years ago

#307 closed enhancement (fixed)

v.in.dxf: output name should be required

Reported by: msieczka Owned by: grass-dev@…
Priority: trivial Milestone: 7.0.5
Component: Vector Version: svn-trunk
Keywords: import Cc: martinl
CPU: All Platform: All

Description

All import modules require an output map name. Why is v.in.dxf and exception and has it optional?

Change History (7)

comment:1 Changed 11 years ago by martinl

Cc: martinl added

Name of output vector map can be determined from input file name, e.g. file.dxf become 'file' vector map if output parameter is not given.

It was changed in GRASS7 where output is required. I would suggest leave v.in.dxf in GRASS6 as it is.

comment:2 in reply to:  1 Changed 11 years ago by glynn

Replying to martinl:

Name of output vector map can be determined from input file name, e.g. file.dxf become 'file' vector map if output parameter is not given.

It was changed in GRASS7 where output is required. I would suggest leave v.in.dxf in GRASS6 as it is.

Agree re: GRASS6, just for compatibility's sake.

For 7.x, I have removed this kind of "magic" behaviour whenever I have encountered it. Apart from anything else, it means that the overwrite check has to be performed manually, rather than letting G_parser() do it.

It's worse for modules which create new maps (import and analysis). E.g. it might be desired to add an option to the GUI to automatically add newly-created maps to the map display. Obviously that can only work if the GUI knows that a map has been created, and what it's called.

comment:3 Changed 11 years ago by hamish

Keywords: import added
Type: defectenhancement

v.in.ogr can do the same -- it will automatically set the output name from the layer name if it is not given. IMO it is a really nice time (and typo) saving feature and I'd be sad to see it go.

Hamish

comment:4 Changed 11 years ago by hamish

Priority: majortrivial

comment:5 in reply to:  3 Changed 10 years ago by martinl

Milestone: 6.4.07.0.0
Version: svn-develbranch6svn-trunk

Replying to hamish:

v.in.ogr can do the same -- it will automatically set the output name from the layer name if it is not given. IMO it is a really nice time (and typo) saving feature and I'd be sad to see it go.

Do you think to make 'output' optional in v.in.dxf again?

comment:6 Changed 3 years ago by martinl

Milestone: 7.0.07.0.5

comment:7 Changed 3 years ago by martinl

Resolution: fixed
Status: newclosed

output name is already required in G70

Note: See TracTickets for help on using tickets.