What are the various rows needed as a header for any current gpml file?
Thanks
What are the various rows needed as a header for any current gpml file?
Thanks
Hi Bruce,
GPML files are XML, so there is no header as such for these but a schema that defines the elements (much like CSS/HTML). In fact, GPML is a dialect/subset of the GML, the Geographic Markup Language.
Have a look here: https://www.gplates.org/gpml/ or just open a GPML file with a text editor. If you need to create new files I’d suggest that you create a simple feature in GPlates, save it to a new GPML file and then inspect it, you can use it as a framework to get started. Alternatively, pyGPlates will allow you to build files/features using the “implicit knowledge” it has of GPML and the related information model (GPGIM - https://www.earthbyte.org/Resources/GPGIM/) using Python.
HTH,
Christian
Hi Christian
thanks. Hope you are doing well.
I have the basic structure,thanks, but am wondering about specific values. The general header structure I am using (based on working gpml files from others) is
<?xml version="1.0" enc<?xml version="1.0" encoding="UTF-8"?><gpml:FeatureCollection xmlns:gpml=“http://www.gplates.org/gplates”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:xsi=“http://www.w3.org/XMLSchema-instance” gpml:version=“1.6.0322”
xsi:schemaLocation=“http://www.gplates.org/gplates ../xsd/gpml.xsd
http://www.opengis.net/gml ../../../gml/current/base”>
My question is whether these entries are appropriate or need to change to any newer values.
For individual entries, there also needs to be two GUID values, one for identity and the other for revision. As I understand it they need to be the same for all entries in a single gpml file but is there any other requirement other than internal uniqueness?
Thanks
Bruce
Hey Bruce,
all well - hope at your side, too.
From what I can recall, you don’t need to worry about the namespace (xmlns) and schema/stylesheet values too much as long as you stick to those you’d find in new file that (a reasonably recent version of) GPlates would write out. Although GPlates won’t probably complain if you throw an ancient GPML file with different values at it.
For each individual <gml:featureMember> you need to generate (if not done within the GPlates/pyGPlates API ecosystem) a UUID/GUID value. The <gpml:identity> one is critical, and should be unique for each feature member. As GPlates keeps track of features this way, the same UUID might lead to read errors and that feature to be discarded when the file is read (I think).
The <gpml:revision> is – as far as I can recall – not used. Same concept as for the feature id applies though. In the GPGIM infancy days, James Boyden and Hamish had the idea that the revision id would be used to keep track of various changes one would generate by modifying, e.g. vertex positions or attributes. It was the time when everything was XML’ifed around 2004-2006 and I think this has not been implemented. However, I stand to be corrected on this by @john.cannon and @michaelchin .
Cheers,
Christian
Thanks Christian! And good memory about the revision ID. You’re right, it’s not currently used. It might be in the next release since the model revisioning system is finally getting implemented (to support proper undo/redo). Not sure when that release will be, but will focus on it after the pyGPlates 1.1 release coming any week now.