LayerExecSQL (ZWS)

Выполняет SQL запрос к слою Zulu

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

  <xs:complexType name="typeLayerExecSQL">
        <xs:all>
            <xs:element name="Layer" type="typeLayer"/>
            <xs:element name="Query" type="xs:string"/>
            <xs:element name="CRS" type="typeCRS" minOccurs="0" maxOccurs="1" default="EPSG:3857"/>
        </xs:all>
    </xs:complexType>
   

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

 <xs:complexType name="typeLayerExecSQLResponse">
        <xs:all>
            <xs:element name="Records" type="typeRecords"/>
        </xs:all>
    </xs:complexType>  
        

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

<?xml version="1.0" encoding="UTF-8"?>
<zulu-server service="zws" version="1.0.0">
	<Command>
		<LayerExecSql>
			<Layer>riga:teplo</Layer>
			<Query>SELECT Sys,Geometry.AsText() where Sys=143 OR Sys=3378</Query>
                    <CRS>EPSG:4326</CRS>
		</LayerExecSql>
	</Command>
</zulu-server>
   

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

         
<?xml version="1.0" encoding="UTF-8"?>
<zwsResponse>
    <LayerExecSql>
        <Records>
            <Record>
                <Field>
                    <Name> Sys </Name>
                    <Value> 143 </Value>
                </Field>
                <Field>
                    <Name> Geometry </Name>
                    <Value> POINT(56.95237683334503 24.03602916212978) </Value>
                </Field>
            </Record>
            <Record>
                <Field>
                    <Name> Sys </Name>
                    <Value> 3378 </Value>
                </Field>
                <Field>
                    <Name> Geometry </Name>
                    <Value> LINESTRING(56.96114198632733 24.03543016538373,56.96118286253028
                        24.03478607840612,56.96093337208149 24.03452454676196,56.96103605433626
                        24.03419624903532,56.96096206652768 24.03373047962202,56.96044459706884
                        24.03243668846333) </Value>
                </Field>
            </Record>
        </Records>
    </LayerExecSql>
    <RetVal> 2 </RetVal>
</zwsResponse>