0

I am having trouble importing stratigraphy data from a CSV file.

The CSV files can be found at the following link: https://www.dropbox.com/sh/txrrcpbf6cpzh52/AAC8jk4DGP7dZYfBBpj2s1B7a?dl=0

When loaded into QGIS as a CSV import the stratigraphy table recognizes all the columns except development and comment.

I receive the following Python error when I start the import:

TypeError: float() argument must be a string or a number

There are no midvatten error warnings.

I have managed to successfully import the obs_points data but having no joy with this. The only thing that works is importing the data manually into an attribute table (not ideal).

Perhaps it is something to do with the columns in the CSV?

  • Apologies colum layout is as follows: WKT; stratid depthtop depthbot geology geoshort capacity development comment – Jon Mar 15 at 11:37
  • May be if you could share your csv file we can figure it out what is wrong. I'm preaty sure that it must be something within the csv column separator. – César Arquero Mar 15 at 11:46
  • apologies here are the csv files: dropbox.com/sh/txrrcpbf6cpzh52/AAC8jk4DGP7dZYfBBpj2s1B7a?dl=0 – Jon Mar 15 at 11:53
0

Ok, managed to figure this out.

As César Arquero suspected it was something to do with column headings.

The problem was the WKT; in the columns header of the stratigraphy CSV. It should be wkt_geom. Setting all the values to NULL for this column may also have helped.

Figured this out by accident by opening the attribute table and doing a copy paste into excel.

Jon

0

Here is your data just imported from csv: enter image description here

QGIS read those attributes (development and comment) but, the issue here is that they are blank as you can see here (using notepad): enter image description here

I don't know if you have a huge file where those attributes have something, but in this file you share here those attributes have nothing (see the position of those between the commas). Anyway, you can link attributes from both files:

  1. Import csv (with x,y coords).
  2. Join the other data in properties.
  3. Save as shp to "fix" that conection between attributes in files.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.