Bug report #19325

CSV not exporting correct data from shape file

Added by Tara Pirie over 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:3.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:27153

Description

When saving a shape file that has been worked on (i.e. data points have been removed) as a csv file, the vector points are not being saved from the shape file that was worked on and saved, but saves the points that were deleted from the previous file.

MrFB_c.cpg (5 Bytes) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.prj (143 Bytes) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.qpj (257 Bytes) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.shp (137 KB) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.shx (39.6 KB) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.dbf (4.34 MB) Tara Pirie, 2018-07-03 06:54 PM

MrFB_c.csv Magnifier (652 KB) Tara Pirie, 2018-07-03 06:54 PM

MrFB_site10.csv Magnifier (342 KB) Tara Pirie, 2018-07-05 11:13 AM

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Easy fix? set to No
  • Project changed from QGIS Redmine (QGIS bug tracker) to QGIS Application
  • Category changed from Any to Vectors
  • Status changed from Open to Feedback
  • Affected QGIS version set to 3.2
  • Crashes QGIS or corrupts data set to No
  • Regression? set to No

3.2?

#2 Updated by Tara Pirie over 6 years ago

Giovanni Manghi wrote:

3.2?

Hi,
It was in 2.18.13 however I have just tried 3.2 and the same issue occurs.

#3 Updated by Giovanni Manghi over 6 years ago

Hi, description is a bit confusing to me, can you kindly add the list of exact steps to follow in order to allow us try replicate the problem? thanks!

#4 Updated by Richard Duivenvoorde over 6 years ago

Hi Tara,

Can you provide clear instructions on the things you do to get this result?

Because:
- I just downloaded your shapefile,
- opened it in QGGIS
- made the layer editable
- removed a lot of points
- finished editing (! else your edits are not saved, off course?)
- show feature count: 185
- export to csv
- view table: 185 records
To check if those were the right records I joined the data on the Time field, and all seems ok to me?

So please provide some more info on how to reproduce this.
I'm on Debian Linux, I tested both QGIS 3.2 and master

#5 Updated by Tara Pirie over 6 years ago

Richard Duivenvoorde wrote:

Hi Tara,

Can you provide clear instructions on the things you do to get this result?

Because:
- I just downloaded your shapefile,
- opened it in QGGIS
- made the layer editable
- removed a lot of points
- finished editing (! else your edits are not saved, off course?)
- show feature count: 185
- export to csv
- view table: 185 records
To check if those were the right records I joined the data on the Time field, and all seems ok to me?

So please provide some more info on how to reproduce this.
I'm on Debian Linux, I tested both QGIS 3.2 and master

Hi Richard,

The shape files were the finished and saved files. The attached CSV was the saved file from the attached shape file. If you load the CSV you see there are more points than the shape file (you need to zoom to layer to see them) but it was saved from that file. I even reloaded the shape file into QGIS to make sure all the changes were definitely saved before saving to the csv. I have also tried excel version and copy and pasting the attribute table. When I save to a csv file I do save as, select the csv and find the folder to save it to.

#6 Updated by Giovanni Manghi over 6 years ago

The shape files were the finished and saved files. The attached CSV was the saved file from the attached shape file. If you load the CSV you see there are more points than the shape file (you need to zoom to layer to see them) but it was saved from that file. I even reloaded the shape file into QGIS to make sure all the changes were definitely saved before saving to the csv. I have also tried excel version and copy and pasting the attribute table. When I save to a csv file I do save as, select the csv and find the folder to save it to.

Can you kindly attach the original data and outline the exact steps you are following? thanks!

#7 Updated by Tara Pirie over 6 years ago

Giovanni Manghi wrote:

The shape files were the finished and saved files. The attached CSV was the saved file from the attached shape file. If you load the CSV you see there are more points than the shape file (you need to zoom to layer to see them) but it was saved from that file. I even reloaded the shape file into QGIS to make sure all the changes were definitely saved before saving to the csv. I have also tried excel version and copy and pasting the attribute table. When I save to a csv file I do save as, select the csv and find the folder to save it to.

Can you kindly attach the original data and outline the exact steps you are following? thanks!

Hi Giovanni

Please find the original file attached. I then loaded it into QGIS and removed the extreme data points so only those seen on the shape file (loaded previously) were left. I saved the edits and came out of editing mode then saved the changes as a new shape file which is the one I have given to you. I then saved the same shape file as a csv file which I also attached previously. However when I loaded the "cleaned" csv file and zoomed to layer I found the "deleted" points were still there.

#8 Updated by Giovanni Manghi over 6 years ago

Tara Pirie wrote:

Giovanni Manghi wrote:

The shape files were the finished and saved files. The attached CSV was the saved file from the attached shape file. If you load the CSV you see there are more points than the shape file (you need to zoom to layer to see them) but it was saved from that file. I even reloaded the shape file into QGIS to make sure all the changes were definitely saved before saving to the csv. I have also tried excel version and copy and pasting the attribute table. When I save to a csv file I do save as, select the csv and find the folder to save it to.

Can you kindly attach the original data and outline the exact steps you are following? thanks!

Hi Giovanni

Please find the original file attached. I then loaded it into QGIS and removed the extreme data points so only those seen on the shape file (loaded previously) were left. I saved the edits and came out of editing mode then saved the changes as a new shape file which is the one I have given to you. I then saved the same shape file as a csv file which I also attached previously. However when I loaded the "cleaned" csv file and zoomed to layer I found the "deleted" points were still there.

how did you loaded the CSV in the first place? as a geometryless table or as point layer (in this second case what tool you used to plot the csv as point layer?)?

#9 Updated by Tara Pirie over 6 years ago

Giovanni Manghi wrote:

Tara Pirie wrote:

Giovanni Manghi wrote:

The shape files were the finished and saved files. The attached CSV was the saved file from the attached shape file. If you load the CSV you see there are more points than the shape file (you need to zoom to layer to see them) but it was saved from that file. I even reloaded the shape file into QGIS to make sure all the changes were definitely saved before saving to the csv. I have also tried excel version and copy and pasting the attribute table. When I save to a csv file I do save as, select the csv and find the folder to save it to.

Can you kindly attach the original data and outline the exact steps you are following? thanks!

Hi Giovanni

Please find the original file attached. I then loaded it into QGIS and removed the extreme data points so only those seen on the shape file (loaded previously) were left. I saved the edits and came out of editing mode then saved the changes as a new shape file which is the one I have given to you. I then saved the same shape file as a csv file which I also attached previously. However when I loaded the "cleaned" csv file and zoomed to layer I found the "deleted" points were still there.

how did you loaded the CSV in the first place? as a geometryless table or as point layer (in this second case what tool you used to plot the csv as point layer?)?

I loaded it as a deliminated text file, then saved it as a shape file to be able to edit it.

#10 Updated by Jürgen Fischer about 6 years ago

  • Assignee deleted (Tara Pirie)

#11 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Feedback to Closed
  • Resolution set to no timely feedback

Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.

Also available in: Atom PDF