Re: [gdal-dev] WriteBlock() not supported using JP2ECW driver?

2024-02-07 Thread Even Rouault via gdal-dev

For future doc readers: https://github.com/OSGeo/gdal/pull/9211

Le 07/02/2024 à 20:45, Even Rouault via gdal-dev a écrit :

Scott,


I’m trying to create a JPEG2000 file using the JP2ECW driver, but I’m 
getting “WriteBlock() not supported…”.  The same code works using the 
PNM driver.


What am I missing?

This comment in the code 
https://github.com/OSGeo/gdal/blob/0255b1d767bbfc6910d8044e37019f1d1ea5a617/frmts/ecw/ecwcreatecopy.cpp#L1653 
which basically says that there's some form of Create() support in the 
JP2ECW driver but you need to write by scanline from top to bottom. 
The PNM, GTiff etc drivers implement full random-writing, which is 
what is required typically for gdalwarp. The workaround is either to 
modify the way you write the file (if you use the API), or if you use 
GDAL tools to write to an intermediate format (GeoTIFF) and then 
gdal_translate to JPEG2000 afterwards.


Even

--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] WriteBlock() not supported using JP2ECW driver?

2024-02-07 Thread Even Rouault via gdal-dev

Scott,


I’m trying to create a JPEG2000 file using the JP2ECW driver, but I’m 
getting “WriteBlock() not supported…”.  The same code works using the 
PNM driver.


What am I missing?

This comment in the code 
https://github.com/OSGeo/gdal/blob/0255b1d767bbfc6910d8044e37019f1d1ea5a617/frmts/ecw/ecwcreatecopy.cpp#L1653 
which basically says that there's some form of Create() support in the 
JP2ECW driver but you need to write by scanline from top to bottom. The 
PNM, GTiff etc drivers implement full random-writing, which is what is 
required typically for gdalwarp. The workaround is either to modify the 
way you write the file (if you use the API), or if you use GDAL tools to 
write to an intermediate format (GeoTIFF) and then gdal_translate to 
JPEG2000 afterwards.


Even

--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] WriteBlock() not supported using JP2ECW driver?

2024-02-07 Thread Reynolds, Scott via gdal-dev
Hi,

I'm trying to create a JPEG2000 file using the JP2ECW driver, but I'm getting 
"WriteBlock() not supported...".  The same code works using the PNM driver.

What am I missing?

Thanks,
Scott
Disclaimer

The information contained in this electronic message and any attachments to 
this message are intended only for the individual(s) addressed in the message 
and may contain proprietary and confidential information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender and delete this message. WARNING: Computer viruses can 
be transmitted via email. The recipient should scan this email before opening 
it. The company accepts no liability for any damage caused by any virus 
transmitted by this email.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev