Opened 15 years ago

Closed 14 years ago

#799 closed enhancement (fixed)

Add -o option to muliple import of GDAL data

Reported by: trochtaj Owned by: martinl
Priority: normal Milestone: 6.5.0
Component: wxGUI Version: unspecified
Keywords: import, multi Cc: grass-dev@…
CPU: Unspecified Platform: All

Description

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

Change History (13)

comment:1 by martinl, 15 years ago

Keywords: import multi added
Owner: changed from grass-dev@… to martinl
Status: newassigned

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.

comment:2 by martinl, 15 years ago

Cc: grass-dev@… added

comment:3 by hamish, 15 years ago

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

in reply to:  1 ; comment:4 by mmetz, 15 years ago

Replying to 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

in reply to:  4 ; comment:5 by martinl, 15 years ago

Replying to mmetz:

Replying to 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

in reply to:  4 comment:6 by martinl, 15 years ago

Replying to mmetz:

Replying to 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

in reply to:  5 ; comment:7 by mmetz, 15 years ago

Replying to martinl:

Replying to mmetz:

Replying to 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

in reply to:  7 ; comment:8 by martinl, 15 years ago

Replying to 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

in reply to:  8 ; comment:9 by mmetz, 15 years ago

Platform: UnspecifiedAll
Resolution: worksforme
Status: assignedclosed

Replying to martinl:

Replying to 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

comment:10 by martinl, 15 years ago

Milestone: 6.4.06.5.0
Resolution: worksforme
Status: closedreopened

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

in reply to:  9 comment:11 by martinl, 15 years ago

Replying to 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

comment:12 by martinl, 14 years ago

Any open issue here?

in reply to:  12 comment:13 by martinl, 14 years ago

Resolution: fixed
Status: reopenedclosed

Replying to martinl:

Any open issue here?

Closing, please reopen the ticket if needed.

Note: See TracTickets for help on using tickets.