Bug report #18081
GDB recognition mixup
|Affected QGIS version:||2.18.14||Regression?:||No|
|Operating System:||Windows 7 Home Premium||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25977|
I open a new project, add several layers from an ArcGIS GDB. Then work in the project for a while. When I close it and reopen it the GDB layers are there, but they may or may not be referencing the correct layer from the GDB. My Covertypes layer could be mapping the Powerline layer or some other layer.
#1 Updated by Richard Duivenvoorde over 2 years ago
- Category changed from Unknown to Data Provider/OGR
- Status changed from Open to Feedback
Hi, can you elaborate a little further, and preferably add a dataset, qgs project file and or some screenies?
If I understand correct:
- given a gdb with say: polygon, line, point
- adding these to a project in that order and save the project
- then closing the project
- then opening the project and then the order is wrong?
#2 Updated by Douglas Alderman over 2 years ago
- Assignee set to Richard Duivenvoorde
The "layers panel" shows the correct layers from the GDB. The "Layer Properties" of each layer also shows the layers are referencing the correct layer from the GDB. However, the map view will show a completely different layer from the same GDB than the layer it is supposed to be showing.
As I just went through this, I just remembered that oftentimes I need to shorten the name in the "layers panel". To do this I have been going to the "General" tab of the "Layer Properties" and shortening the 'Layer Name'. For example: The original GDB 'Layer name' in the 'General' tab of the "Layer Properties" after I open it from the GDB is "Update_Current Appalachian_Forest_B_HCVF". So I can see the entire 'Layer name' in the 'Layers Panel' of QGIS and have a bigger map view, I will shorten the "Layer name" in the 'General' tab to "AppB_HCVF". After I saved and closed the project and reopened it later, the "AppB_HCVF" layer is still correct in the 'Layer Panel', but the map view of this layer is showing the "AppB_Powerlines" layer instead of the HCVF layer. Oftentimes 2 or more layers will be referencing incorrect layers while the rest of the layers are referencing the correct layer from the GDB. I wonder if the name change could be the reason for the correct layer referencing some other layer in the same GDB?
I don't know if the company I am working is going to let me share the GDB. I cannot get the program to do it again. Good Lord willing I will try another time to make it happen. For now, we have started changing all of the GDB layers to shapefiles and opening them as shapefiles rather than GDBs. This is a hassle though and is only a band-aid for the issue. If I get it to happen again, I will revisit the bug report and post some screenies with explanations. If the company decides to share the dataset, I will include it also.
#4 Updated by Giovanni Manghi over 2 years ago
- Crashes QGIS or corrupts data changed from Yes to No
- Assignee deleted (
Douglas Alderman wrote:
The company has agreed to share the GDB, but would like a more confidential approach to get it to you rather than to post it on this site. Is there any way I could send it to you via a dropbox link or something like that.
please sent it to me: giovanni dot manghi at gmail dot com
#7 Updated by Douglas Alderman over 2 years ago
- File Screenshot 2018-05-08 23.22.05.png added
This issue just reoccurred again with the same GDB Feature Class, but it was in a different project. I am attaching a screenshot to this entry. Please notice the feature class from the GDB is the '...HCVF' feature class. Please also notice that the attribute table is supposed to be for the '...HCVF' feature class, but it is actually the attribute table of the '...Powerline_ROW-100ft' feature class from the same GDB. This is a GDB that was created in ArcGIS at our main office, sent to me via Dropbox, then downloaded to my desktop. Please note that I do not notice this issue when I first make a new project. It appears to occur after I close the project and reopen it later.
I apologize for the delay in getting back to you on this subject. I will also try the "Dropbox/gdrive share" in the next couple of days. I have to make sure there is no classified information on the GDB before I can share it. Please accept my apologies for the misunderstanding about the email address also. Thanks!
#8 Updated by Even Rouault about 2 years ago
- Resolution set to fixed/implemented
I'm pretty sure this is a known issue that has been fixed in the QGIS 3 line. Previously for multi-layer datasources, the project stored them with a layer index, which was unstable if the datasource had layers removed or added. QGIS3 now stores the layer name instead.
Closing as fixed in QGIS 3