Creating A Spatially Enabled Mysql Database - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

• A
GeometryCollection
GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))
12.16.3.2. Well-Known Binary (WKB) Format
The Well-Known Binary (WKB) representation for geometric values is defined by the OpenGIS
specification. It is also defined in the ISO SQL/MM Part 3: Spatial standard.
WKB is used to exchange geometry data as binary streams represented by
geometric WKB information.
WKB uses 1-byte unsigned integers, 4-byte unsigned integers, and 8-byte double-precision numbers
(IEEE 754 format). A byte is eight bits.
For example, a WKB value that corresponds to
(each represented here by two hex digits):
0101000000000000000000F03F000000000000F03F
The sequence may be broken down into these components:
Byte order : 01
WKB type
X
Y
Component representation is as follows:
• The byte order may be either 1 or 0 to indicate little-endian or big-endian storage. The little-endian
and big-endian byte orders are also known as Network Data Representation (NDR) and External
Data Representation (XDR), respectively.
• The WKB type is a code that indicates the geometry type. Values from 1 through 7 indicate
Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and
GeometryCollection.
• A
Point
WKB values for more complex geometry values are represented by more complex data structures, as
detailed in the OpenGIS specification.

12.16.4. Creating a Spatially Enabled MySQL Database

This section describes the data types you can use for representing spatial data in MySQL, and the
functions available for creating and retrieving spatial values.
12.16.4.1. MySQL Spatial Data Types
MySQL has data types that correspond to OpenGIS classes. Some of these types hold single geometry
values:
GEOMETRY
POINT
LINESTRING
POLYGON
can store geometry values of any type. The other single-value types (POINT, LINESTRING,
GEOMETRY
and POLYGON) restrict their values to a particular geometry type.
The other data types hold collections of values:
Creating a Spatially Enabled MySQL Database
consisting of two
: 01000000
: 000000000000F03F
: 000000000000F03F
value has X and Y coordinates, each represented as a double-precision value.
values and one LineString:
Point
consists of this sequence of 21 bytes
POINT(1 1)
984
values containing
BLOB

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents