FromWKB

Description

Converts a WKB (Well-known Binary) BLOB value to a feature geometry, such as a Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or Geometry Collection.

Note: This function is supported for both the MapInfo codespace and EPSG. Geometries designated by a "Z," "M," or "ZM" after the geometry type are not supported.

WKB is used to exchange geometry data as binary streams represented by BLOB values containing geometric WKB information. In WKB, for example, the geometry POINT(2.0 4.0) is represented as 000000000140000000000000004010000000000000.

Syntax

FromWKB (wkb,csys)

Arguments

wkb is a WKB BLOB, and

csys is a coordinate system specification.

Example

The following sample request returns a feature geometry from a WKB BLOB.

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns4="http://www.mapinfo.com/midev/service/feature/v1" xmlns:ns3="http://www.mapinfo.com/midev/service/featurecollection/v1"> 
     <S:Header/> 
     <S:Body> 
           <ns4:SearchBySQLRequest> 
                <ns4:SQL>select Country,Capital from "/Samples/NamedTables/WorldTable" where FromWKB(@geometry, 'epsg:4326') within Obj</ns4:SQL> 
                <ns4:BoundParameterList> 
                     <ns4:BoundParameter name="geometry"> 
                           <ns4:Value xsi:type="ns3:BinaryValue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
                                <ns3:Value>AQEAAAAAAAAAAMBSwAAAAAAAAEdA</ns3:Value> 
                           </ns4:Value> 
                     </ns4:BoundParameter> 
                </ns4:BoundParameterList> 
           </ns4:SearchBySQLRequest> 
     </S:Body> 
</S:Envelope>