[GRASS-dev] [GRASS GIS] #799: Add -o option to muliple import of GDAL data

#799: Add -o option to muliple import of GDAL data
-------------------------+--------------------------------------------------
Reporter: trochtaj | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Hi, I have wish to put an -o flag to multiple import of vector data dialog
window. Hope this is not a hard task for you.
Jan Trochta

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/799&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

* cc: grass-dev@lists.osgeo.org (added)

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/799#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by hamish):

Hi,

(meta-comment)

for new flags, please* avoid -o, -q, and -v as there will be namespace
confusion with the expanded versions of --o, etc. In a similar vein, try
to avoid -l and -1 if you can as with some fonts they look the same.

[*] unless the fit is just so good that anything else would be silly...

please, no changes in behaviour to 6.4.x at this point unless it is a
critical bug fix or harmless documentation change.
and please, only backport to 6.5svn new features that are just so cool
that you can't bear to live without them.
discipline in this regard is the only way we will be able to break the
current release logjam.

thanks much,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mmetz):

Replying to [comment:1 martinl]:
> Please try r39669 (devbr6). Not sure if to backported it into relbr64
(it's not bugfix). Probably in GRASS 6.4 we can just set {{{-o}}} as
default also for {{{v.in.ogr}}}.

Just for clarification, the -o flag means "Override dataset projection
(use location's projection)", same like in r.in.gdal. Thus your suggestion
to set -o as default means override dataset projection by default?

The new wxGUI dialog is not consistent with regard to OGR layers and OGR
datasources, for e.g. *.gpx and *.kml files, datasources are listed as
layers, although these datasources hold layers themselves. With so many
different supported OGR formats, I would strongly opt to at least stick to
the terminology used by OGR in regard to what is a datasource and what is
a layer to avoid user confusion.

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:4 mmetz]:
> Replying to [comment:1 martinl]:
> > Please try r39669 (devbr6). Not sure if to backported it into relbr64
(it's not bugfix). Probably in GRASS 6.4 we can just set {{{-o}}} as
default also for {{{v.in.ogr}}}.
>
> Just for clarification, the -o flag means "Override dataset projection
(use location's projection)", same like in r.in.gdal. Thus your suggestion
to set -o as default means override dataset projection by default?

No, I am not speaking about CLI, but just about wxGUI dialog for multi-
import (gdialogs.py).
Anyway I would to suggest to add '-o' to v.external (to be consistent with
r.external).

> The new wxGUI dialog is not consistent with regard to OGR layers and OGR
datasources, for e.g. *.gpx and *.kml files, datasources are listed as
layers, although these datasources hold layers themselves. With so many
different supported OGR formats, I would strongly opt to at least stick to
the terminology used by OGR in regard to what is a datasource and what is
a layer to avoid user confusion.

Right, I am just not getting point in which ways is wxGUI dialog wrong.

Martin

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:4 mmetz]:
> Replying to [comment:1 martinl]:
> > Please try r39669 (devbr6). Not sure if to backported it into relbr64
(it's not bugfix). Probably in GRASS 6.4 we can just set {{{-o}}} as
default also for {{{v.in.ogr}}}.
>
> Just for clarification, the -o flag means "Override dataset projection
(use location's projection)", same like in r.in.gdal. Thus your suggestion
to set -o as default means override dataset projection by default?

to clarify - r39671.

Martin

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mmetz):

Replying to [comment:5 martinl]:
> Replying to [comment:4 mmetz]:
> > Replying to [comment:1 martinl]:
> > > Please try r39669 (devbr6). Not sure if to backported it into
relbr64 (it's not bugfix). Probably in GRASS 6.4 we can just set {{{-o}}}
as default also for {{{v.in.ogr}}}.
> >
> > Just for clarification, the -o flag means "Override dataset projection
(use location's projection)", same like in r.in.gdal. Thus your suggestion
to set -o as default means override dataset projection by default?
>
> No, I am not speaking about CLI, but just about wxGUI dialog for multi-
import (gdialogs.py).
> Anyway I would to suggest to add '-o' to v.external (to be consistent
with r.external).

Hmm, I think this is somewhat a matter of taste, but IMHO overriding the
dataset projection by default may be a bit dangerous. Having that option
for v.external would be a good idea.
>
> > The new wxGUI dialog is not consistent with regard to OGR layers and
OGR datasources, for e.g. *.gpx and *.kml files, datasources are listed as
layers, although these datasources hold layers themselves. With so many
different supported OGR formats, I would strongly opt to at least stick to
the terminology used by OGR in regard to what is a datasource and what is
a layer to avoid user confusion.
>
> Right, I am just not getting point in which ways is wxGUI dialog wrong.

File -> Import vector map -> Multiple vector data import using OGR

There it reads "List of OGR layers", below that "Layer" and "Layer name".
What is listed there can just as well be OGR datasources not layers, and
within these OGR datasources are layers not listed in the wxGUI dialog. It
seems that this dialog is written for shapefiles, not sure how to use that
with e.g. kml, gpx, postgresql if the idea is to have a separate output
vector map for each layer.

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:7 mmetz]:
> > > Just for clarification, the -o flag means "Override dataset
projection (use location's projection)", same like in r.in.gdal. Thus your
suggestion to set -o as default means override dataset projection by
default?
> >
> > No, I am not speaking about CLI, but just about wxGUI dialog for
multi-import (gdialogs.py).
> > Anyway I would to suggest to add '-o' to v.external (to be consistent
with r.external).

I would keep this behaviour for GRASS 6.4. In GRASS >= 6.5 there are
options and user can decide if to override check or not.

> Hmm, I think this is somewhat a matter of taste, but IMHO overriding the
dataset projection by default may be a bit dangerous. Having that option
for v.external would be a good idea.
> >
> > > The new wxGUI dialog is not consistent with regard to OGR layers and
OGR datasources, for e.g. *.gpx and *.kml files, datasources are listed as
layers, although these datasources hold layers themselves. With so many
different supported OGR formats, I would strongly opt to at least stick to
the terminology used by OGR in regard to what is a datasource and what is
a layer to avoid user confusion.
> >
> > Right, I am just not getting point in which ways is wxGUI dialog
wrong.
>
> File -> Import vector map -> Multiple vector data import using OGR
>
> There it reads "List of OGR layers", below that "Layer" and "Layer
name". What is listed there can just as well be OGR datasources not
layers, and within these OGR datasources are layers not listed in the
wxGUI dialog. It seems that this dialog is written for shapefiles, not
sure how to use that with e.g. kml, gpx, postgresql if the idea is to have
a separate output vector map for each layer.

Right, dialog was written for shp/tiff/dxf. Should be improved at least in
GRASS 7. I would suggest to close this ticket as worksforme for 6.4.0.
Martin

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: worksforme | Keywords: import, multi
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by mmetz):

  * status: assigned => closed
  * platform: Unspecified => All
  * resolution: => worksforme

Comment:

Replying to [comment:8 martinl]:
> Replying to [comment:7 mmetz]:
> >
> > File -> Import vector map -> Multiple vector data import using OGR
> >
> > There it reads "List of OGR layers", below that "Layer" and "Layer
name". What is listed there can just as well be OGR datasources not
layers, and within these OGR datasources are layers not listed in the
wxGUI dialog. It seems that this dialog is written for shapefiles, not
sure how to use that with e.g. kml, gpx, postgresql if the idea is to have
a separate output vector map for each layer.
>
> Right, dialog was written for shp/tiff/dxf.

Shouldn't the multi-import dialog be written for GDAL/OGR format instead
of file name extensions? Multiple raster import using GDAL imports several
raster bands from several datasources at once, while multiple vector
import using OGR imports multiple vector layers from only one datasource
in case of e.g. shapefiles and multiple vector layer from multiple
datasources in other cases e.g. gpx or kml. Although the two dialogs look
identical, they behave different, and for multiple vector import,
behaviour depends on the selected OGR format. BTW, multiple raster import
also uses the term layer whereas it's datasources that are listed, the
layers (raster bands) are not listed.

> Should be improved at least in GRASS 7. I would suggest to close this
ticket as worksforme for 6.4.0.

I agree, no changes in relbr6, anyway multiple import of vector data has
already been possible with both v.in.ogr and the multiple vector data
import dialog. I'm just not happy with the restriction to certain GDAL/OGR
formats and undocumented behaviour of the two multi-import modules.

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: closed => reopened
  * resolution: worksforme =>
  * milestone: 6.4.0 => 6.5.0

Comment:

I took a liberty to re-open the ticket and to set milestone to 6.5. Your
notes are correct. Martin

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/799#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:9 mmetz]:
> > Right, dialog was written for shp/tiff/dxf.
>
> Shouldn't the multi-import dialog be written for GDAL/OGR format instead
of file name extensions? Multiple raster import using GDAL imports several
raster bands from several datasources at once, while multiple vector
import using OGR imports multiple vector layers from only one datasource
in case of e.g. shapefiles and multiple vector layer from multiple
datasources in other cases e.g. gpx or kml. Although the two dialogs look
identical, they behave different, and for multiple vector import,
behaviour depends on the selected OGR format. BTW, multiple raster import
also uses the term layer whereas it's datasources that are listed, the
layers (raster bands) are not listed.

Please, check out improved import dialog, see
http://grass.osgeo.org/wiki/WxGUI#Import_vector_data

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/799#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords: import, multi
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by martinl):

Any open issue here?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/799#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#799: Add -o option to muliple import of GDAL data
--------------------------+-------------------------------------------------
  Reporter: trochtaj | Owner: martinl
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords: import, multi
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: reopened => closed
  * resolution: => fixed

Comment:

Replying to [comment:12 martinl]:
> Any open issue here?

Closing, please reopen the ticket if needed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/799#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>