vpf data viewer using opengl. about vpf vector product format - mil-std-2407 issued 28 june 1996...

13
VPF Data Viewer Using OpenGL

Upload: meagan-harmon

Post on 17-Jan-2018

215 views

Category:

Documents


0 download

DESCRIPTION

Technical Overview Straightforward Approach Load data from VPF files Calculate XY points from data Draw lines on the screen Standard OpenGL commands Using GL_LINE_STRIP for lines Using Orthographic Projection

TRANSCRIPT

Page 1: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

VPF Data ViewerUsing OpenGL

Page 2: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

About VPFVector Product Format - MIL-STD-2407Issued 28 June 1996Consists of a combination of Vector data (for drawing) and Attribute data (for indexing)Widely supported, but rarely fully used. Very complicated to understand Base document is 128 pages, not including

appendices Inefficient storage mechanism

Page 3: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Technical OverviewStraightforward Approach Load data from VPF files Calculate XY points from data Draw lines on the screenStandard OpenGL commands Using GL_LINE_STRIP for lines Using Orthographic Projection

Page 4: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

ChallengesThere were problems faced during

this project that are common to most graphics based applications.

• Too much data• Converting Latitude/Longitude

points to X/Y screen locations.

Page 5: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

First Problem – Too much data

For example, the sample database downloaded from NIMA contained 544 MB of raw data. The process of removing extraneous objects from being drawn is known as culling.

There are many methods of culling commonly used in 3D graphics, including:

View-Frustum CullingBounding-Volume CullingBounding-Volume HierarchiesBackface CullingCells and PortalsLevels of Detail

Page 6: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

VPF Topology LevelsMethod of changing the level of detail in the VPF data.Included in the VPF specification.Effectively, the VPF database gives more information (lines and faces) when supplied with a higher VPF topology level.VPF specification supports 4 levels.

Page 7: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Level Name Primitives Description Example 3 2 1 0

Connected nodes, entity nodes, edges, and faces Entity nodes, connected nodes, and edges Entity nodes, connected nodes, and edges Entity nodes and edges

The surface is part- itioned by a set of mutually exclusive and collectively exhaustive faces. Edges meet only at nodes. A set of edges and nodes where, when projected onto a planar surface, the edges meet only at nodes. A set of entity nodes and edges that may meet at nodes. A set of entity nodes and edges. Edges contain only coordinates, not start and end nodes.

Full topology Planar graph Non- planar graph Boundary represen- tation

(spaghetti)

VPF

Leve

l s

Page 8: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

VPF TilesVPF specification uses tiles as an index to the data in a databaseThe tile definition consists of a minimum and maximum latitude and longitudeThe process is common across mapping applicationsMethod of View-Frustum Culling in a 2 dimensional environment

Page 9: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Untiled Coverage

Tiled Coverage

Tile ID=2 Tile ID=3

Tile ID=4 Tile ID=5 Tile ID=6

Tile ID=7 Tile ID=8 Tile ID=9

Tiles

Tile ID=1

VPF Tiling

Page 10: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Second Problem – Converting Lat/Lon points to X/Y points.

Mapping projection converts Lat/Lon to X/Y. Takes points on a sphere (Earth) and

projects them onto a flat surface (map). In use since Mercator presented the first

projection in 1569AD. Project uses an open-source library for

projections.OpenGL Viewport performs final conversion to screen coordinates.

Page 11: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Mercator Projection

Page 12: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Cylindrical Equal-Area

Page 13: VPF Data Viewer Using OpenGL. About VPF Vector Product Format - MIL-STD-2407 Issued 28 June 1996 Consists of a combination of Vector data (for drawing)

Island in Lake on Island•How to store the data so that only land area can be drawn?

•In drafting, this becomes the window in the wall problem.

•VPF solves this with ring tables.

Faces are made up of rings, starting with the outer-most ring and containing any number of inner rings.