Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Virtual Vector tool: file created fails to load correctly #22356

Closed
qgib opened this issue Feb 25, 2016 · 3 comments
Closed

Build Virtual Vector tool: file created fails to load correctly #22356

qgib opened this issue Feb 25, 2016 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Feb 25, 2016

Author Name: Armando Forlani (Armando Forlani)
Original Redmine Issue: 14374
Affected QGIS version: 2.12.0
Redmine category:processing/qgis


This is either Build Virtual Vector tool not creating the correct xml or QGIS not interpreting it (the correct xml?) correctly.

I have tested this real world scenario: shape files of identical names.

'\\..\data\folderA\osm_roads.shp' contains a small bbox selection of central London OSM roads
'\\..\data\folderB\osm_roads.shp' contains a small bbox selection of central London OSM roads

The two shape files do not contains the same osm extent, they are adjacent (almost). They are of the same file name but two distinct tiles (different bbox extents).

├ data
│ ├ folderA
│ │ └ osm_roads.shp
│ ├ folderB
│ │ └ osm_roads.shp

Build virtual vector should create a combination (union?) of the two tiles.

Zip file attached containing files, folder structure and results.

sequence:

  1. Launch 'Build virtual vector'
  2. 'Run as Batch process...'
  3. Remove parameters row. Only one is needed here
  4. Select 'Input datasources' --> 'Select from filesystem'
  5. Use the search functionality offered by your OS to select the (only two) osm_roads.shp files from the parent folder (\\..\data\)
  6. Name the virtual vector (\\..\data
    oads)
  7. Do the same with a different virtual vector file name (\\..\data
    oads_)
  8. Run
  9. Open virtual vector
  10. 'Select all' from the 'Select vector layers to add...' form and click ok

Notes:
Step 2 should not be necessary in this context. 'Input datasources' box does not allow for file system selection. 'Run as batch process...' does.
Step 5 this is necessary in a real world scenario: hundred of folders exist.
Step 7 it is necessary as this is a "batch processing" (although in this case it's only a work around, not batch processing as such)
Step 10 As expected the Layer name(s) are the same: osm_road but clearly two different vector layers, the Number of features indicates so (different feature counts)

Issues:
(0. File extension is missing on the Virtual vector file '\\..\data
oads and \\..\data
oads2' it opens anyway, not really an issue, only for correctness)

  1. Instead of the two adjacent tiles the same one tile (\\..\data\folderA\osm_roads.shp) is displayed twice.

This is odd. The actual resulting virtual vector file '\\..\data
oads' seems to contain the correct xml declarations:

\\..\data\folderA\osm_roads.shp
\\..\data\folderB\osm_roads.shp

The xml seems correct but somewhat QGIS interprets it wrongly.

Tested with QGIS 2.12.0 on win 7 and Ubuntu 14.04

Notes:
In a hipothetical scenario such as this (which I also tested):

├ data
│ ├ folderA
│ │ └ osm_roads1.shp
│ ├ folderB
│ │ └ osm_roads2.shp

Not only the folders are of different names (as in my real world example above) but also the shape files are of different names.

Build virtual vector --> roads12

The resulting virtual vector:
\\..\data\folderA\osm_roads1.shp
\\..\data\folderB\osm_roads2.shp

..it is interpreted correctly by QGIS and the two files display correctly i.e. two adjacent tiles.


@qgib
Copy link
Contributor Author

qgib commented Apr 27, 2017

Author Name: Alexander Bruy (@alexbruy)


  • category_id was configured as Processing/QGIS

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Jan 24, 2019

Author Name: Alexander Bruy (@alexbruy)


Works fine in master. Please reopen if necessary.


  • resolution was changed from to worksforme
  • status_id was changed from Open to Closed
  • description was changed from This is either Build Virtual Vector tool not creating the correct xml or QGIS not interpreting it (the correct xml?) correctly.

I have tested this real world scenario: shape files of identical names.

'\\..\data\folderA\osm_roads.shp' contains a small bbox selection of central London OSM roads
'\\..\data\folderB\osm_roads.shp' contains a small bbox selection of central London OSM roads

The two shape files do not contains the same osm extent, they are adjacent (almost). They are of the same file name but two distinct tiles (different bbox extents).

├ data
│ ├ folderA
│ │ └ osm_roads.shp
│ ├ folderB
│ │ └ osm_roads.shp

Build virtual vector should create a combination (union?) of the two tiles.

Zip file attached containing files, folder structure and results.

sequence:

  1. Launch 'Build virtual vector'
  2. 'Run as Batch process...'
  3. Remove parameters row. Only one is needed here
  4. Select 'Input datasources' --> 'Select from filesystem'
  5. Use the search functionality offered by your OS to select the (only two) osm_roads.shp files from the parent folder (\\..\data\)
  6. Name the virtual vector (\\..\data
    oads)
  7. Do the same with a different virtual vector file name (\\..\data
    oads_)
  8. Run
  9. Open virtual vector
  10. 'Select all' from the 'Select vector layers to add...' form and click ok

Notes:
Step 2 should not be necessary in this context. 'Input datasources' box does not allow for file system selection. 'Run as batch process...' does.
Step 5 this is necessary in a real world scenario: hundred of folders exist.
Step 7 it is necessary as this is a "batch processing" (although in this case it's only a work around, not batch processing as such)
Step 10 As expected the Layer name(s) are the same: osm_road but clearly two different vector layers, the Number of features indicates so (different feature counts)

Issues:
(0. File extension is missing on the Virtual vector file '\\..\data
oads and \\..\data
oads2' it opens anyway, not really an issue, only for correctness)

  1. Instead of the two adjacent tiles the same one tile (\\..\data\folderA\osm_roads.shp) is displayed twice.

This is odd. The actual resulting virtual vector file '\\..\data
oads' seems to contain the correct xml declarations:

\\..\data\folderA\osm_roads.shp
\\..\data\folderB\osm_roads.shp

The xml seems correct but somewhat QGIS interprets it wrongly.

Tested with QGIS 2.12.0 on win 7 and Ubuntu 14.04

Notes:
In a hipothetical scenario such as this (which I also tested):

├ data
│ ├ folderA
│ │ └ osm_roads1.shp
│ ├ folderB
│ │ └ osm_roads2.shp

Not only the folders are of different names (as in my real world example above) but also the shape files are of different names.

Build virtual vector --> roads12

The resulting virtual vector:
\\..\data\folderA\osm_roads1.shp
\\..\data\folderB\osm_roads2.shp

..it is interpreted correctly by QGIS and the two files display correctly i.e. two adjacent tiles. to This is either Build Virtual Vector tool not creating the correct xml or QGIS not interpreting it (the correct xml?) correctly.

I have tested this real world scenario: shape files of identical names.

'\\..\data\folderA\osm_roads.shp' contains a small bbox selection of central London OSM roads
'\\..\data\folderB\osm_roads.shp' contains a small bbox selection of central London OSM roads

The two shape files do not contains the same osm extent, they are adjacent (almost). They are of the same file name but two distinct tiles (different bbox extents).

├ data
│ ├ folderA
│ │ └ osm_roads.shp
│ ├ folderB
│ │ └ osm_roads.shp

Build virtual vector should create a combination (union?) of the two tiles.

Zip file attached containing files, folder structure and results.

sequence:

  1. Launch 'Build virtual vector'
  2. 'Run as Batch process...'
  3. Remove parameters row. Only one is needed here
  4. Select 'Input datasources' --> 'Select from filesystem'
  5. Use the search functionality offered by your OS to select the (only two) osm_roads.shp files from the parent folder (\\..\data\)
  6. Name the virtual vector (\\..\data
    oads)
  7. Do the same with a different virtual vector file name (\\..\data
    oads_)
  8. Run
  9. Open virtual vector
  10. 'Select all' from the 'Select vector layers to add...' form and click ok

Notes:
Step 2 should not be necessary in this context. 'Input datasources' box does not allow for file system selection. 'Run as batch process...' does.
Step 5 this is necessary in a real world scenario: hundred of folders exist.
Step 7 it is necessary as this is a "batch processing" (although in this case it's only a work around, not batch processing as such)
Step 10 As expected the Layer name(s) are the same: osm_road but clearly two different vector layers, the Number of features indicates so (different feature counts)

Issues:
(0. File extension is missing on the Virtual vector file '\\..\data
oads and \\..\data
oads2' it opens anyway, not really an issue, only for correctness)

  1. Instead of the two adjacent tiles the same one tile (\\..\data\folderA\osm_roads.shp) is displayed twice.

This is odd. The actual resulting virtual vector file '\\..\data
oads' seems to contain the correct xml declarations:

\\..\data\folderA\osm_roads.shp
\\..\data\folderB\osm_roads.shp

The xml seems correct but somewhat QGIS interprets it wrongly.

Tested with QGIS 2.12.0 on win 7 and Ubuntu 14.04

Notes:
In a hipothetical scenario such as this (which I also tested):

├ data
│ ├ folderA
│ │ └ osm_roads1.shp
│ ├ folderB
│ │ └ osm_roads2.shp

Not only the folders are of different names (as in my real world example above) but also the shape files are of different names.

Build virtual vector --> roads12

The resulting virtual vector:
\\..\data\folderA\osm_roads1.shp
\\..\data\folderB\osm_roads2.shp

..it is interpreted correctly by QGIS and the two files display correctly i.e. two adjacent tiles.

@qgib qgib closed this as completed Jan 24, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant