qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

Loss of data when editing a shapefile on a cloud shared folder #41964

Open mwohlNCA opened 3 years ago

mwohlNCA commented 3 years ago

After modifying and saving a layer with edit mode, the geometry of the layer disappears. Only the attribute table remains.

  1. Load a vector layer in QGIS
  2. Start the edit mode on this layer
  3. Digitize new vector entities
  4. Save the modifications
  5. Quit the edit mode
  6. The following error message appears: "Cannot zoom in on selected entities: No extent could be determined"

QGIS version 3.10.14-A Coruña Code review 8374282d2a Compiled with Qt 5.11.2 Using Qt 5.11.2 Compiled with GDAL / OGR 3.1.4 Used with GDAL / OGR 3.1.4 Compiled with GEOS 3.8.1-CAPI-1.13.3 Used with GEOS 3.8.1-CAPI-1.13.3 Compiled with SQLite 3.29.0 Works with SQLite 3.29.0 PostgreSQL client version 11.5 SpatiaLite version 4.3.0 QWT version 6.1.3 QScintilla2 version 2.10.8 Compiled with PROJ 6.3.2 Works with PROJ Rel. 6.3.2, May 1st, 2020 OS version Windows 10 (10.0) Active Python extensions cartoini; pluginbuilder3; plugin_reloader; QuickOSM; quick_map_services; db_manager; MetaSearch; processing

This issue occurs when the layer is saved on the corporate server. If the layer is saved locally on a computer, there is no such problem. Other companies have already encountered this same problem but without having found the solution. image_2021_02_22T16_37_16_197Z

rduivenvoorde commented 3 years ago

@mwohlNCA can you be more specific:

What kind of 'vector layer'? QGIS has A LOT of different types of vector layers...

What do you mean with "the layer is saved on the corporate server"? Are you talking about a network drive (what kind: windows/smb? nfs? sharepoint? google-like drive?

gioman commented 3 years ago

Are you talking about a network drive (what kind: windows/smb? nfs? sharepoint? google-like drive?

@mwohlNCA or maybe is a database (postgis? oracle?)?

Other companies

@mwohlNCA what other companies?

mwohlNCA commented 3 years ago

Hello. We work with layers in shapefile format In our company we use a server which gathers all our GIS data. We encounter the problem when shapefile layers are saved on this server. I am attaching a capture of the organization of our server. Thank you for your help 🙂

Mathys WOHL NCA Environnement


De : Richard Duivenvoorde notifications@github.com Envoyé : mardi 2 mars 2021 12:20 À : qgis/QGIS QGIS@noreply.github.com Cc : Mathys Wohl SIG m.wohl@nca.fr; Mention mention@noreply.github.com Objet : Re: [qgis/QGIS] Loss of the geometry of a vector layer (#41964)

@mwohlNCAhttps://github.com/mwohlNCA can you be more specific:

What kind of 'vector layer'? QGIS has A LOT of different types of vector layers...

What do you mean with "the layer is saved on the corporate server"? Are you talking about a network drive (what kind: windows/smb? nfs? sharepoint? google-like drive?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/qgis/QGIS/issues/41964#issuecomment-788834378, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATBI3P5L4KAKZEEYPVBINNLTBTCX3ANCNFSM4YORYE6Q.

gioman commented 3 years ago

We encounter the problem when shapefile layers are saved on this server.

@mwohlNCA do you mean a shared network folder? if yes what type pf share is (samba? else?)?

Do you have the same issue when the shapefiles are stored on a local drive?

I am attaching a capture of the organization of our server.

You didn't attached anything.

mwohlNCA commented 3 years ago

Yes i talk about shared network folder but i can't give more informations about the server 😕 No we only have the issue when the layer was saved on the server. In local drive we don't have the problem. I try agian to join the screenshot of the organisation of our server.


De : Giovanni Manghi notifications@github.com Envoyé : mardi 2 mars 2021 14:54 À : qgis/QGIS QGIS@noreply.github.com Cc : Mathys Wohl SIG m.wohl@nca.fr; Mention mention@noreply.github.com Objet : Re: [qgis/QGIS] Loss of the geometry of a vector layer (#41964)

We encounter the problem when shapefile layers are saved on this server.

@mwohlNCAhttps://github.com/mwohlNCA do you mean a shared network folder? if yes what type pf share is (samba? else?)?

Do you have the same issue when the shapefiles are stored on a local drive?

I am attaching a capture of the organization of our server.

You didn't attached anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/qgis/QGIS/issues/41964#issuecomment-788925485, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATBI3PYSOSC2R35OEKYTQFTTBTU2DANCNFSM4YORYE6Q.

gioman commented 3 years ago

i can't give more informations about the server

@mwohlNCA well. knowing the type of share could be an important piece of information to confirm/troubleshoot the problem. Ask your IT guys.

roya0045 commented 3 years ago

I get this sometimes but reloading the project works fine. The tables empties on connection issues and repopulate on project reopening.

github-actions[bot] commented 3 years ago

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". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

mwohlNCA commented 3 years ago

Hello. I have more informations about our server. It’s Windows 2012 R2 Standard He has 3 roles : Files, DFS and printing. Thank you for your help.

Mathys WOHL

De : Giovanni Manghi @.> Envoyé : mardi 2 mars 2021 15:04 À : qgis/QGIS @.> Cc : Mathys Wohl SIG @.>; Mention @.> Objet : Re: [qgis/QGIS] Loss of the geometry of a vector layer (#41964)

i can't give more informations about the server

@mwohlNCAhttps://github.com/mwohlNCA well. knowing the type of share could be an important piece of information to confirm/troubleshoot the problem. Ask your IT guys.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/qgis/QGIS/issues/41964#issuecomment-788931579, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATBI3P2XS42KDSOODILP4MDTBTV55ANCNFSM4YORYE6Q.

ninsbl commented 3 years ago

A colleague of mine is experiencing this issue after digitizing on a OneDrive directory, that is synced periodically and where sometimes syncing in the background may fail if authentication tokens are no longer valid. But I did not experience this on NFS or CIFS shares... @mwohlNCA do you know (or could you find out) if the directory on your server is synced to OneDrive? There are a couple of posts on both stackoverflow and microsoft Q&A that report syncing issues with OneDrive leading to corrupt files.

You may try the answer here: https://gis.stackexchange.com/questions/373984/backed-up-shapefile-is-no-longer-a-valid-or-recognized-data-source to recover your data. For my colleague I reverted to earlier versions on OneDrive. But in general I think staying away from OneDrive for digitizing is something I would carefully consider...

rduivenvoorde commented 3 years ago

One thought here: a 'shapefile' off course consists of several files (shp, dbf etc etc). I'm not sure if the synching machinery is aware of that, OR that it keeps the individual files 'in synch' but thereby messing up the 'complete shp'.

IF this is a case (I'm just guessing), a work around would be to not use shp files, but geopackages (or alternatives consisting of just one file)? OR (even better) start using a proper spatial database like Postgis... You can always export your data to shp files if that is what your org is used to?

gioman commented 3 years ago

I changed the title and replaced "network" with "cloud" as this problem do not affects samba/nfs/etc. but probably only dropbox/onedrive/etc. (anyway I also think that no one should edit a shapfile being synchronized with one of those services).

thbaumann commented 3 years ago

I changed the title and replaced "network" with "cloud" as this problem do not affects samba/nfs/etc. but probably only dropbox/onedrive/etc. (anyway I also think that no one should edit a shapfile being synchronized with one of those services).

In this comment the OP mentioned that the shapefile is stored an a windows server with file role, so pretty sure smb: https://github.com/qgis/QGIS/issues/41964#issuecomment-802020988

At my workplace we also have a lot of problems with QGIS 3.16.5 and shapefiles stored on smb shares at the moment. (not neccessary to mention that still using shapefiles in the year 2021 is "suboptimal"... that's not my decision for the affected users.switching to postgis is already planned)

The users only access their own shapefiles but still there are problems with corrupted shapefiles (repack errors), NULL-geometries which occur when saving layer edits. Probably related to https://github.com/qgis/QGIS/issues/45372 Some years ago ESRI had quite similar problems: https://support.esri.com/en-us/knowledge-base/problem-nim090672-specific-microsoft-updates-may-result-000011778