PenMetrics GRD Reader/Writer

The PenMetrics GRD Reader/Writer allows FME to access PenMetrics GRaphical Drawing (GRD) 32-bit format files.

GRD files consist of drawing settings and configuration, as well as a series of vectors, or graphic elements, organized into layers. FME provides broad support for GRD vector types and options. In addition, when GRD data is output, header information may be copied from a supplied template or prototype file.

概述

The GRD 32-bit file format is the native file format for PenMetrics vector drawings used with applications such as FieldNotes.

GRD files may contain both two-dimensional (2D) and three-dimensional (3D) features. GRD files store feature geometries as well as user-defined attributes. There are 11 kinds of features as follows: points, lines, polylines (including polygons), rectangles, circles, ellipses, arcs, inserts, text, ink, and multi-segmented polylines.

FME looks for an extension of.grd.for the input GRD files, but accepts any GRD file as input regardless of the file name or extension. FME considers a GRD dataset to be a single PenMetrics GRD file. GRD files are binary files that consist of a combination of fixed and variable-length binary records.

在GRD文件本身内保留的信息包含在五个单独的部分中:

  • Header
  • Linetypes
  • Layers
  • Blocks
  • 层向量

The organization of GRD files closely parallels that of AutoCAD files.

GRD Entity Types and Descriptions

GRD读取器和写入器使用存储在数据文件中的不同实体类型的符号名称。这简化了特征类型规范。下表介绍了读者和写入器当前支持的每个不同GRD实体类型的简要说明。在后续部分中详细描述了实体。

FME grd_entity

Description

grd_line

Linear features stored within the GRD file as a line or unclosed polyline.

grd_point

Point features.

grd_ellipse

Features with an elliptical representation.

grd_circle

Features with an circular representation.

grd_polygon

Features whose geometry is represented by a closed polyline.

grd_arc

Features whose geometry represents a portion of a circular arc.

grd_rectangle.

Features with a closed rectangular geometry. The edges are vertical and horizontal only — no rotation.

grd_text.

Text features.

grd_ink

在文本属性中以二进制形式存储图像的墨水功能。

grd_mspline.

一组相关联的线作为多分段折线特征存储。

grd_insert

Point features that carry insert entity, or block, data.

Layers

GRD files use a layers concept to organize all features they contain. Every feature lies on one of the many layers that may be defined. Each layer has a unique name and defines colors, line styles, font styles, etc. for use with all features on that layer that do not have overriding settings. Layers may be either Drawing or Markup types. Every GRD file has the followingtwomandatory layers:

  • 层“0” - 绘图层
  • Layer “Markup 0” — the markup, or inking, layer

Any number of other layers may be defined by the user.

Linetypes

Linetypes are used to define the way line work is meant to be displayed. When reading from GRD files, several linetype specific attributes are given to each feature. Together they define the linetype that it is meant to be displayed with. When writing GRD files, these linetype specific attributes, if present, are stored as the linetype to use. By default, a linetype ofCONTINUOUSis used when writing GRD files.

A linetype definition has a name and a description that appears to the user. Usually the description shows what the linetype looks like by using underscores (‘_’) and spaces (‘ ’), for example: ““__ __ ______ . __ __”. The actual linetype definition consists of a series of dashes. There are a maximum of 12 dashes that can make up a linetype. Here is how the linetypes are represented:

  • Dash:积极的划线长度,长度是短划线的长度。
  • Space:负空间长度长度是空间的绝对值。
  • Dot:速度为零。

To represent this linetype ““__ __ ______ . __ __ ”, the following dashes would be necessary: 2, -2, 2, -2, 4, -2, 0, -2, 2, -2, 2, -2

如何在FME属性中表示本信息的详细信息在标题下的本节中找到Linetypes Representation.

GRD数字Color Associations

The numeric color values referred to in GRD files have the following associations:

GRD数字
Color Value

Description

0

black

1

blue

2

绿色

3

cyan

4

red

5

品红

6

brown

7

light gray

8

gray

9

light blue

10

light green

11

轻青色

12

light red

13

light magenta

14

yellow

15

white

16

visible (pen) or transparent (brush)

17

use layer’s color

18

使用块的颜色(仅适用于块实体)