diff --git a/autotest/gdrivers/jp2openjpeg.py b/autotest/gdrivers/jp2openjpeg.py index b5e6f375a95e..11dfba1ac7c7 100755 --- a/autotest/gdrivers/jp2openjpeg.py +++ b/autotest/gdrivers/jp2openjpeg.py @@ -2992,7 +2992,11 @@ def test_jp2openjpeg_tilesize_16(): def test_jp2openjpeg_generate_PLT(): +<<<<<<< HEAD # Only try the test with openjpeg >= 2.4.0 that supports it +======= + # Only try the rest with openjpeg >= 2.4.0 that supports it +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal) if gdaltest.jp2openjpeg_drv.GetMetadataItem('DMD_CREATIONOPTIONLIST').find('PLT') < 0: pytest.skip() @@ -3019,7 +3023,11 @@ def test_jp2openjpeg_generate_PLT(): def test_jp2openjpeg_generate_TLM(): +<<<<<<< HEAD # Only try the test with openjpeg >= 2.5.0 that supports it +======= + # Only try the rest with openjpeg >= 2.5.0 that supports it +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal) if gdaltest.jp2openjpeg_drv.GetMetadataItem('DMD_CREATIONOPTIONLIST').find('TLM') < 0: pytest.skip() @@ -3039,6 +3047,7 @@ def test_jp2openjpeg_generate_TLM(): gdaltest.jp2openjpeg_drv.Delete(filename) +<<<<<<< HEAD ############################################################################### @@ -3062,3 +3071,5 @@ def test_jp2openjpeg_STRICT_NO(): with gdaltest.error_handler(): assert ds.GetRasterBand(1).Checksum() == 5058 ds = None +======= +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal) diff --git a/doc/source/development/rfc/rfc80_numfocus_relationship.rst b/doc/source/development/rfc/rfc80_numfocus_relationship.rst index 3d2d0b13bedd..5f2aefdad3b3 100644 --- a/doc/source/development/rfc/rfc80_numfocus_relationship.rst +++ b/doc/source/development/rfc/rfc80_numfocus_relationship.rst @@ -9,9 +9,13 @@ Author: Even Rouault (with content from Chris Holmes) Contact: even.rouault @ spatialys.com Started: 2021-Apr-15 <<<<<<< HEAD:doc/source/development/rfc/rfc80_numfocus_relationship.rst +<<<<<<< HEAD:doc/source/development/rfc/rfc80_numfocus_relationship.rst Last modified: 2021-Jun-07 ======= >>>>>>> 98488c2119 (Merge pull request #3837 from bjornharrtell/fgb-flatbuffers-2.0):gdal/doc/source/development/rfc/rfc80_numfocus_relationship.rst +======= +Last modified: 2021-Jun-07 +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/doc/source/development/rfc/rfc80_numfocus_relationship.rst Status: Adopted ============== ============================================= diff --git a/doc/source/drivers/raster/nitf.rst b/doc/source/drivers/raster/nitf.rst index 3b0c1f83de2b..5d19ddaab02c 100644 --- a/doc/source/drivers/raster/nitf.rst +++ b/doc/source/drivers/raster/nitf.rst @@ -95,6 +95,7 @@ Creation Options: - C8 means JPEG2000 compression (one block) and is available for CreateCopy() and/or Create() methods. See below paragraph for specificities. +<<<<<<< HEAD:doc/source/drivers/raster/nitf.rst - **NUMI=n** : Number of images. Default = 1. See :ref:`Advanced GDAL NITF Driver Information ` for the procedure to follow to write several images in a NITF file. @@ -105,6 +106,10 @@ Creation Options: When WRITE_ALL_IMAGES=YES, the space for all images is allocated, which is only compatible with IC=NC (uncompressed images). (Behavior with GDAL < 3.4 was similar to WRITE_ALL_IMAGES=YES) +======= +- **NUMI=n** : Number of images. Default = + 1. This option is only compatible with IC=NC (uncompressed images). +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/doc/source/drivers/raster/nitf.rst - **ICORDS=G/D/N/S**: Set to "G" to ensure that space will be reserved for geographic corner coordinates (in DMS) to be set later via SetGeoTransform(), set to "D" for geographic coordinates in decimal @@ -183,7 +188,11 @@ JPEG2000 compression (write support) JPEG2000 compression is available when using the IC=C8 creation option, if the JP2ECW (SDK 3.3, or for later versions assuming the user has the key to +<<<<<<< HEAD:doc/source/drivers/raster/nitf.rst enable JPEG2000 writing), JP2KAK or JP2OpenJPEG driver are available. +======= +enable JPEG2000 writing), JP2KAK, JP2OpenJPEG or Jasper driver are available. +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/doc/source/drivers/raster/nitf.rst They are tried in that order when several ones are available, unless the JPEG2000_DRIVER creation option (added in GDAL 3.4) is set to explicitly specify @@ -213,6 +222,11 @@ the JPEG2000 capable driver to use. When those profiles are specified, the J2KLRA TRE will also be written, unless the J2KLRA=NO creation option is specified. +<<<<<<< HEAD:doc/source/drivers/raster/nitf.rst +======= +- Jasper JPEG2000 driver: only in the CreateCopy() case. + +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/doc/source/drivers/raster/nitf.rst Links ----- diff --git a/frmts/nitf/nitfdataset.cpp b/frmts/nitf/nitfdataset.cpp index 7771840adc92..e590d8e1bd69 100644 --- a/frmts/nitf/nitfdataset.cpp +++ b/frmts/nitf/nitfdataset.cpp @@ -68,12 +68,18 @@ static bool NITFPatchImageLength( const char *pszFilename, GUIntBig nImageOffset, GIntBig nPixelCount, const char *pszIC, +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp vsi_l_offset nICOffset, CSLConstList papszCreationOptions ); static bool NITFWriteExtraSegments( const char *pszFilename, CSLConstList papszCgmMD, CSLConstList papszTextMD, CSLConstList papszOptions ); +======= + CSLConstList papszCreationOptions ); +static bool NITFWriteCGMSegments( const char *pszFilename, char **papszList ); +static bool NITFWriteTextSegments( const char *pszFilename, char **papszList ); +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp #ifdef JPEG_SUPPORTED static bool NITFWriteJPEGImage( GDALDataset *, VSILFILE *, vsi_l_offset, char **, @@ -201,8 +207,13 @@ int NITFDataset::CloseDependentDatasets() nBands; CPL_IGNORE_RET_VAL( +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp NITFPatchImageLength( GetDescription(), m_nIMIndex, m_nImageOffset, nPixelCount, "C8", m_nICOffset, nullptr )); +======= + NITFPatchImageLength( GetDescription(), nImageStart, nPixelCount, + "C8", nullptr )); +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp } bJP2Writing = FALSE; @@ -4313,6 +4324,15 @@ NITFDataset::NITFCreateCopy( poJ2KDriver = GetGDALDriverManager()->GetDriverByName( "JP2OPENJPEG" ); } +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp +======= + if( poJ2KDriver == nullptr ) + { + /* Try with Jasper as an alternate driver */ + poJ2KDriver = + GetGDALDriverManager()->GetDriverByName( "JPEG2000" ); + } +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp } if( poJ2KDriver == nullptr ) { @@ -5088,6 +5108,7 @@ NITFDataset::NITFCreateCopy( GIntBig nPixelCount = nXSize * ((GIntBig) nYSize) * poSrcDS->GetRasterCount(); +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp bool bOK = NITFPatchImageLength( pszFilename, nIMIndex, nImageOffset, nPixelCount, @@ -5099,6 +5120,12 @@ NITFDataset::NITFCreateCopy( papszTextMD, papszFullOptions ); } +======= + bool bOK = NITFPatchImageLength( pszFilename, nImageOffset, nPixelCount, + "C8", papszFullOptions ); + bOK &= NITFWriteCGMSegments( pszFilename, papszCgmMD ); + bOK &= NITFWriteTextSegments( pszFilename, papszTextMD ); +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp if( !bOK ) { CSLDestroy(papszCgmMD); @@ -5156,6 +5183,7 @@ NITFDataset::NITFCreateCopy( NITFClose( psFile ); +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp bool bOK = NITFPatchImageLength( pszFilename, nIMIndex, nImageOffset, @@ -5167,6 +5195,13 @@ NITFDataset::NITFCreateCopy( papszTextMD, papszFullOptions ); } +======= + bool bOK = NITFPatchImageLength( pszFilename, nImageOffset, + nPixelCount, pszIC, papszFullOptions ); + + bOK &= NITFWriteCGMSegments( pszFilename, papszCgmMD ); + bOK &= NITFWriteTextSegments( pszFilename, papszTextMD ); +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp if( !bOK ) { CSLDestroy(papszCgmMD); @@ -5379,7 +5414,10 @@ static bool NITFPatchImageLength( const char *pszFilename, GUIntBig nImageOffset, GIntBig nPixelCount, const char *pszIC, +<<<<<<< HEAD:frmts/nitf/nitfdataset.cpp vsi_l_offset nICOffset, +======= +>>>>>>> 33d99249ed (Merge branch 'master' of github.com:OSGeo/gdal):gdal/frmts/nitf/nitfdataset.cpp CSLConstList papszCreationOptions ) { @@ -6690,8 +6728,12 @@ void NITFDriver::InitCreationOptionList() "