I am working on a reader, that connects to a remote database and receives a .gml file.
Because I do not want to implement the CityGML specification, the received file is forwarded to the CityGML reader (provided by FME itself).
IFMEUniversalReader* additionalReader_; additionalReader_ = fmeSession_->createReader(kSysCityGML, FME_FALSE, directiveReader); additionalReader_->open(dataset_.c_str(), *params);
dataset_ stores the path to the received .gml file. However, I have no idea how to adopt the feature types to my reader during the read operation. The read method contains a simple forwarding: additionalReader_->read(feature, endOfFile);
Using this code I get a warning each time the reader is running: Unexpected Input: During translation, some feature were read that did not match a reader feature type in the workspace. This can happen if the reader dataset if changed, or a reader feature type removed or renamed.
Of course this message makes perfect sense, since my reader has no idea what type of features it gets from the CityGML reader (additionalReader_). My question is, how can I avoid this message? Somehow, my reader has to adopt the given feature types from the CityGML reader at runtime.
I could not find any tutorials or blog posts dealing with this problem, so I hope someone here can help me.
The code is written in cpp.
I known that the CityGML reader can handle files from a database directly. Unfortunately, I need special parameters for the connection, which are not provided by the CityGML reader.
Thanks.
ben