FromWKB - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

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>