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

Split vector layers returns incorrect layer names #37296

Closed
rnanclares opened this issue Jun 18, 2020 · 5 comments · Fixed by #37298
Closed

Split vector layers returns incorrect layer names #37296

rnanclares opened this issue Jun 18, 2020 · 5 comments · Fixed by #37298
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

Comments

@rnanclares
Copy link

Describe the bug
When using the split vector layer tool the resulting layers have incorrect names, like attribute_name + index[0,1,2,3,4,5,...] but it should be attribute name + attribute value. It happens with text and numeric fields and using different output formats (gpkg, shp).

How to Reproduce

  1. Go to Split Vector layer tool in processing
  2. Split layer using Unique ID Field
  3. Save layers to folder
  4. Resulting layers have incorrect names

QGIS and OS versions

QGIS 3.13
Ubuntu 20.04

Additional context
Test gpkg
split_test.zip

@rnanclares rnanclares added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jun 18, 2020
@gioman gioman added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Jun 18, 2020
@gioman
Copy link
Contributor

gioman commented Jun 18, 2020

Confirmed here.

@uclaros
Copy link
Contributor

uclaros commented Jun 18, 2020

I believe it's intentionally that way. The unique ID field may be of any type and any length like unlimited length TEXT or even BLOB, that can't be put on a filename.

@gioman
Copy link
Contributor

gioman commented Jun 18, 2020

I believe it's intentionally that way. The unique ID field may be of any type and any length like unlimited length TEXT or even BLOB, that can't be put on a filename.

@uclaros right, but is an extremely common case using a "normal" attribute, and what the user is looking for is to have this attribute used in the resulting files/layers names.

@rnanclares
Copy link
Author

@uclaros It's a regression, it doesn't happen in 3.10 or 3.12

@Giacominibus
Copy link

Describe the bug
When using the split vector layer tool the resulting layers have incorrect names, like attribute_name + index[0,1,2,3,4,5,...] but it should be attribute name + attribute value. It happens with text and numeric fields and using different output formats (gpkg, shp).

How to Reproduce

  1. Go to Split Vector layer tool in processing
  2. Split layer using Unique ID Field
  3. Save layers to folder
  4. Resulting layers have incorrect names

QGIS and OS versions

QGIS 3.13
Ubuntu 20.04

Additional context
Test gpkg
split_test.zip

Confirmed for QGIS 3.14.0-Pi on Windows 10 64 bit

alexbruy added a commit that referenced this issue Aug 3, 2020
use attribute value in the output file name for Split vector layer algorithm (fix #37296)
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

Successfully merging a pull request may close this issue.

4 participants