G-File Export!

Jim Frame

Well-Known Member
I'm very happy to see that G-File export is available in the current release of J-Field. I just tried it out on one of my projects, and was delighted to be able to include the vectors in the project adjustment.

The capability appears to be in need of some tweaks, however. Right now, it looks like the converter assigns odd integers to the base (4-digits starting with 0001), and even integers to the collected points (starting with 0002) in each C (vector) record in the exported file. I had to hand-edit the file to replace the odd integers with the base designation and the even integers with the correct point number. It would be very, very helpful if the converter would do this automatically.

Also, Star*Net (at least the version that I have) chokes when it sees a G (coordinate) record in the file, so I had to delete them in order to get Star*Net to accept the file for import. G records are optional according to the Annex N document, so it would be nice if inclusion of G records were made optional, just as the choice between correlation and covariance is now.

But this is a very much appreciated addition to the software, even with the hand-editing I have to do currently.
 

Mikhail Drakin

Developer
To avoid misunderstanding, could you please post right here as attachments (1) a sample of file as it was exported, and (2) the same file you have edited to load smoothly in Star*Net.
Also, which J-Field build are you currently running?
 

Jim Frame

Well-Known Member
I've attached two files. The one named Original.gfile is the J-Field exported file *except* that the G records have been stripped out. The one named Modified.gfile has been hand-edited to replace the 4-digit SSN integers with station names. In this case, the base station I used was a CGPS named UCD1, so it didn't have a point number and I just retained the UCD1 designation in place of the base SSN. I replaced the rover SSNs with point numbers, right-justified.

The idea of using point numbers in place of the SSN integers does have a limitation: point numbers can't be any larger than 4 digits, or the Star*Net import will blow up. This is a limitation of the g-file specification, in which fields are position-specific.

Edit: I had to change the file names, as .gfile isn't an allowed extension, as I discovered upon attempting to upload.
 

Attachments

  • Original-gfile.txt
    6.8 KB · Views: 414
  • Modified-gfile.txt
    6.8 KB · Views: 439
Last edited:

Shawn Billings

Shawn Billings
5PLS
I agree with Jim. It would be desirable for the names to be applied to the g-File export. Any users anticipating using the g-file export should be aware that they need to limit the point names to only those names which are legal for g-file and third party software (four characters). If a user uses only numbers for his or her point naming, he has 9999 points available. If this is not enough, he can add an alpha character and extend this to considerably more (A001-Z999) and so on.

Regarding file names, Jim. You can also put files in a zip file and upload them directly without issue. (I've had to do this with dxf and dwg in the past).
 

Mikhail Drakin

Developer
Thanks. I guess, I'll always use point names stripped down to 4 characters and produce a warning if this leads to duplicate names.
 

Jim Frame

Well-Known Member
Getting a bit fancier, there could be an option to produce a point-name "pseudo-g-file" as we've discussed, but also an option to produce a fully-compliant g-file. This would require creating a serial number file, a separate text file that keys the 4-digit serial number integers to the point names. (This is known colloquially as a SERFILE, but at the moment I can't find any documentation about it.)

In any case, the origin names or serial numbers (those of each base station) should be consistent throughout the g-file, i.e. all the origin station serial numbers in the vector records from a given base should be identical.
 

Mikhail Drakin

Developer
As we currently do not have direct links between base station points and base station coordinates stored with objects, base stations now are grouped by coordinates and named "B001", "B002", etc. Also I've added a checkbox to save point names instead of serial numbers, in which case last 4 characters of the point name are taken. If these are equal for different points, than the produced file will be incorrect - thus the option to use numbers as before.
 

Jim Frame

Well-Known Member
Nice -- and the G-record option, too. Globally replacing the base placeholders is a pretty simple workaround. I like it -- thanks!
 
Top