Issue with add a new property to a feature in pygplates

Hi Lavie,

Thanks for sending the information.

The crash is caused by a bug in GPlates 2.1 that was fixed in 2.2. Using GPlates 2.2 I was able to load your GPML file without crashing.

Just so you know, when you add a property (using pyGPlates) that is not in the GPlates information model, similar to what you (correctly) did, such as…

number_of_points_property_name = pygplates.PropertyName.create_gpml('number_of_points')
number_of_points_property_value = pygplates.XsInteger(10)

feature.add(
    number_of_points_property_name,
    number_of_points_property_value,
    pygplates.VerifyInformationModel.no)

…then load it into GPlates 2.2, it will be uninterpreted (instead of 10 in the example above)…

image

Despite GPlates 2.1+ loosening up the information model to allow any feature to contain any property, it still restricts properties to those defined in the information model. Future GPlates versions will likely loosen this further to allow user-defined properties (which can already be created in pyGPlates using the pygplates.VerifyInformationModel.no flag, as you are doing). In which case the above example would show up in a future GPlates as 10 (instead of uninterpreted).

By the way, I like the way you use pyGPlates - keep up the good work!

Regards,
John