Detailed description of SHAPE File Format

Source: Internet
Author: User
Tags dbase polyline
Detailed description of the SHAPE file format:
SHAPE File Format
The SDE, ARC/INFO, pc arc/INFO, Data Automation Kit (DAK) and ArcCAD software provide a Data converter for shape to coverage, ARC/INFO also provides a coverage to shape converter. To exchange data with other data formats, the shape file format is published in this report. Other data streams, such as data from GPS receivers, can also be stored as shape files or X, Y event tables.
Shape file technology description a computer program can use the technical description in this section to generate, read, and write a shape file.
An ESRI shape file includes a master file, an index file, and a dBASE table. The main file is a direct access, variable record length file, where each record describes a shape with its own vertices list. In the index file, each record contains the offset from the beginning of the master file record. The dBASE table contains a feature of a record. The one-to-one correspondence between ry and attribute is based on the number of records. Attribute records in the dBASE file must be in the same order as those in the main file.
Naming Conventions: All file names comply with the naming conventions of 8.3. The primary file, index file, and dBASE file have the same prefix. The prefix must start with a character or number (a-Z, 0-9), followed by 0 to 7 characters (a-Z, 0-9 ,_,) the suffix of the main file is. shp. The suffix of the index file is. shx, the suffix of the dBASE table is. dbf. All the letters in the file name are in lowercase in the file name-sensitive operating system.
Example
Main file: counties. shp index file: counties. shx dBASE table: ounties. dbf numeric type A shape File Stores integers and Double Precision numbers. The remainder of this document refers to the following types:
Integer: A signed 32-bit integer (4 bytes)
Double Precision: The 64-bit IEEE Double Precision Floating Point Number (8 bytes) must be a numeric value. Negative infinity, positive infinity, and non-Numeric (NaN) values are not allowed in the shape file. However, the shape file supports the 'no data' value concept, but it is currently only used for measurement. Some smaller than-1038 values are read by the shape file program to represent 'no data' values.
The following section describes the overall structure and organization of the shape file. Section 2 describes the record content of each shape type supported by the shape file.

Main file organization
The main file (. shp) consists of a fixed-length file header and a subsequent variable-length record. Each variable-length record is composed of a fixed-length record header and subsequent variable-length record content. Figure 1 illustrates the structure of the master file.
Figure 1 Structure of the Master File
File Header
Record Content
Record Content
Record Content
Record Content
......
......
Record Content
All content in the Shape file can be classified into two types:
Data-related:
. Main file record content
. Data Description field of the Master File Header (Shape type, boundary box, etc)
Related to file management:
. File and record length
. Record offset, etc.
Integers and double-precision integers form a data description field in the file header. The Record Content in the main file is in the byte sequence of small ndian (PC or Intel. The remaining parts of the file and the integer and double-precision floating-point numbers of file management are in the byte order of large endian (Sun or Motorola.
Master File Header
The length of the master file header is 100 bytes. Table 1 shows the fields in the file header with the location, value, type, and byte sequence.
In this table, the location is relative to the start of the file.
Table 1 Description of the Master File Header
Location field value type byte sequence
0-Byte File Code 9994 large integer
The 4-byte value is not greater than the integer 0.
The 8-byte value is not greater than the integer 0.
The value of 12 bytes is not 0.
16 bytes are not 0 integer large
20 bytes not using 0 integer large
24-byte file length: large integer Length
28-byte version 1000 integer small
32-byte small integer of Shape type
36-byte boundary box Xmin with low dual precision
44-byte boundary box Ymin with low dual precision
52-byte boundary box Xmax with low dual precision
60-byte boundary box Ymax with low dual precision
68-byte * boundary box Zmin dual precision is small
76-byte * boundary box Zmax with low dual precision
84 bytes * limited boundary box Mmin dual precision
92 bytes * limited boundary box Mmax dual precision
* Not used. The value is 0.0. If it is not measured or Z axis.
The file length value is the total length of the file under 16 characters (including 50 16 characters that constitute the file header ). All non-empty shapes in the shape file must be of the same shape type. The values of the Shape type are as follows:
Value shape type
0 empty shape
1 point
3 multi-line
5 Polygon
More than 8
Z
13 multi-line Z
15 polygon Z
More than 18 Z
21: M
23 multi-line M
25 polygon M
More than 28 M
31 multi-plaque
The unspecified Shape type values (2, 4, 6, etc. until 33) are reserved for future use. Currently, the shape file is limited to the same shape type that contains the above definition. In the future, a shape file can contain more than one shape type. If the mixed shape type is implemented, the shape type in the file header identifies the file.
The boundary box of the main file header stores the actual size of the shape in the file. The smallest boundary X and Y (potential M, Z) rectangles contain all shapes. If the shape file is empty (no record exists), the values of min, Ymin, Xmax, and Ymax are not defined. Mmin and Mmax can contain the shape file to measure the 'no data' value of the shape type that does not contain the measurement (see the number type on page 2), record header
Each record header stores the number of records and the length of the record content. The record header has a fixed length of 8 bytes. Table 2 shows the location, value, type, and byte sequence of the fields in the file record header. In the table, the position is relative to the start of the record.
Table 2 Description of the master file record header file
Location field value type byte sequence
0-byte number of records an integer large number of records
4-byte Content Length Integer
The number of records starts from 1.
The content length of a record is measured by 16 characters. Therefore, each record contributes 16 characters to the total length of the file (4 + content length), just as the file header is 24 bytes.

Main file record content
The record content of the Shape file contains the geometric data of the shape type and the subsequent shape. The length of the record content depends on the number of parts in a shape and vertices. For each shape type, we first describe the shape and then its storage image on the disk. In tables 3 to 16, the position is relative to the record content.
Empty shape
Shape 0 represents an empty shape without geometric data, and each element type (point, line, polygon, etc.) supports null, vertices and null points in the same shape file are valid. Empty shape is often the place where objects are stored. It is used when a shape file is generated and is more widely used after being generated.
Table 3 empty shape Record Content
Location field value type count byte order
0-byte shape type 0 integer 1 small
Shape type at position X and Y
A vertex contains a pair of double-precision coordinates arranged in the order of X and Y.
Point
{
Double X // X coordinate
Double Y // Y coordinate
}
Table 4-point Record Content
Location field value type count byte order
0-byte shape type 1 integer 1 small
4-byte X dual precision 1 small
12 bytes Y dual precision 1 small
Multiple points represent a set of points:
MultiPoint
{
Double [4] Box // boundary Box
Integer NumPoints // number of points
Point [NumPoints] Points // Point in the Set
}
The boundary boxes are stored in Xmin, Ymin, Xmax, and Ymax.
Table 5 Multi-Point Record Content
Location field value type count byte order
0-byte shape type 8 Integer 1 small
4-byte Box Double Precision 4 small
36-byte NumPoints integer 1 small
40-byte Points point NumPoints small
A PolyLine is a set of vertices that contain one or more parts. One part refers to the order in which two or more vertices are connected to each other. The parts are connected or not connected to each other. Parts may or may not intersect.
Because the definition does not prohibit consecutive points with definite coordinates, the reading program of the shape file must master this situation. In addition, degenerate and zero-length results are not allowed.
PolyLine
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
}
The PolyLine domain is described in more detail below:
Boxes are stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts in PolyLine.
The total number of points in all parts of NumPoints.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex series for each PolyLine. The index of a Series starts from 0.
Points NumPoints length series. Vertices in each part of the PolyLine are stored at the end. The vertices of part 2 follow the vertices of Part 1. Partial columns maintain the index of the start point of each part.
There is no limit between some points.
Table 6 PolyLine Record Content
Location field value type count byte order
0-byte shape type 3 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Note: X = 44 + 4 * NumParts a polygon contains one or more rings. A ring is a closed non-Intersecting ring composed of four or more points connected to each other. A polygon may include multiple outer rings, vertices of a ring, and vertices of a direction indicate which side of the ring is inside the polygon. Vertices of the hole ring in the polygon is counterclockwise. A polygon composed of a ring is always clockwise. The ring of a polygon is used as a part of it. Because the definition does not prohibit consecutive points with definite coordinates, the reading program of the shape file must solve this problem. In addition, degenerate and zero-length results are not allowed. The polygon structure is defined as a PolyLine structure, as follows:
Polygon
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
}
The polygon domain is described in more detail below:
The boundary Box of the polygon stored in the Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts in the center of a polygon.
The total number of points in all NumPoints rings.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex sequence for each ring. The index of a Series starts from 0.
Points NumPoints length series. Vertices of each ring in a polygon are stored from the end to the end. The point of Ring 2 follows the point of ring 1. Some columns maintain the index of the start point of each ring. There is no boundary between points in the ring.
The example diagram in Figure 2 demonstrates the polygon performance. The polygon in this figure has a hole, which is a total of 8 vertices.

Important Notes for Polygon shape:
The ring is closed (the first vetex and the last vetex must be the same). The order of the ring in the point sequence is not important.
The polygon stored in the shape file must be clean. A clean polygon refers to such a polygon:
1. No self-crossing. This means that a part of a ring may not be in the same intersection with a part of another ring. A polygon
The rings may interwork with each other at vetices, but not at the edge segment. Overlapping segments are considered to be intersecting.
2. There is a polygon inside the correct side of the line defining the polygon. When an observer walks along the ring in vertex order, the neighbor on the right side is inside the polygon. Vertices of a single ring polygon are therefore clockwise. The holes in these polygon have a counter-clockwise direction. A "Dirty" polygon error occurs when the holes in the polygon are also clockwise. This causes internal overlap.
Figure 2 examples of a polygon
In this example, NumParts equals 2 and NumPoints equals 10. Note that the point order of the hole polygon is backward.
0 5
Score: 0 5
0 1 2 3 4 5 6 7 8 9
Point: v1 v2 v3 v4 v1 v5 v8 v7 v6 v5
Table 7 polygon Record Content
Location field value type count byte order
0-byte shape type 5 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Note: X = 44 + 4 * NumParts
In the X and Y spaces, there is an additional coordinate M for the constant shape type. Note that the "No data" value can be specified as a value of M.
PointM A PointM includes a pair of double-precision coordinates arranged in the order of X and Y, plus M.
PointM
{
Double X // X coordinate
Double Y // Y coordinate
Double M // M
}
Table 8 PointM Record Content
Location field value type count byte order
0-byte shape type 21 integer 1 small
4-byte X dual precision 1 small
12 bytes Y dual precision 1 small
20 bytes M dual precision 1 small
Multiple PointM a multiple PointM represents a set of PointM:
MultiPoint
{
Double [4] Box // boundary Box
Integer NumPoints // number of points
Point [NumPoints] Points // Point in the Set
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // Measure
}
The domain of multiple PointM is described in more detail below:
Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The total number of NumPoints points.
A series of Points NumPoints long Points.
M Range is the minimum and maximum values of multiple PointM stored in the order of Mmin and Mmax.
The M Array NumPoints Length Measurement Array.
Table 9 multi-PointM Record Content
Location field value type count byte order
0-byte shape type 28 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumPoints integer 1 small
40-byte Points point NumPoints small
X * bytes Mmin dual precision 1 small
X + 8 * bytes Mmax dual precision 1 small
X + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 40 + (16 * NumPoints) * optional
Multiple LineM of a shape file contains one or more parts. A set of ordered vertices that contains one or more parts. One part refers to the order in which two or more vertices are connected to each other. The parts are connected or not connected to each other. Parts may or may not intersect.
PolyLineM
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // measure of all vertices
}
The PolyLineM domain is described in more detail below:
The boundary Box of the PolyLineM stored in Xmin, Ymin, Xmax, and Ymax.
The number of NumParts in PolyLineM.
The total number of points in all parts of NumPoints.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex series for each PolyLineV. The index of a Series starts from 0.
Points NumPoints length series. Vertices in each part of PolyLineM are stored at the end. The vertices of part 2 follow the vertices of Part 1. Partial columns maintain the index of the start point of each part.
There is no limit between some points.
M Range is the minimum and maximum values of multiple PointM stored in the order of Mmin and Mmax.
M Array NumPoints long measurement Array, after each part of the multi-PointM is measured by the vertices of part 2 from the end to the end of the storage following the vertices of part 1, this goes on. Partial columns maintain the index of the start point of each part. There is no limit between some points.
Table 10 PolyLineM Record Content
Location field value type count byte order
0-byte shape type 23 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Y * bytes Mmin dual precision 1 small
Y + 8 * bytes Mmax dual precision 1 small
Y + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 44 + 4 * NumParts Y = 40 + (16 * NumPoints) * optional
Polygon M a polygon M contains one or more rings. A ring is a closed non-Intersecting ring composed of four or more points connected to each other. Note that the intersection is calculated in the X, Y space, not in the X, Y, and M space. A polygon may contain multiple outer rings, and the ring of a polygon is part of it.

The structure of polygon M is defined as a PolyLineM structure, as follows:
PolygonM
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // measure of all vertices
}
The domain of polygon M is described in more detail below:
The boundary Box of the polygon stored in the Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts in the center of the polygon M.
The total number of points in all NumPoints rings.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex sequence for each ring. The index of a Series starts from 0.
Points NumPoints length series. Vertices of each ring in a polygon are stored from the end to the end. The point of Ring 2 follows the point of ring 1. Some columns maintain the index of the start point of each ring. There is no boundary between points in the ring.
M Range is the minimum and maximum values of multiple PointM stored in the order of Mmin and Mmax.
M Array NumPoints long measurement Array, after each part of the multi-PointM is measured by the vertices of part 2 from the end to the end of the storage following the vertices of part 1, this goes on. Partial columns maintain the index of the start point of each part. There is no limit between some points.
Note the following for PolygonM shape:
The ring is closed (the first vetex and the last vetex must be the same). The order of the ring in the point sequence is not important.

Table 11 records of polygon M
Location field value type count byte order
0-byte shape type 5 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Y * bytes Mmin dual precision 1 small
Y + 8 * bytes Mmax dual precision 1 small
Y + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 44 + 4 * NumParts Y = 40 + (16 * NumPoints) * optional in X, Y, there is an additional coordinate M for the shape type of the scale in the Z space. Note that the "No data" value can be specified as a value of M.
PointZ A PointZ contains a pair of double-precision coordinates ordered by X, Y, and Z, plus M.
PointM
{
Double X // X coordinate
Double Y // Y coordinate
Double Z // Z coordinate
Double M // M
}
Table 12 PointZ Record Content
Location field value type count byte order
0-byte shape type 21 integer 1 small
4-byte X dual precision 1 small
12 bytes Y dual precision 1 small
20 bytes Z dual precision 1 small
28 bytes Measure M dual precision 1 small
Multiple PointZ multiple PointZ represents a set of PointZ:
MultiPoint
{
Double [4] Box // boundary Box
Integer NumPoints // number of points
Point [NumPoints] Points // Point in the Set
Double [2] upper and lower bounds of Z Range // Z
Double [NumPoints] Z Array // Z value
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // Measure
}
The boundary box is stored in the order of Xmin, Ymin, Xmax, and Ymax. Z Range is stored in the order of Mmin and Mmax, while M Range is stored in the order of Mmin and Mmax.
Table 9 multi-PointM Record Content
Location field value type count byte order
0-byte shape type 28 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumPoints integer 1 small
40-byte Points point NumPoints small
X-byte Zmin dual precision 1 small
X + 8 bytes Zmax dual precision 1 small
Small X + 16 bytes of Zarry with Double Precision NumPoints
Y * bytes Mmin dual precision 1 small
Y + 8 * bytes Mmax dual precision 1 small
Y + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 40 + (16 * NumPoints) Y = X + 16 + (8 * NumPoints) * optional
Multiple LineZ of a shape file contains one or more parts. A set of ordered vertices that contains one or more parts. One part refers to the order in which two or more vertices are connected to each other. The parts are connected or not connected to each other. Parts may or may not intersect.
PolyLineZ
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
Double [2] upper and lower bounds of Z Range // Z
Double [NumPoints] Z Array // Z value
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // measure of all vertices
}
The PolyLineZ domain is described in more detail below:
Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts in PolyLineZ.
The total number of points in all parts of NumPoints.
A series of Parts NumParts lengths. Store the index of the first vertex in the dot series for each PolyLineZ. The index of a Series starts from 0.
Points NumPoints length series. Vertices in each part of PolyLineZ are stored at the end. The vertices of part 2 follow the vertices of Part 1. Partial columns maintain the index of the start point of each part. There is no limit between some points.
ZRange is the minimum and maximum values of multiple PointZ stored in the order of Zmin and Zmax.
The Z Array NumPoints Length Measurement Array, after the measurement of each part of multi-PointZ is ended to the end, the point of Part 2 is stored after the point of Part 1. Partial columns maintain the index of the start point of each part. There is no limit between some points.
M Range is the minimum and maximum values of multiple PointZ stored in the order of Mmin and Mmax.
M Array NumPoints long measurement Array, after each part of multi-PointZ is measured by the vertices of part 2 from the end to the end of part 1, this goes on. Partial columns maintain the index of the start point of each part. There is no limit between some points.
Table 14 PolyLineZ Record Content
Location field value type count byte order
0-byte shape type 23 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Y-byte Zmin dual precision 1 small
Y + 8 bytes Zmax dual precision 1 small
Y + 16-byte Zarry with Double Precision NumPoints small
Z * bytes Mmin dual precision 1 small
Z + 8 * bytes Mmax dual precision 1 small
Z + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 44 + 4 * NumParts Y = X + (16 * NumPoints) Z = Y + 16 + (8 * NumPoints) * An optional polygon Z contains one or more rings. A ring is a closed non-Intersecting ring composed of four or more points connected to each other. A polygon may contain multiple outer rings. A polygon Z's ring is made part of it.
The structure of polygon Z is defined as a PolyLineZ structure, as follows:
PolygonZ
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Point [NumPoints] Points // Point of all parts
Double [2] upper and lower bounds of Z Range // Z
Double [NumPoints] Z Array // Z value
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // measure of all vertices
}
The domain of polygon Z is described in more detail below:
The boundary Box of the polygon stored in the Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts In the Z circle of the polygon.
The total number of points in all NumPoints rings.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex sequence for each ring. The index of a Series starts from 0.
Points NumPoints length series. Vertices of each ring in a polygon are stored from the end to the end. The point of Ring 2 follows the point of ring 1. Some columns maintain the index of the start point of each ring. There is no boundary between points in the ring.
ZRange is the minimum and maximum values of multiple PointZ stored in the order of Zmin and Zmax.
The Z Array NumPoints Length Measurement Array, after the measurement of each part of multi-PointZ is ended to the end, the point of Part 2 is stored after the point of Part 1. Partial columns maintain the index of the start point of each part. There is no limit between some points.
M Range is the minimum and maximum values of multiple PointZ stored in the order of Mmin and Mmax.
M Array NumPoints long measurement Array, after each part of multi-PointZ is measured by the vertices of part 2 from the end to the end of part 1, this goes on. Partial columns maintain the index of the start point of each part. There is no limit between some points.
Note the following for PolygonZ shape:
The ring is closed (the first vetex and the last vetex must be the same). The order of the ring in the point sequence is not important.

Record Content of Table 15 polygon Z
Location field value type count byte order
0-byte shape type 15 integer 1 small
4-byte Box Double Precision 4 small
36-byte NumParts integer 1 small
40-byte NumPoints integer 1 small
44-byte Parts integer NumParts small
X-byte Points NumPoints small
Y-byte Zmin dual precision 1 small
Y + 8 bytes Zmax dual precision 1 small
Y + 16-byte Zarry with Double Precision NumPoints small
Z * bytes Mmin dual precision 1 small
Z + 8 * bytes Mmax dual precision 1 small
Z + 16 * Small byte Marry with Double Precision NumPoints
Note: X = 44 + 4 * NumParts Y = X + (16 * NumPoints) Z = Y + 16 + (8 * NumPoints) * An optional Multi-Patch MultiPatch includes many surface patches. Each surface plaque describes a surface. The surface patches of A MultiPatch refer to the partial types that control how vertices order of a MultiPatch is interpreted. The MultiPatch part can be of the following types:
The connection band of a triangle. Here, each vertex (after the first two) completes a new triangle. A new triangle is always obtained by connecting the new top point and the two adjacent origins.
The connecting fan of a triangle. Here, each vertex (after the first two) completes a new triangle. A new triangle is always obtained by connecting the new vertex and the adjacent original vertex with the first vertex of the new vertex.
The outer ring of the outer ring polygon.
The hole in the inner ring polygon.
The first ring of an undefined polygon.
The ring of the polygon type is not defined.
A simple triangle band or triangle fan represents a simple surface plaque. See figure 3 for examples of these types. The sequence of the parts with loops can describe the polygon surface with holes. This sequence is typically composed of an outer ring, representing the outer boundary of the plaque, with many inner rings representing holes. When the individual ring representing the set of polygon patch rings with holes is unknown, the whole sequence starts with the first ring, followed by other rings. The sequence of loops that do not follow the first ring is considered a sequence of Outer Rings Without holes.

Figure 3 MultiPatch example
The values used to encode some types are:
Value Type
0 triangle strip
1 triangle fan
2 Outer Ring
3 Inner Ring
4. Step 1
5 rings
MultiPatch
{
Double [4] Box // boundary Box
Integer NumParts // number of parts
Integer NumPoints // the total number of points
Integer [NumParts] Parts // index of the first vertex in the part
Integer [NumParts] PartsTypes // some types
Point [NumPoints] Points // Point of all parts
Double [2] upper and lower bounds of Z Range // Z
Double [NumPoints] Z Array // Z value
Double [2] M Range // measure the upper and lower bounds of M
Double [NumPoints] M Array // measure of all vertices
}
The domain of polygon Z is described in more detail below:
The boundary Box of the polygon stored in the Box is stored in the order of Xmin, Ymin, Xmax, and Ymax.
The number of NumParts In the Z circle of the polygon.
The total number of points in all NumPoints rings.
A series of Parts NumParts lengths. Store the index of the first vertex in the vertex sequence for each ring. The index of a Series starts from 0.
PartsType NumParts length series, which stores the types of each part.
Points NumPoints length series. Vertices of each ring in a polygon are stored from the end to the end. The point of Ring 2 follows the point of ring 1. Some columns maintain the index of the start point of each ring. There is no boundary between points in the ring.
ZRange is the minimum and maximum values of multiple PointZ stored in the order of Zmin and Zmax.
The Z Array NumPoints Length Measurement Array, after the measurement of each part of multi-PointZ is ended to the end, the point of Part 2 is stored after the point of Part 1. Partial columns maintain the index of the start point of each part. There is no limit between some points.
M Range is the minimum and maximum values of multiple PointZ stored in the order of Mmin and Mmax.
M Array NumPoints long measurement Array, after each part of multi-PointZ is measured by the vertices of part 2 from the end to the end of part 1, this goes on. Partial columns maintain the index of the start point of each part. There is no limit between some points

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.