[xsd-users] Sample code for GML creation?
Pavel Pohanka
pavelpgt at gmail.com
Mon Jul 26 11:08:02 EDT 2010
Thanks for your answer.
Now I switched to CityGML (as you sugested ;)) and I am able to created an
XML file with root element CityModel.
But I am not able to put anything else to it. I can create building
building::BuildingType b;
b.id("Building#1");
b._name("Embassy");
But I don't know, how to incorporate it to XML. I would like to get such
citygml xml file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CityModel xmlns="http://www.opengis.net/citygml/1.0"> <!-- it contains a
lot of xmlns and xsi -->
<cityObjectMember>
<bldg:Building gml:id="bldg61003062">
<gml:name>Embassy</gml:name>
<gml:boundedBy>
<gml:Envelope srsDimension="3"
srsName="urn:ogc:def:crs,crs:EPSG:6.12:3068,crs:EPSG:6.12:5783">
<gml:lowerCorner>441935.836984 111587.590725
10.164845</gml:lowerCorner>
<gml:upperCorner>441949.039878 111604.323501
17.14007</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<bldg:lod2Solid>
<gml:Solid gml:id="UUID_483140f5-b693-4957-9bf1-1d54cc9c1ee6">
<gml:exterior>
<gml:CompositeSurface
gml:id="UUID_c00a5d10-da42-43e2-a122-7e9f9e6b6853">
<gml:surfaceMember>
<gml:Polygon
gml:id="UUID_85c69506-bf9f-436c-a679-f30739419b62">
<gml:exterior>
<gml:LinearRing
gml:id="UUID_85c69506-bf9f-436c-a679-f30739419b62_0">
<gml:posList srsDimension="3">441947.976168
111587.590725 17.135723 441949.039878 111603.792466 17.135723 441936.624433
111604.323501 17.135723 441935.836984 111588.123909 17.14007 441947.976168
111587.590725 17.135723</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<!-- next surface -->
</gml:surfaceMember>
<gml:surfaceMember>
<!-- next surface -->
</gml:surfaceMember>
<gml:surfaceMember>
<!-- next surface -->
</gml:surfaceMember>
<gml:surfaceMember>
<!-- next surface -->
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
</bldg:Building>
</cityObjectMember>
</CityModel>
Can I please ask you for a hint or some sample code how to make such xml?
I very appreciate your help. Thanks.
Pavel
More information about the xsd-users
mailing list