GetTopobase

Syntax

GetTopobaseResult GetTopobase(TopobaseId tTopobase, GetTopobaseArg tArg)

Parameters

tTopobase. Topobase moniker.

tArg. Operation execution parameters.

Description

The GetTopobase operation gets repository topobase metadata.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetTopobase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTopobase xmlns="">
  <id>GCOCKNOMPMOBGOAEBGLLLOMGEAOLGNPEIJNENDGNBHAJJGPF!M!344691</id>
  </tTopobase>
<tArg xmlns="">
<pattern>
  <topobase>Triangulate</topobase>
  <availableFormats>true</availableFormats>
  </pattern>
  </tArg>
  </GetTopobase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetTopobaseResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>GCOCKNOMPMOBGOAEBGLLLOMGEAOLGNPEIJNENDGNBHAJJGPF!M!344691</id>
  </id>
<meta xmlns="">
<topobaseOd ds="" isShortcut="0" isLink="0" ver="3" hf="0">
  <i>OBJ344691</i>
  <n>Luxembourg.svg</n>
  <k>344691</k>
  <c>3330</c>
  <p>12417</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </topobaseOd>
<topobase>
<topobase width="462px" height="595px">
<layer id="RootLayer">
<layer id="Regions">
<shape id="LU_0" fill="#F8DDBE" stroke="#000000" stroke-width="1">
  <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" />
  </shape>
  </layer>
  </layer>
<metainfo>
<geo>
  <geoItem longitude="361" latitude="1" x="1" y="0.3303" />
  <geoItem longitude="2" latitude="2" x="0.2803" y="1" />
  </geo>
<attributes>
<attribute name="ISO" type="string">
  <data id="LU" value="LU" />
  </attribute>
<attribute name="Name" type="string">
  <data id="LU" value="Luxembourg" />
  <data id="Regions" value="Regions" />
  <data id="RootLayer" value="RootLayer" />
  </attribute>
<attribute name="Description" type="string">
  <data id="LU" value="Luxembourg" />
  </attribute>
<attribute name="IdMapping" type="int">
  <data id="Regions" value="2" />
  </attribute>
  </attributes>
  </metainfo>
  </topobase>
  </topobase>
<availableFormats>
  <Item>Svg</Item>
  <Item>Google</Item>
  <Item>Triangulate</Item>
  <Item>Sphere</Item>
  </availableFormats>
  </meta>
  </GetTopobaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetTopobase" :
{
"tTopobase" :
{
"id" : "GCOCKNOMPMOBGOAEBGLLLOMGEAOLGNPEIJNENDGNBHAJJGPF!M!344691"
},
"tArg" :
{
"pattern" :
{
"topobase" : "Triangulate",
"availableFormats" : "true"
}
}
}
}

JSON response:

{
"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:

Topobase: Operations