[xsd-users] CityGML deserialization - <cityObjectMember> tag

Pavel Pohanka pavelpgt at gmail.com
Mon May 2 02:59:17 EDT 2011


Hallo

Adrian Victor Manoliu <victor.manoliu at yahoo.com> writes:

> To sum up what I've written below (in case you don't  have the time to
> read everything), the CityGML serialization works, however one  tag is
> not generated properly - <cityObjectMember> is always replaced by
> <gml:featureMember>, perhaps a problem caused by substitution groups.

I had same problem some time ago and Boris explained it to me. The problem
is really caused by substitution groups, because generated code looks for
the first substituting element. You have to write the following code in
order to include cityObjectMember:

citygml::CityModelType city_model;
gml::FeaturePropertyType city_object_member;
city_object_member._name ("cityObjectMember");
city_object_member._namespace ("http://www.opengis.net/citygml/1.0");

Then you can write whatever object you like:

city_object_member._Feature(some_type);
city_model.featureMember().push_back(city_object_member);

Ciao,

Pavel


More information about the xsd-users mailing list