[Feature Request] Allow FeatureCollection to accept a sequence of strings as input
As RotationModel allows, it would be convenient if FeatureCollection accepted a sequence of strings as input such that
topology_filenames = ["topology1.gpmlz", "topology2.gpmlz"]
topology_features = pygplates.FeatureCollection()
for topology_filename in topology_filenames:
topology_features.add(pygplates.FeatureCollection(topology_filename))
could be replaced with the more succinct
topology_filenames = ["topology1.gpmlz", "topology2.gpmlz"]
topology_features = pygplates.FeatureCollection(topology_filenames)
This is similar to merging multiple files into a single file (which can be saved with FeatureCollection.write(filename). However we've tended to discourage this for various reasons - eg, combining two Shapefiles with different attribute tables and then loading that into GPlates/pyGPlates can create problems (eg, error messages about key-value dictionaries).
As you noted, the user can still combine them if they wish, but they have to do it explicitly.
This can be done in gplately with a class method now. See the code below.
https://github.com/GPlates/gplately/blob/58ca1b000142931082f1ae1528ae42dc26ff6722/gplately/pygplates.py#L385-L402