NASA WorldWind Java ships with built-in parsers and writers for a broad range of geospatial file formats under theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nasaworldwind/worldwindjava/llms.txt
Use this file to discover all available pages before exploring further.
gov.nasa.worldwind.formats package hierarchy. Each sub-package targets a specific format family, from vector data (Shapefile, GeoJSON, VPF) to raster imagery (GeoTIFF, DDS, RPF) and GPS tracks (GPX, NMEA). When the optional native GDAL library is present, dozens of additional formats become available through GDALDataRasterReader.
Format Overview
| Package | Format | Key Classes |
|---|---|---|
formats/shapefile | ESRI Shapefile | Shapefile, ShapefileRecord, ShapefileLayerFactory |
formats/geojson | GeoJSON | GeoJSONDoc, GeoJSONGeometry, GeoJSONObject |
formats/tiff | GeoTIFF raster | GeotiffReader, GeotiffWriter, GeoTiff |
formats/dted | DTED elevation | DTEDRasterReader (in data package) |
formats/gpx | GPX GPS tracks | GpxReader, GpxTrack, GpxTrackPoint |
formats/nmea | NMEA-0183 sentences | NmeaReader, NmeaTrackPoint |
formats/rpf | CADRG/CIB raster maps | RPFFrameFilename, RPFTOCFile, RPFRasterReader |
formats/vpf | Vector Product Format | VPFDatabase, VPFCoverage, VPFFeatureClass |
formats/dds | DirectDraw Surface | DDSCompressor, DDSDecompressor |
formats/csv | CSV tabular data | CSVReader |
formats/georss | GeoRSS feeds | GeoRSSParser |
formats/worldfile | World file raster georef | WorldFile |
formats/nitfs | NITF image | NITFSImageBand, NITFSSegment |
With the native GDAL library present and configured (
AVKey.GDAL_PATH), GDALDataRasterReader additionally supports ECW, MrSID, JP2000, HDF, NetCDF, VRT, and any other GDAL-registered driver. See Data Raster API for GDAL details.Shapefile (formats/shapefile)
The Shapefile package provides full support for reading ESRI Shapefile (.shp/.dbf/.shx/.prj) vector datasets.
Classes
| Class | Description |
|---|---|
Shapefile | Top-level reader; iterates ShapefileRecord objects from a .shp file. |
ShapefileRecord | Base class for all record types; carries geometry and attribute reference. |
ShapefileRecordPoint | A single (x, y) point record. |
ShapefileRecordPolyline | One or more polyline parts, each a sequence of points. |
ShapefileRecordPolygon | One or more polygon rings with optional holes. |
ShapefileRecordMultiPoint | Multiple points in a single record. |
ShapefileRecordNull | Empty / null geometry record. |
DBaseFile | Opens the .dbf attribute table. |
DBaseRecord | A single row from the .dbf attribute table. |
DBaseField | Column metadata (name, type, length). |
ShapefileLayerFactory | High-level factory: creates a RenderableLayer or Layer from a Shapefile URL. |
ShapefilePolygons | Optimised rendering of polygon Shapefiles as a single Renderable. |
ShapefilePolylines | Optimised rendering of polyline Shapefiles. |
ShapefileExtrudedPolygons | Extrudes polygon footprints to 3D buildings using a height attribute. |
ShapefileRenderable | Base class for the optimised Shapefile renderables. |
ShapefileUtils | Utility methods (e.g., intersect sector, coordinate conversion). |
Reading a Shapefile
Opening a Shapefile and reading records
Factory-based Layer Creation
ShapefileLayerFactory — create a layer from URL
GeoJSON (formats/geojson)
The GeoJSON package parses RFC 7946-compliant GeoJSON documents.
GeoJSON — reading a document
GeoTIFF (formats/tiff)
The tiff sub-package provides a pure-Java GeoTIFF implementation independent of GDAL.
| Class | Description |
|---|---|
GeotiffReader | Reads GeoTIFF files into DataRaster (implements Disposable). |
GeotiffWriter | Writes BufferedImage or elevation data as a GeoTIFF with georeferencing. |
GeoTiff | Constants and helper methods for the GeoTIFF specification. |
GeotiffMetaData | Carries parsed georeferencing metadata (projection, tie-points, pixel scale). |
TIFFReader | Low-level TIFF baseline parser. |
GeotiffReader — reading imagery
GeotiffWriter — writing a georeferenced image
GPX (formats/gpx)
Reads GPS Exchange Format files (.gpx) for tracks, routes, and waypoints.
GPX — loading tracks
NMEA (formats/nmea)
Parses NMEA-0183 GPS sentences (e.g., from a serial GPS receiver or log file).
NMEA — reading track points from a file
RPF — Raster Product Format (formats/rpf)
RPF (MIL-STD-2411) encompasses CADRG topographic maps and CIB (Controlled Image Base) imagery used by military applications.
Key classes:
RPFTOCFile— reads theA.TOCtable-of-contents index file.RPFFrameFilename— decodes an RPF frame file name.RPFRasterReader— implementsDataRasterReaderfor individual frame files.RPFGenerator— generates aDataRastermosaic from a set of RPF frames.
VPF — Vector Product Format (formats/vpf)
VPF (MIL-STD-600006) is the military standard for vector topographic data.
Key classes:
VPFDatabase— opens a VPF database directory.VPFLibrary— a collection of coverages within a database.VPFCoverage— a thematic data layer (e.g., roads, hydrography).VPFFeatureClass— features within a coverage.
DDS (formats/dds)
DirectDraw Surface (.dds) is the preferred texture format for WorldWind’s tile cache because GPU-decompression (DXT1/DXT3/DXT5) reduces VRAM bandwidth.
DDSCompressor — compressing an image file
World File (formats/worldfile)
A world file (.jgw, .pgw, .tfw, etc.) georef-encodes a paired raster image file with a six-parameter affine transformation.
WorldFile — reading affine georeferencing