-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Processing toolbox does not handle array fields #29601
Comments
Author Name: Giovanni Manghi (@gioman) Is this a problem of the specific tool in the subject, or a general one of any tool in the Processing toolbox?
|
Author Name: Cory Albrecht (@CoryAlbrecht) Giovanni Manghi wrote:
The specific tool in the subject. |
Author Name: Giovanni Manghi (@gioman)
|
This still happens. As a result, there is nothing in the created layer for the fixed geometries. I just tried the Check validity tool, and it has a similar problem where it does not add any features to the valid and invalid layers it creates, but it creates the errors points layer that shows where the invalidities are. Array data has been a persistent problem since the switch from 2.x to 3.x. |
|
@CoryAlbrecht does not seems to be a issue of just the "fix geometries" tool, but rather a general one, correct? |
@gioman , Correct. That's a general one. |
Are these upstream tools, or are they part of QGIS's code? A lot of the validation tools are unusable for me because they cannot handle array fields. For example, when using tools like Menu→Vector→Geometry Tools→Check Validity…, The valid and invalid layers don't get filled because of array fields causing errors. Occasionally I'll get some features in the valid layer, but never any ion the invalid layer even when errors records do get placed in that memory layer. At the very least, could array fields simply be passed as string values using some format, like the PostgreSQL one of
It makes it very difficult for me to clean up any issues with bad geometries on my part when trying to make the trasinc tool work. #29531 |
Can you share a small postgis sql dump which can be used to reproduce this issue? |
I encounter this issue also. "Fix geometries" from Processing Toolboc generates errors when a file contains an array field. Error reporterd: |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
Author Name: Cory Albrecht (@CoryAlbrecht)
Original Redmine Issue: 21786
Affected QGIS version: 3.6.1
Redmine category:processing/core
So I just did "fix geometries" on my PostGiS layer that has array fields, when I deleted the shapes from it and copied the new features back. When I went to save that layer, nothing would save. All I got was simple message log error line saying that arrays had to start with {, and no PostGIS errors.
My PostGIS layer has several fields that are arrays, so I did not know which one it was referring to. Eventually I realised that the fix geometries tool had converted all array fields to simple string fields, so a PostGIS array like '{en,"Kingdom of Bavaria"}' became the literal string "{en, "Kingdom of Bavaria"}". When the shapes were copied back to the PostGIS layer, QGIS was still seeing them as strings, not as arrays, and apparently converting them improperly when trying to create the SQL to update the PostGIS layer. I assume the problem was with creating SQL because there were no PostGIS errors, just the ambiguous error about needing the { for an array.
Based on other bugs I have filed having to do with how QGIS handles array fields, it seems to me that whatever redesign of the internals of how a layer and it's attributes are stored in memory, that redesign seems to be faulty at the core as it communicates wrong information to the higher level functions that do things like run the processing tools, like displaying the feature attributes form (arrays are converted to strings, but truncated, #28691), like when trying to update PostGIS layers (nulls getting passed as empty strings, #29277), and now this.
The text was updated successfully, but these errors were encountered: