[xsd-users] Some difficulties with GML/CityGML Tree
Parser generation : a bug?
erwann.houzay at ign.fr
Thu Oct 22 09:36:16 EDT 2009
Data are not correcly written. I looked also inside the C++ object
through Visual debugger (very helpful..) and the object associated to
the cityObjectMemeber seems to contain nothing...
I'm doing my tests using the first dataset available on the ressource
data page of the CityGML website...
The input is looking like this
<gml:description>Gebäude und Freifläche
Child node are not decoded ("constructors" are not even called)
I follow the Makefile and translate it to use it with Visual without any
Maybe it's not enough or there's a side effect...
Thank you for your help...
Boris Kolpackov a écrit :
> Hi Erwann,
> Erwann HOUZAY <erwann.houzay at ign.fr> writes:
>> I've tried your solution (well I have very few knowledge about
>> codesynthesis, so I don't understand all...)
>> Well, is works now but sub-element under cityObjectMember are not
>> I've tried the sample on cityGML website (http://www.citygml.org/1539/)
>> and it doesn't work.
>> cityObjectMember if exported correctly in the output file...
> You mean that your application doesn't "see" them but they are in the
> output file, right? If that's the case then it is most likely because
> of the polymorphism. You need to figure out the actual element type
> and cast the pointer to it, for example:
> // Note the use of references!
> gml::FeaturePropertyType& feature = (*itFeature);
> gml::AbstractFeatureType& af = feature._Feature().get();
> if (CityObjectGroupType* cog = dynamic_cast<CityObjectGroupType*> (&af))
> // Handle cog.
> else if (BuildingType* b = dynamic_cast<BuildingType*> (&af))
> // Handle building.
> See Section 2.11, "Mapping for xsi:type and Substitution Groups" in the
> C++/Tree Mapping User Manual for more information:
More information about the xsd-users