Fesapi has provided method to write SeismicLatticeFeature to EPC file as shown in below link.
https://f2i-consulting.com/fesapi/doxygen/2.0/classcommon_1_1_data_object_repository.html#a92f42a99ab11a7d1007638ac0c92ddd0 .But could not found any method to read SeismicLatticeFeature directly from DataObjectRepository.
Although there is indirect way to read SeismicLatticeFeature through getInterpretedFeature() method of GenericFeatureInterpretation that is attached with that specific SeismicLatticeFeature.
Incase if no GenericFeatureInterpretation is attached with SeismicLatticeFeature and repository is serialized,then how SesimicLatticeFeature would be read from file?
Hi @Husnain and welcome on board!
There is a generic way to access whatever dataobject of the data object repository based on their type using the template method getDataObjects.
You should be able to access all your SeismicLatticeFeature using it as for example :
const std::vector<RESQML2_NS::SeismicLatticeFeature *> mySeismicLatticeFeatures = repo.getDataObjects<RESQML2_NS::SeismicLatticeFeature >();
I hope it answers your question.
@philippeVerney Thanks for your responce. I am using java wrapper of fesapi. In java wrapper of fesapi version 1.2.0.0 no such method getDataObjects is available.
This method repo.getDataObjectByUuid(uuid) is available, which is not useful because uuid is required to find the object.
Is this method is missing in Java wrapper or there is some way to get SeismicLatticeFeature from Repository?
This method is not ported in JAVA (neither CSharp, nor Python) because it translates badly into those languages using SWIG.
It means that you actually cannot easily get SeismicLatticeFeature from a DataObjectRepository.
It would require some time on my side to expose this method and it won’t probably be backported in 1.2.0 but will be in the next v2.*
I’ll create a Github issue to keep track of such a request : https://github.com/F2I-Consulting/fesapi/issues/277
Here is a workaround waiting for the development (consider your company joining the FESAPI Initiative if you want to prioritize new FESAPI developements) and waiting for your v2.* adoption:
- Use DataObjectRepository::getUuids method in order to get all uuids of your repository. This should be ported in JAVA/CSharp/Python.
- Loop on those uuids and get related DataObject using DataObjectRepository::getDataObjectByUuid(string uuid)
- Within the loop, create a condition on the type of the result of DataObjectRepository::getDataObjectByUuid(string uuid) using intanceof in JAVA
- When the above condition is honored, do your process.
Hello Philippe,
Thanks for your response. Couple of follow up questions.
- Could you please provide additional pointers on joining FESAPI initiative ?
- We are using java to read/write RESQML.
Our thinking was that java API is as rich as the corresponding C++ one, but from your response apparently, it is not the case. Could you please give an idea on approximately, what percentage of functionality is missing from java APIs?
Apart from prioritization, are there any C++ APIs that can’t be made available in java for some technical reasons?
More context:
We are at this point dealing with two data types - Seismic Lattice and 3D Horizons.
Once are are able to fully create/read/update/delete with these two data types we want to expand to more data types.