GetTopobaseResult GetTopobase(TopobaseId tTopobase, GetTopobaseArg tArg)
tTopobase. Topobase moniker.
tArg. Operation execution parameters.
The GetTopobase operation gets repository topobase metadata.
To execute the operation, in the tTopobase field specify repository topobase moniker, and in the tArg.pattern field specify the pattern that will be used to get metadata. The moniker is created based on the repository connection moniker and the topobase key.
The operation results in the obtained topobase metadata.
Below is the example of getting repository topobase metadata. The request contains a topobase moniker. The response contains the obtained metadata.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier section.
{
"GetTopobase" :
{
"tTopobase" :
{
"id" : "GCOCKNOMPMOBGOAEBGLLLOMGEAOLGNPEIJNENDGNBHAJJGPF!M!344691"
},
"tArg" :
{
"pattern" :
{
"topobase" : "Triangulate",
"availableFormats" : "true"
}
}
}
}
{
"GetTopobaseResult" :
{
"id" :
{
"id" : "GCOCKNOMPMOBGOAEBGLLLOMGEAOLGNPEIJNENDGNBHAJJGPF!M!344691"
},
"meta" :
{
"topobaseOd" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "OBJ344691",
"n" : "Luxembourg.svg",
"k" : "344691",
"c" : "3330",
"p" : "12417",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"topobase" :
{
"topobase" :
{
"@width" : "462px",
"@height" : "595px",
"layer" :
{
"@id" : "RootLayer",
"layer" :
{
"@id" : "Regions",
"shape" :
{
"@stroke-width" : "1",
"@fill" : "#F8DDBE",
"@stroke" : "#000000",
"@id" : "LU_0",
"points" :
{
"@borders" : "13",
"@data" : "264.548,0 363.729,33.125 330.733,99.181 363.729,198.491 462.846,396.789 462.846,529.225 396.982,595.28 231.422,595.28 66.057,562.22 66.057,363.858 0,231.422 66.056,66.055 198.363,0"
},
"triangles" :
{
"@data" : "0 1 2 0 2 3 3 4 5 3 5 6 3 6 7 3 7 8 3 8 9 3 9 10 3 10 11 3 11 12 0 3 12"
}
}
}
},
"metainfo" :
{
"geo" :
{
"geoItem" :
[
{
"@x" : "1",
"@y" : "0.3303",
"@longitude" : "361",
"@latitude" : "1"
},
{
"@x" : "0.2803",
"@y" : "1",
"@longitude" : "2",
"@latitude" : "2"
}
]
},
"attributes" :
{
"attribute" :
[
{
"@name" : "ISO",
"@type" : "string",
"data" :
{
"@id" : "LU",
"@value" : "LU"
}
},
{
"@name" : "Name",
"@type" : "string",
"data" :
[
{
"@id" : "LU",
"@value" : "Luxembourg"
},
{
"@id" : "Regions",
"@value" : "Regions"
},
{
"@id" : "RootLayer",
"@value" : "RootLayer"
}
]
},
{
"@name" : "Description",
"@type" : "string",
"data" :
{
"@id" : "LU",
"@value" : "Luxembourg"
}
},
{
"@name" : "IdMapping",
"@type" : "int",
"data" :
{
"@id" : "Regions",
"@value" : "2"
}
}
]
}
}
}
},
"availableFormats" :
{
"Item" :
[
"Svg",
"Google",
"Triangulate",
"Sphere"
]
}
}
}
}
public static GetTopobaseResult GetTopobase(MbId mb, string topobaseId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetTopobase()
{
tArg = new GetTopobaseArg()
{
pattern = new TopobaseMdPattern()
{
availableFormats = true,
topobase = TopobaseFormat.Triangulate
}
},
tTopobase = new TopobaseId()
{
id = mb.id + '!' + FindObjectById(mb, topobaseId).k
}
};
// Get topobase metadata
var tResult = somClient.GetTopobase(tGet);
return tResult;
}
See also: