LayerIntersectByBox (ZWS)

Возвращает данные объектов слоя, попавших в заданную прямоугольную область. Только с версии ZuluServer 2021

Схема запроса:

  <xs:complexType name="typeBoundingBox">
        <xs:attribute name="CRS" type="typeCRS"/>
        <xs:attribute name="minx" type="xs:double"/>
        <xs:attribute name="miny" type="xs:double"/>
        <xs:attribute name="maxx" type="xs:double"/>
        <xs:attribute name="maxy" type="xs:double"/>
    </xs:complexType>

   <xs:complexType name="typeLayerIntersectByBox">
        <xs:all>
            <xs:element name="Layer" type="typeLayer"/>
            <xs:element name="BoundingBox" type="typeBoundingBox"/>
            <xs:element name="Relation" type="typeSpatialOperator" minOccurs="0"
                default="Intersects"/>            
            <xs:element name="Geometry" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Attr" type="typeFlag" minOccurs="0" default="Yes"/>
            <xs:element name="ModeList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="ModeImage" type="typeSampleImage" minOccurs="0"/>
            <xs:element name="QueryList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Queries" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Query" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:all>
                                    <xs:element name="BaseID" type="xs:integer"/>
                                    <xs:element name="Name" type="xs:string"/>
                                    <xs:element name="TypeID" type="xs:integer"/>
                                </xs:all>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
    </xs:complexType>
   

Схема ответа:

   	<xs:element name="zwsResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:choice minOccurs="0">
                    <xs:element name="LayerIntersectByBox" type="typeSelectElemByXYResponse"/>
                </xs:choice>
                <xs:element name="RetVal" type="xs:integer"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
	
	<xs:complexType name="typeLayerIntersectByBox">
        <xs:all>
            <xs:element name="Layer" type="typeLayer"/>
            <xs:element name="BoundingBox" type="typeBoundingBox"/>
            <xs:element name="Relation" type="typeSpatialOperator" minOccurs="0"
                default="Intersects"/>            
            <xs:element name="Geometry" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Attr" type="typeFlag" minOccurs="0" default="Yes"/>
            <xs:element name="ModeList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="ModeImage" type="typeSampleImage" minOccurs="0"/>
            <xs:element name="QueryList" type="typeFlag" minOccurs="0" default="No"/>
            <xs:element name="Queries" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Query" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:all>
                                    <xs:element name="BaseID" type="xs:integer"/>
                                    <xs:element name="Name" type="xs:string"/>
                                    <xs:element name="TypeID" type="xs:integer"/>
                                </xs:all>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
    </xs:complexType>
        

Пример запроса:

<?xml version="1.0" encoding="UTF-8"?>
<zulu-server service="zws" version="1.0.0">
  <Command>
    <LayerIntersectByBox>
      <Layer>riga:teplo</Layer>
      	<BoundingBox>
        	    <CRS>EPSG:3857</CRS>
      		<minx>7754552.83</minx>
      		<miny>2675036.21</miny>
      		<maxx>7754592.83</maxx>
      		<maxy>2675096.21</maxy>
		</BoundingBox>     
      <Relation>Intersects</Relation>      
      <Geometry>No</Geometry>
      <Attr>Yes</Attr>   
      <ModeList>No</ModeList>
      <QueryList>No</QueryList>      
    </LayerIntersectByBox>
  </Command>
</zulu-server>
   

Пример ответа:

         
<?xml version="1.0" encoding="UTF-8"?>
<zwsResponse>
    <LayerIntersectByBox>
        <Element>
            <ElemID>75729</ElemID>
            <TypeID>-1</TypeID>
            <ModeNum>-1</ModeNum>
            <Records>
                <BaseID>13</BaseID>
                <QueryName>Запрос1</QueryName>
                <Record>
                    <Field>
                        <Name>Sys</Name>
                        <UserName>Sys</UserName>
                        <Type>integer</Type>
                        <Key>true</Key>
                        <ReadOnly>true</ReadOnly>
                        <Value>75729</Value>
                    </Field>
                    <Field>
                        <Name>param1</Name>
                        <UserName>param1</UserName>
                        <Type>string</Type>
                        <Value>абвгд</Value>
                    </Field>
                    <Field>
                        <Name>param2</Name>
                        <UserName>param2</UserName>
                        <Type>float</Type>
                        <Value>12345</Value>
                    </Field>
                    <Field>
                        <Name>blob1</Name>
                        <UserName>blob1</UserName>
                        <Type>blob</Type>
                        <Value/>
                        <URL>http://zs.zulugis.ru:6473/zws/GetElemBlob/riga%3Ateplo/75729_Sys:75729/blob1/data.jpg?
                             BaseID=13&amp;QueryName=%D0%97%D0%B0%D0%BF%D1%80%D0%BE%D1%811</URL>
                    </Field>
                </Record>
            </Records>
        </Element>
        <Element>
            <ElemID>75802</ElemID>
            <TypeID>14</TypeID>
            <ModeNum>1</ModeNum>
            <Records>
                <Record>
                    <Field>
                        <Key>true</Key>
                        <ReadOnly>true</ReadOnly>
                        <Name>Sys</Name>
                        <UserName>Sys</UserName>
                        <Value>75802</Value>
                    </Field>
                </Record>
            </Records>
        </Element>
        <Element>
            <ElemID>75803</ElemID>
            <TypeID>15</TypeID>
            <ModeNum>1</ModeNum>
            <Records>
                <Record>
                    <Field>
                        <Key>true</Key>
                        <ReadOnly>true</ReadOnly>
                        <Name>Sys</Name>
                        <UserName>Sys</UserName>
                        <Value>75803</Value>
                    </Field>
                </Record>
            </Records>
        </Element>
    </LayerIntersectByBox>
    <RetVal>3</RetVal>
</zwsResponse>