Support with extracting company_id from gef files

I am trying to extract the company that performed a gef file in order to be able to add it to the gef summary. However when I test my code with different gefs I get different results which to mean seem inconsistent. The function that parses my gef files is as follows.

[1] The first example is a gef which behaves the way I expect it to. The COMPANYID in the gef is set as Van Dijk which is also the client I get in the headers part of the GEFData object. See below the gef on the left and the headers dictionary on the right.

120586_1.GEF (151.9 KB)

[2] This gef does have a COMPANYID line in the gef file but the company itself is unknown. When trying to parse this gef, the “client” key is not existent in the headers dictionary.

CPT000000072790_IMBRO_A.gef (252.8 KB)

[3] This gef has COMPANYID set to Fugro and after parsing the “client” key does exist in the header dictionary but the corresponding value is “-”.

Dkmp1-A.GEF (97.8 KB)

[4] This gef has COMPANYID set to Wiertsema & Partners and after parsing the “client” key does exist in the header dictionary but the corresponding value is “0”.

83800_DKM003_(3)_predrilled.GEF (234.7 KB)

[5] This gef has COMPANYID set to BAM and after parsing the “client” key does exist in the header dictionary but the corresponding value is “TAUW bv”.

02563.01.06_S13_first_row_is_none.GEF (129.7 KB)

Questions
Based on these findings I have two questions.

  1. Can someone elaborate on how the GEFParser works and why to me it feels to be inconsistent when it comes to the COMPANYID ?
  2. When the COMPANYID is not existent or the company is unknown, is it possible to get the information of the FILEOWNER parsed from the GEFData? In example [2] the COMPANYID exists in the gef but the company is unknown. However the FILEOWNER is the “Basisregistratie Ondergrond” and this would be useful information to send to the user since this file has been downloaded from the BROloket.

Hi @Rutger ,

I looked into a bit and the answer is that in fact the gef parser currently does not look at the COMPANYID at all. Instead, the client is parsed based on the line that starts with MEASUREMENTTEXT= 1, <value>. Knowing that, upon inspection of your gef files, the resulting client values make a lot more sense.

We’ve set the parser up this way because of the following excerpt of the CUR standard that we’ve based the parser on:

As you can see, according to that standard COMPANYID is supposed to contain as value the name of the company that executed the measurement. However, that is not the same as the client, which is an optional field (hence not bold) and that value is to be found in MEASUREMENTTEXT 1.