Cannot write jpeg2000 with ERDAS 4.3 | GDAL 1.1

21 views
Skip to first unread message

Intergraph Geospatial Forum - Automated Email

unread,
Aug 4, 2013, 10:45:12 PM8/4/13
to erdas-communitie...@googlegroups.com

Cannot write jpeg2000 with ERDAS 4.3 | GDAL 1.1
By ngarel in ERDAS ECW JPEG2000 SDK

Using gdal 1.10 and ERDAS 4.3 I'm having problems when writing JP2 files.
It fails at
oError = CNCSJP2FileView::Open( &(m_OStream) );
in ecwcreatecopy.cpp.

I think the problem comes with the way ERDAS library handles m_OStream.

I commented this block just before trying to open the output file:
    // if( bIsJPEG2000 )
    // {
    //     int bSeekable = !
    //       ( strncmp(pszFilename, "/vsistdout/", strlen("/vsistdout/")) == 0 ||
    //         strncmp(pszFilename, "/vsizip/", strlen("/vsizip/")) == 0 ||
    //         strncmp(pszFilename, "/vsigzip/", strlen("/vsigzip/")) == 0 );
    //     fpVSIL = VSIFOpenL( pszFilename, (bSeekable) ? "wb+": "wb" );
    //     if( fpVSIL == NULL )
    //     {
    //         CPLError( CE_Failure, CPLE_OpenFailed,
    //                   "Failed to open %s.", pszFilename );
    //         return CE_Failure;
    //     }

    //     m_OStream.Access( fpVSIL, TRUE, bSeekable, pszFilename, 0, -1 );
    // }  

which makes it fall in
oError = Open( (char *) pszFilename, false, true );
instead and works perfectly.

What is the benefit of using m_OStream? and could you confirm that the same problem occurs with you?

Hopefully ERDAS 5.0 will fix this issue

----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS ECW JPEG2000 SDK.

To unsubscribe:

  1. To unsubscribe from this item only, visit the item link and turn off notifications.
  2. To stop all notifications of any updated items from Intergraph Geospatial Forum, go to Edit Profile, click on the Site Options tab, then under Email Configuration, set Send Notifications to "No".

Reply all
Reply to author
Forward
0 new messages