Point features from XML GML files - ObjectVision/GeoDMS GitHub Wiki
This example shows how point data can be read and processed from a GML data source. The example reads and processes verblijfsobject geometries from the BAG.
container vbo
{
attribute<string> FileName(File):
['9999VBO08012016-000001.xml','9999VBO008012016-000003.xml'];
attribute<String> XmlData (File)
: StorageType = "strfiles"
, StorageName = "%SourceDataDir%/BAG";
container ParsedXML := parse_xml(XmlData, scheme);
unit<uint32> vbo := ParsedXML/bag_LVC_Verblijfsobject
{
attribute<string> gml_pos := ParsedXML/bag_LVC_Verblijfsobject/gml_pos;
attribute<float64> x := ReadElems(gml_pos, float64, const(0,.))
{
attribute<uint32> ReadPos (vbo);
// explict configuration of ReadPos item
// is necessary to find vbo unit
}
attribute<float64> y := ReadElems(gml_pos, float64, x/ReadPos)
{
attribute<uint32> ReadPos (vbo);
}
attribute<rdc_mm> geometry_mm := point(round(y * 1000.0), round(x * 1000.0), rdc_mm);
template scheme
{
unit<uint32> bag_LVC_Verblijfsobject
{
attribute<string> bag_LVC_identificatie;
attribute<string> gml_pos;
}
}
}
}