(GDAL >= 2.2.0)
This driver is an implementation of a JPEG2000 reader/writer based on Lurawave library.
The driver uses the VSI Virtual File API, so it can read JPEG2000 compressed NITF files.
Georeferencing information can come from different sources : internal (GeoJP2 or GMLJP2 boxes), worldfile .j2w/.wld sidecar files, or PAM (Persitant Auxiliary metadata) .aux.xml sidecar files. By default, information is fetched in following order (first listed is the most prioritary): PAM, GeoJP2, GMLJP2, WORLDFILE.
The allowed sources and their priority order can be changed with the GDAL_GEOREF_SOURCES configuration option (or GEOREF_SOURCES open option) whose value is a comma-separated list of the following keywords : PAM, GEOJP2, GMLJP2, INTERNAL (shortcut for GEOJP2,GMLJP2), WORLDFILE, NONE. First mentioned sources are the most prioritary over the next ones. A non mentioned source will be ignored.
For example setting it to "WORLDFILE,PAM,INTERNAL" will make a geotransformation matrix from a potential worldfile prioritary over PAM or internal JP2 boxes. Setting it to "PAM,WORLDFILE,GEOJP2" will use the mentioned sources and ignore GMLJP2 boxes.
The LURA_LICENSE_NUM_1 and LURA_LICENSE_NUM_2 configuration options / environment variables must be set with the 2 numbers that compose a license number.
GEOREF_SOURCES=string: Define which georeferencing sources are allowed and their priority order. See Georeferencing paragraph.
CODEC=JP2/Codestream : JP2 will add JP2 boxes around the codestream data. The value is determined automatically from the file extension. If it's neither JP2 nor Codestream, JP2 codec is used.
REVERSIBLE=YES/NO : YES means use of reversible 5x3 integer-only filter, NO use of the irreversible DWT 9-7. Defaults to NO.
LEVELS=int_value (0-16) : The number of wavelet transformation levels can be set using this property. Valid values are in the range 0 (no wavelet analysis) to 16 (very fine analysis). The memory requirements and compression time increases with the number of transformation levels. A reasonable number of transformation levels is in the 4-6 range. Default is 5.
QUANTIZATION_STYLE=DERIVED/EXPOUNDED : This property may only be set when the irreversible filter (9_7) is used. The quantization steps can either be derived from a bases quantization step, DERIVED, or calculated for each image sub-band, EXPOUNDED. The EXPOUNDED style is recommended when using the irreversible filter. Default is EXPOUNDED.
TILEXSIZE=int_value : Tile width. An image can be split into smaller tiles, with each tile independently compressed. The basic tile size and the offset to the first tile on the virtual compression reference grid can be set using these properties. The first tile must contain the first image pixel. The tiling of an image is recommended only for very large images. Default values: (0) One Tile containing the complete image. If the image dimension exceeds 15000x15000, it will be tiled with tiles of dimension 1024x1024.
TILEYSIZE=int_value : Tile height. An image can be split into smaller tiles, with each tile independently compressed. The basic tile size and the offset to the first tile on the virtual compression reference grid can be set using these properties. The first tile must contain the first image pixel. The tiling of an image is recommended only for very large images. Default values: (0) One Tile containing the complete image. If the image dimension exceeds 15000x15000, it will be tiled with tiles of dimension 1024x1024.
TLM=YES/NO: (TiLe Marker) The efficiency of decoding regions in a tiled image may be improved by " the usage of a tile length marker. Tile length markers contain the " position of each tile in a JPEG2000 codestream, enabling faster access " to tiled data. Default is NO.
PROGRESSION=LRCP/RLCP/RPCL/PCRL/CPRL : The organization of the coded data in the file can be set by this property tag. The following progression orders are defined: LRCP = Quality progressive, LCP = Resolution then quality progressive, RPCL = Resolution then position progressive, PCRL = Position progressive, CPRL = Color/channel progressive. The setting LRCP (quality) is most useful when used with several layers. The PCRL (position) should be used with precincts. Defaults to LRCP.
JPX=YES/NO: Whether to advertize JPX features, and add a Reader requirement box, when a GMLJP2 box is written (for GMLJP2 v2, the branding will also be "jpx "). Defaults to YES. This option should not be used unless compatibility problems with a reader occur.
CODEBLOCK_WIDTH=int_value: Codeblock width: power of two value between 4 and 1024. Defaults to 64. Note that CODEBLOCK_WIDTH * CODEBLOCK_HEIGHT must not be greater than 4096. For PROFILE_1 compatibility, CODEBLOCK_WIDTH must not be greater than 64.
CODEBLOCK_HEIGHT=int_value: Codeblock height: power of two value between 4 and 1024. Defaults to 64. Note that CODEBLOCK_WIDTH * CODEBLOCK_HEIGHT must not be greater than 4096. For PROFILE_1 compatibility, CODEBLOCK_HEIGHT must not be greater than 64.
ERROR_RESILIENCE=YES/NO: This option improves error resilient in JPEG2000 streams or for special codecs (e.g. hardware coder) for a faster compression/ decompression. This option will increase the file size slightly when generating a code stream with the same image quality. Default is NO.
WRITE_METADATA=YES/NO: Whether metadata should be written, in a dedicated JP2 'xml ' box. Defaults to NO. The content of the 'xml ' box will be like:
<GDALMultiDomainMetadata> <Metadata> <MDI key="foo">bar</MDI> </Metadata> <Metadata domain='aux_domain'> <MDI key="foo">bar</MDI> </Metadata> <Metadata domain='a_xml_domain' format='xml'> <arbitrary_xml_content> </arbitrary_xml_content> </Metadata> </GDALMultiDomainMetadata>If there are metadata domain whose name starts with "xml:BOX_", they will be written each as separate JP2 'xml ' box.
If there is a metadata domain whose name is "xml:XMP", its content will be written as a JP2 'uuid' XMP box.
MAIN_MD_DOMAIN_ONLY=YES/NO: (Only if WRITE_METADATA=YES) Whether only metadata from the main domain should be written. Defaults to NO.
USE_SRC_CODESTREAM=YES/NO: (EXPERIMENTAL!) When source dataset is JPEG2000, whether to reuse the codestream of the source dataset unmodified. Defaults to NO. Note that enabling that feature might result in inconsistent content of the JP2 boxes w.r.t. to the content of the source codestream. Most other creation options will be ignored in that mode. Can be useful in some use cases when adding/correcting georeferencing, metadata, ...
ogrinfo -ro my.jp2 INFO: Open of my.jp2' using driver `JP2Lura' successful. 1: FC_GridCoverage_1_rivers (LineString) 2: FC_GridCoverage_1_borders (LineString) 3: Annotation_1_poly
Feature collections can be linked from the GMLJP2 v2 box to a remote location. By default, the link is not followed. It will be followed if the open option OPEN_REMOTE_GML is set to YES.
Proper support of JPEG-2000 images with Int32/UInt32/Float32-IEEE754-split on Linux 64 bits require a v2.1.00.17 or later SDK.