vpf data viewer using opengl. about vpf vector product format - mil-std-2407 issued 28 june 1996...
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 ProjectionTRANSCRIPT
VPF Data ViewerUsing OpenGL
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
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
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.
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
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.
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
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
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
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.
Mercator Projection
Cylindrical Equal-Area
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.