Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot Preserve Z-Coordinate in GEXF exporter #547
CPU: Intel Xeon 3.00GHz (x86_64)
Although Gephi can apparently read Z values for nodes, and these values are incorporated into the resulting model, the GEXF export tool does not seem to provide these values for the associated viz:position tags. For my particular needs, (and perhaps for others' needs) the preservation of these values is necessary. It would be helpful if we could do this.
In order to reproduce this issue, load a GEXF file with 3D coordinates present. The following is a basic example of such a file:
Run "File->Export->Graph File", and select GEXF from the drop down menu. Click "options": notice that one of the options is to Export the position as an (x,y,z) triple. Now choose another name for the file, and choose "save" to export it. This is the output of the above GEXF file:
From the wording of the Options dialog, it appears that this is probably a bug. I propose one of the following solutions for this bug:
Without changing the wording of this parameter in the associated Options dialog, the first option would probably be best. The user is probably expecting "Position (x,y,z)" to output a triple, not a pair. The other two options may become useful in cases where one wants to shrink the output file in certain cases. Whether or not Z is initially provided could be determined by the range of the Z axis, or it a reasonable default value could be provided for it.
I have been authorized by my boss to fix this bug and submit it back, provided that it does not take too long. I wager this is probably a simple fix, and would be more than happy to contribute back to this great software. Thus, I would be willing to tackle this bug if the maintainers find it appropriate for me to do so.
I had not noticed that my test case does produce a Z value for the one case where I have a nonzero Z-value. In light of that fact, the current output is probably fine. I did find a peculiar snippet of code in org.gephi.io.exporter.plugin.ExporterGEXF that filters out nodes at (0,0,0). This seems kind of peculiar to me: is (0,0,0) somehow not a valid node position? Thanks in advance!