# GeoElevationGrid

## Overview

GeoElevationGrid is a geometry node defining a rectangular height field, with default values for a 1m by 1m square at height 0. Vertices corresponding to GeoElevationGrid height values define quadrilaterals, which are placed above or below a curved geospatial surface using geographic coordinates.

The GeoElevationGrid node belongs to the **Geospatial** component and requires at least level **1,** its default container field is *geometry.* It is available from X3D version 3.0 or higher.

## Hierarchy

1
2
3

+ X3DNode
+ X3DGeometryNode
+ GeoElevationGrid

## Fields

### SFNode [in, out] **metadata** NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

#### Hint

### SFNode [ ] **geoOrigin** NULL [GeoOrigin] (deprecated)

Single contained GeoOrigin node that can specify a local coordinate frame for extended precision.

#### Hint

#### Warning

- XML validation requires placement as first child node following contained metadata nodes (if any).

### MFString [ ] **geoSystem** [ “GD”, “WE” ]

Identifies spatial reference frame: Geodetic (GD), Geocentric (GC), Universal Transverse Mercator (UTM). Supported values: “GD” “UTM” or “GC” followed by additional quoted string parameters as appropriate for the type.

#### Hints

- X3D Architecture 25.2.2 Spatial reference frames
- X3D Architecture 25.2.4 Specifying geospatial coordinates
- UTM is Universal Transverse Mercator coordinate system

#### Warning

- Deprecated values are GDC (replaced by GD) and GCC (replaced by GC).

### MFDouble [in] **set_height** (-∞,∞)

Contains xDimension rows * zDimension columns floating-point values for elevation above ellipsoid.

#### Hints

*height*array values are in row-major order from west to east, south to north.- GeoGridOrigin is in southwest (lower-left) corner of
*height*dataset. - This field is not accessType inputOutput since X3D browsers might use different underlying geometric representations for high-performance rendering, and so output events are not appropriate.

#### Warning

- It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.

### SFVec3d [ ] **geoGridOrigin** 0 0 0 (-∞,∞)

Geographic coordinate for southwest (lower-left) corner of height dataset.

### SFInt32 [ ] **xDimension** 0 (0,∞)

Number of elements in the height array along east-west X direction.

#### Hint

- Total horizontal x-axis distance equals (
*xDimension*-1) * xSpacing.

#### Warning

*xDimension*< 2 means that GeoElevationGrid contains no quadrilaterals.

### SFInt32 [ ] **zDimension** 0 (0,∞)

Number of elements in the height array along north-south Z direction.

#### Hint

- Total lateral z-axis distance equals (
*zDimension*-1) * zSpacing.

#### Warning

*zDimension*< 2 means that GeoElevationGrid contains no quadrilaterals.

### SFDouble [ ] **xSpacing** 1 [0,∞)

Distance between grid-array vertices along east-west X direction.

#### Hints

- When geoSystem is GDC,
*xSpacing*is number of degrees of longitude. - When geoSystem is UTM,
*xSpacing*is number of eastings (meters).

### SFDouble [ ] **zSpacing** 1 [0,∞)

Distance between grid-array vertices along north-south Z direction.

#### Hints

- When geoSystem is GDC,
*zSpacing*is number of degrees of latitude. - When geoSystem is UTM,
*zSpacing*is number of northings (meters).

### SFFloat [in, out] **yScale** 1 [0,∞)

Vertical exaggeration of displayed data produced from the height array.

### SFBool [ ] **solid** TRUE

Setting *solid* true means draw only one side of polygons (backface culling on), setting *solid* false means draw both sides of polygons (backface culling off).

#### Hints

- Mnemonic “this geometry is
*solid*like a brick” (you don’t render the inside of a brick). - If in doubt, use
*solid*=’false’ for maximum visibility. - AccessType relaxed to inputOutput in order to support animation and visualization.

#### Warning

- Default value true can completely hide geometry if viewed from wrong side!

### SFBool [ ] **ccw** TRUE

*ccw* defines clockwise/counterclockwise ordering of vertex coordinates, which in turn defines front/back orientation of polygon normals according to Right-Hand Rule (RHR).

#### Hints

- A good debugging technique for problematic polygons is to try changing the value of
*ccw*, which can reverse solid effects (single-sided backface culling) and normal-vector direction. - Clockwise

#### Warning

- Consistent and correct ordering of left-handed or right-handed point sequences is important throughout the coord array of point values.

### SFDouble [ ] **creaseAngle** 0 [0,∞)

*creaseAngle* defines angle (in radians) for determining whether adjacent polygons are drawn with sharp edges or smooth shading. If angle between normals of two adjacent polygons is less than *creaseAngle*, smooth shading is rendered across the shared line segment.

#### Hints

*creaseAngle*=0 means render all edges sharply,*creaseAngle*=3.14159 means render all edges smoothly.- Radian units for angular measure

#### Warning

- Note type double, unlike ElevationGrid
*creaseAngle*.

### SFBool [ ] **colorPerVertex** TRUE

Whether Color node color values are applied to each point vertex (true) or per quadrilateral (false).

#### Hint

### SFBool [ ] **normalPerVertex** TRUE

Whether Normal node vector values are applied to each point vertex (true) or per quadrilateral (false).

#### Hint

- If no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.

### SFNode [in, out] **color** NULL [X3DColorNode]

Single contained Color or ColorRGBA node that can specify *color* values applied to corresponding vertices according to colorPerVertex field.

### SFNode [in, out] **texCoord** NULL [X3DTextureCoordinateNode]

Single contained TextureCoordinate, TextureCoordinateGenerator or MultiTextureCoordinate node that can specify coordinates for texture mapping onto corresponding geometry.

### SFNode [in, out] **normal** NULL [X3DNormalNode]

Single contained Normal node that can specify perpendicular vectors for corresponding vertices to support rendering computations, applied according to the normalPerVertex field.

#### Hint

- Useful for special effects. Normal vector computation by 3D graphics hardware is quite fast so adding normals to a scene is typically unnecessary.

#### Warning

*normal*vectors increase file size, typically doubling geometry definitions.

### MFDouble [ ] **height** [ 0, 0 ] (-∞,∞)

Contains xDimension rows * zDimension columns floating-point values for elevation above ellipsoid.

#### Hints

*height*array values are in row-major order from west to east, south to north.- GeoGridOrigin is in southwest (lower-left) corner of
*height*dataset. - Default values do not make sense, this is a specification erratum (Mantis 1447), be sure to change them.
- This field is not accessType inputOutput since X3D browsers might use different underlying geometric representations for high-performance rendering, and so output events are not appropriate.

#### Warning

*height*array values are not retained or available at run time since a browser is permitted to condense geometry.

## Advice

### Hints

- The height array defines (xDimension-1)*(zDimension-1) quadrilaterals.
- Positive direction for normal of each triangle is on same side of the quadrilateral. Triangles are defined either counterclockwise or clockwise depending on value of ccw field.
- GeoElevationGrid can contain GeoOrigin, Color or ColorRGBA, Normal and TextureCoordinate nodes.
- Insert a Shape node before adding geometry or Appearance.
- X3D for Advanced Modeling (X3D4AM) slideset

### Warnings

- Generated quadrilaterals can be nonplanar. Tessellation splits quadrilaterals into triangles along seam starting at initial vertex of the quadrilateral and proceeding to opposite vertex.
- Requires X3D
`profile='Full'`

or else include`<component name='Geospatial' level='1'/>`

- Avoid having GeoLocation or GeoTransform as a parent or ancestor node of GeoElevationGrid, since multiple geospatial transformations then occur with unpredictable results.