{"id":6434,"date":"2023-10-05T15:17:18","date_gmt":"2023-10-05T14:17:18","guid":{"rendered":"https:\/\/www.geomatys.com\/?p=6434"},"modified":"2025-02-25T15:00:38","modified_gmt":"2025-02-25T14:00:38","slug":"geotiff-reader-writer-performance-comparison","status":"publish","type":"post","link":"https:\/\/www.geomatys.com\/en\/2023\/10\/05\/geotiff-reader-writer-performance-comparison\/","title":{"rendered":"GeoTIFF reader\/writer performance comparison"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"6434\" class=\"elementor elementor-6434\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-43f9dfe2 elementor-section-full_width elementor-section-height-default elementor-section-height-default exad-glass-effect-no wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no exad-sticky-section-no\" data-eae-slider=\"60382\" data-id=\"43f9dfe2\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7ef17db5 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"28718\" data-id=\"7ef17db5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-63d244d exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-shortcode\" data-id=\"63d244d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"8583\" class=\"elementor elementor-8583\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ed073a7 elementor-section-full_width elementor-section-height-default elementor-section-height-default exad-glass-effect-no wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-equal-height-no exad-sticky-section-no\" data-eae-slider=\"96689\" data-id=\"ed073a7\" data-element_type=\"section\" data-e-type=\"section\" id=\"header\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;,&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-7ab1d90 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"25433\" data-id=\"7ab1d90\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a2d436c exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"a2d436c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.geomatys.com\/en\/\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"300\" height=\"58\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?fit=300%2C58&amp;ssl=1\" class=\"attachment-medium size-medium wp-image-3137\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?w=982&amp;ssl=1 982w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?resize=300%2C58&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?resize=768%2C148&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?w=188&amp;ssl=1 188w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-53d36e8 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"97346\" data-id=\"53d36e8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-49481ed wpr-main-menu-align-center wpr-main-menu-align--tablet_extraleft wpr-main-menu-align--tabletleft wpr-main-menu-align--mobileleft wpr-pointer-underline wpr-pointer-line-fx wpr-pointer-fx-fade wpr-sub-icon-caret-down wpr-sub-menu-fx-fade wpr-nav-menu-bp-tablet wpr-mobile-menu-display-dropdown wpr-mobile-menu-full-width wpr-mobile-toggle-v1 wpr-sub-divider-yes wpr-mobile-divider-yes exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-wpr-mega-menu\" data-id=\"49481ed\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;menu_layout&quot;:&quot;horizontal&quot;}\" data-widget_type=\"wpr-mega-menu.default\">\n\t\t\t\t\t<nav class=\"wpr-nav-menu-container wpr-mega-menu-container wpr-nav-menu-horizontal\" data-trigger=\"hover\"><ul id=\"menu-1-49481ed\" class=\"wpr-nav-menu wpr-mega-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-7251\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-logicielles\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>Softwares<\/span><i class=\"wpr-sub-icon fas\" aria-hidden=\"true\"><\/i><\/a>\n<ul  class=\"sub-menu wpr-sub-menu\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-8212\"><a target=\"_blank\" href=\"http:\/\/www.examind.com?utm_source=geomatys\" class=\"wpr-sub-menu-item\"><span>Examind Suite<\/span><\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7250\"><a href=\"https:\/\/www.geomatys.com\/en\/apache-sis\/\" class=\"wpr-sub-menu-item\"><span>Apache-SIS<\/span><\/a><\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-7253\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>Services<\/span><i class=\"wpr-sub-icon fas\" aria-hidden=\"true\"><\/i><\/a>\n<ul  class=\"sub-menu wpr-sub-menu\">\n\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-9571\"><a href=\"https:\/\/www.geomatys.com\/en\/vigiearth\/\" class=\"wpr-sub-menu-item\"><span>VigiEarth<\/span><\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7254\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/aqualit\/\" class=\"wpr-sub-menu-item\"><span>AQUALIT<\/span><\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7830\"><a href=\"https:\/\/www.geomatys.com\/en\/shoreint\/\" class=\"wpr-sub-menu-item\"><span>ShoreInt &#8211; OPAT<\/span><\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7256\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/epiwise\/\" class=\"wpr-sub-menu-item\"><span>EpiWise<\/span><\/a><\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7259\"><a href=\"https:\/\/www.geomatys.com\/en\/qui-sommes-nous\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>The company<\/span><\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-8317\"><a href=\"https:\/\/www.geomatys.com\/en\/rse\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>CSR<\/span><\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7258\"><a href=\"https:\/\/www.geomatys.com\/en\/contact\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>Contact Us<\/span><\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-8286\"><a href=\"https:\/\/www.geomatys.com\/en\/blog\/\" class=\"wpr-menu-item wpr-pointer-item\"><span>Blog<\/span><\/a><\/li>\n<li class=\"trp-language-switcher-container menu-item menu-item-type-post_type menu-item-object-language_switcher current-language-menu-item menu-item-8210\"><a href=\"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts\/6434\" class=\"wpr-menu-item wpr-pointer-item\"><span><span data-no-translation><img data-recalc-dims=\"1\" decoding=\"async\" class=\"trp-flag-image\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/plugins\/translatepress-multilingual\/assets\/images\/flags\/fr_FR.png?resize=18%2C12&#038;ssl=1\" width=\"18\" height=\"12\" alt=\"fr_FR\" title=\"French\"><span class=\"trp-ls-language-name\">FR<\/span><\/span><\/span><\/a><\/li>\n<\/ul><\/nav><nav class=\"wpr-mobile-nav-menu-container\"><div class=\"wpr-mobile-toggle-wrap\"><div class=\"wpr-mobile-toggle\"><span class=\"wpr-mobile-toggle-line\"><\/span><span class=\"wpr-mobile-toggle-line\"><\/span><span class=\"wpr-mobile-toggle-line\"><\/span><\/div><\/div><div class=\"wpr-mobile-mega-menu-wrap\" toggle-backface=\"\"><ul id=\"mobile-menu-2-49481ed\" class=\"wpr-mobile-nav-menu wpr-mobile-mega-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-7251\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-logicielles\/\" class=\"wpr-mobile-menu-item\">Softwares<i class=\"wpr-mobile-sub-icon\"><\/i><\/a>\n<ul  class=\"sub-menu wpr-mobile-sub-menu\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-8212\"><a target=\"_blank\" href=\"http:\/\/www.examind.com?utm_source=geomatys\" class=\"wpr-mobile-sub-menu-item\">Examind Suite<\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7250\"><a href=\"https:\/\/www.geomatys.com\/en\/apache-sis\/\" class=\"wpr-mobile-sub-menu-item\">Apache-SIS<\/a><\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-7253\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/\" class=\"wpr-mobile-menu-item\">Services<i class=\"wpr-mobile-sub-icon\"><\/i><\/a>\n<ul  class=\"sub-menu wpr-mobile-sub-menu\">\n\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-9571\"><a href=\"https:\/\/www.geomatys.com\/en\/vigiearth\/\" class=\"wpr-mobile-sub-menu-item\">VigiEarth<\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7254\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/aqualit\/\" class=\"wpr-mobile-sub-menu-item\">AQUALIT<\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7830\"><a href=\"https:\/\/www.geomatys.com\/en\/shoreint\/\" class=\"wpr-mobile-sub-menu-item\">ShoreInt &#8211; OPAT<\/a>\t<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7256\"><a href=\"https:\/\/www.geomatys.com\/en\/solutions-metier\/epiwise\/\" class=\"wpr-mobile-sub-menu-item\">EpiWise<\/a><\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7259\"><a href=\"https:\/\/www.geomatys.com\/en\/qui-sommes-nous\/\" class=\"wpr-mobile-menu-item\">The company<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-8317\"><a href=\"https:\/\/www.geomatys.com\/en\/rse\/\" class=\"wpr-mobile-menu-item\">CSR<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-7258\"><a href=\"https:\/\/www.geomatys.com\/en\/contact\/\" class=\"wpr-mobile-menu-item\">Contact Us<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-8286\"><a href=\"https:\/\/www.geomatys.com\/en\/blog\/\" class=\"wpr-mobile-menu-item\">Blog<\/a><\/li>\n<li class=\"trp-language-switcher-container menu-item menu-item-type-post_type menu-item-object-language_switcher current-language-menu-item menu-item-8210\"><a href=\"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts\/6434\" class=\"wpr-mobile-menu-item\"><span data-no-translation><img data-recalc-dims=\"1\" decoding=\"async\" class=\"trp-flag-image\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/plugins\/translatepress-multilingual\/assets\/images\/flags\/fr_FR.png?resize=18%2C12&#038;ssl=1\" width=\"18\" height=\"12\" alt=\"fr_FR\" title=\"French\"><span class=\"trp-ls-language-name\">FR<\/span><\/span><\/a><\/li>\n<\/ul><\/div><\/nav>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-5cd25c2 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"8648\" data-id=\"5cd25c2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d0045dd elementor-section-boxed elementor-section-height-default elementor-section-height-default exad-glass-effect-no wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no exad-sticky-section-no\" data-eae-slider=\"47984\" data-id=\"d0045dd\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4bb00e4 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"12370\" data-id=\"4bb00e4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-913d099 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"913d099\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">GeoTIFF reader\/writer performance comparison<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c4819f4 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"c4819f4\" data-element_type=\"widget\" data-e-type=\"widget\" data-no-translation=\"\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t<style>.elementor-element-c4819f4{display:none !important}<\/style>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fb2b099 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"fb2b099\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"https:\/\/sis.apache.org\">Apache Spatial Information System (<abbr>SIS<\/abbr>)<\/a>\u00a0version 1.4 contains a Cloud Optimized GeoTIFF (<abbr>COG<\/abbr>) reader for raster data. The development branch of Apache\u00a0<abbr>SIS<\/abbr>\u00a01.5 (not yet released at the time of writing this blog) contains also a GeoTIFF writer. Those reader and writer are implemented in pure Java code for avoiding the difficulty of bindings to native libraries such as\u00a0<abbr>GDAL<\/abbr>. Pure Java code also provides more flexibility for Java developers. For example, the Apache\u00a0<abbr>SIS<\/abbr>\u00a0reader accepts any implementation of the Java\u00a0<code>ReadableByteChannel<\/code>\u00a0standard interface as the source of bytes. Another reason for developing GeoTIFF reader and writer in Java was for prototyping the use of new GeoTIFF keys that are proposed in\u00a0<a href=\"https:\/\/www.ogc.org\/initiatives\/t-19\/\">OGC TestBed-19 \u2014 Geospatial in space<\/a>.<\/p><p>Coding yet another GeoTIFF reader and writer seems a duplication of work, since most of the geospatial world uses the popular\u00a0<abbr>GDAL<\/abbr>\u00a0library for that purpose. But actually, from Apache\u00a0<abbr>SIS<\/abbr>\u00a0perspective, there is not so much duplication. The most difficult part in a GeoTIFF reader and writer is to handle tiling and compression efficiently. But this task is largely format-independent, and\u00a0<abbr>SIS<\/abbr>\u00a0needs also to handle netCDF and other formats. The Apache\u00a0<abbr>SIS<\/abbr>\u00a0library shares code internally, thus reducing the task of GeoTIFF support to header parsing. By contrast,\u00a0<abbr>GDAL<\/abbr>\u00a0is largely an aggregation of independent libraries such as\u00a0<code>libtiff<\/code>\u00a0and\u00a0<code>libpng<\/code>, each with their own ways to resolve common problems.<\/p><p>Nevertheless, coding GeoTIFF support in Java raises questions about how its performances compare to\u00a0<abbr>GDAL<\/abbr>. There is a widespread belief that Java programs are slower than their C\/C++ counterpart. In reality, it depends a lot on the kind of application and how the libraries were coded. Differences in algorithms can play a bigger role than differences in the programming languages. This blog will not answer that debate, because the benchmarks presented here depend a lot on native code, either for I\/O operations or for\u00a0<code>DEFLATE<\/code>\u00a0compression (the latter is handled by native code in the\u00a0<code>java.util.zip<\/code>\u00a0standard package). However, the benchmarks in this blog demonstrate the capability of a Java program to avoid adding overhead. The result is that Apache\u00a0<abbr>SIS<\/abbr>, at least in those benchmarks, compares favorably with\u00a0<abbr>GDAL<\/abbr>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-7655d87 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"52503\" data-id=\"7655d87\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-fb366cd exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"fb366cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Method<\/h2>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-de4f7d5 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"69537\" data-id=\"de4f7d5\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1814d60 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"1814d60\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The benchmarks reported in this blog are very limited and only scratch the surface on the topic of raster data handling:<\/p><ul><li>All benchmarks were tested with a single image (in two variants).<\/li><li>Only one compression method tested (in two variants), together with uncompressed raster.<\/li><li>No sub-regions and no sub-samplings tested (there is no technical reasons for this omission).<\/li><li>Multi-thread parallelization not tested (would have required some more developments in Apache\u00a0<abbr>SIS<\/abbr>).<\/li><\/ul><p>Sub-regions and requests for reduced resolutions on\u00a0<abbr>COG<\/abbr>\u00a0images should be handled efficiently by Apache\u00a0<abbr>SIS<\/abbr>, but benchmarking those features would have required a more complex setup, especially if we want to test in a cloud environment. The simple benchmarks in this blog used a single image which was always read fully, from a local file on a laptop. The image was a single non-<abbr>COG<\/abbr>\u00a0raster with the following properties:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-0f68bdb e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"21297\" data-id=\"0f68bdb\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-9bc0f3f e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-child\" data-eae-slider=\"10616\" data-id=\"9bc0f3f\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3508cb7 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"3508cb7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Raster Thumbnail<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-bb1c19a e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-child\" data-eae-slider=\"6406\" data-id=\"bb1c19a\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e8aa23a exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"e8aa23a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Raster Properties<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-3a387f6 e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-child\" data-eae-slider=\"68463\" data-id=\"3a387f6\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-955e2fe exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"955e2fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"256\" height=\"256\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/11\/GeoTIFF.jpg?fit=256%2C256&amp;ssl=1\" class=\"attachment-full size-full wp-image-6435\" alt=\"GeoTIFF\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/11\/GeoTIFF.jpg?w=256&amp;ssl=1 256w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/11\/GeoTIFF.jpg?resize=150%2C150&amp;ssl=1 150w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-8b508ba e-con-full e-flex wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-child\" data-eae-slider=\"51825\" data-id=\"8b508ba\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-12c472b exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"12c472b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<table><tbody><tr><td>Producer:<\/td><td>DigitalGlobe<\/td><\/tr><tr><td>Image date:<\/td><td>2014\/06\/16<\/td><\/tr><tr><td>File size:<\/td><td>192 Mb<\/td><\/tr><tr><td>Image size:<\/td><td>8192 \u00d7 8192 pixels<\/td><\/tr><tr><td>Strip size:<\/td><td>8192 \u00d7 128 pixels<\/td><\/tr><tr><td>Sample model:<\/td><td>banded (3 separated arrays of red, green and blue).<\/td><\/tr><tr><td>Sample type:<\/td><td>bytes, values ranging from 2 to 255.<\/td><\/tr><tr><td>Compression:<\/td><td>None<\/td><\/tr><tr><td><abbr>CRS<\/abbr>:<\/td><td>WGS 84 \/ UTM zone 31N<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-36f8bac e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"80943\" data-id=\"36f8bac\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-875be3f exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"875be3f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The image was read and rewritten using three libraries:\u00a0<code>gdal_translate<\/code>, Java Image I\/O and Apache\u00a0<abbr>SIS<\/abbr>. For each library, the read\/write operations were repeated 10 times in order to allow the Java Virtual Machine to warmup. The two first iterations were ignored, and execution time of the remaining 8 iterations were recorded. Average times and standard deviations are reported in this blog. In the particular case of the\u00a0<abbr>GDAL<\/abbr>\u00a0library, the execution time of\u00a0<code>gdalinfo<\/code>\u00a0has also been measured and its average value has been subtracted from all\u00a0<code>gdal_translate<\/code>\u00a0times. The intend is to take in account the time needed for loading the\u00a0<abbr>GDAL<\/abbr>\u00a0binary, or at least the parts required for reading the image header (it also incidentally includes the time for parsing that header). We apply this correction because our benchmark code relaunches the\u00a0<abbr>GDAL<\/abbr>\u00a0command in each iteration, contrarily to Image I\/O and Apache\u00a0<abbr>SIS<\/abbr>\u00a0libraries which are loaded only during their first iteration. The benchmark code is\u00a0<a href=\"https:\/\/github.com\/Geomatys\/sis-benchmarks\">available on GitHub<\/a>\u00a0in the\u00a0<code>GeoTIFF.java<\/code>\u00a0file. The processor of the test machine was Intel Core i7-8750H and the operating system was Fedora Linux 38 (Workstation Edition). Read and write operations were performed in the\u00a0<code>\/tmp\/<\/code>\u00a0directory, which uses the\u00a0<code>tmpfs<\/code>\u00a0file system. It means that the raster files reside partially in\u00a0<abbr>RAM<\/abbr>, so the benchmarks have less delay caused by I\/O operations.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-9b795bc e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"59816\" data-id=\"9b795bc\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-98a983f exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"98a983f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Method with deflate compression<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f37298 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"9f37298\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The same tests were executed again with the\u00a0<code>DEFLATE<\/code>\u00a0compression. That compression is performed by the\u00a0<code>zlib<\/code>\u00a0library, accessible in standard Java thought the\u00a0<code>java.util.zip<\/code>\u00a0package. However, the\u00a0<code>zlib<\/code>\u00a0performance varies greatly depending on the data to compress. For fair comparisons, we must ensure that all the tested libraries write the same data. It is not the case by default because:<\/p><ul><li><abbr>GDAL<\/abbr>\u00a0and Java Image I\/O change the sample model from \u00ab\u00a0banded\u00a0\u00bb to \u00ab\u00a0pixel interleaved\u00a0\u00bb.<\/li><li><abbr>GDAL<\/abbr>\u00a0changes the strip height from 128 pixels to 1 pixel, thus writing strips of 8 kb.<\/li><li>Java Image I\/O changes the strip height from 128 pixels to 8 pixels, thus writing strips of 64 kb.<\/li><li>Apache\u00a0<abbr>SIS<\/abbr>\u00a0keeps the sample model and strips height as they were in the image that was read.<\/li><\/ul><p>For avoiding those differences, the input image has been rewritten by Apache\u00a0<abbr>SIS<\/abbr>\u00a0with a \u00ab\u00a0pixel interleaved\u00a0\u00bb sample model and strips of 8 pixels in height. In addition, the\u00a0<code>-co BLOCKYSIZE=8<\/code>\u00a0option has been passed to\u00a0<code>gdal_translate<\/code>. A\u00a0<code>DEFLATE<\/code>\u00a0compression has been applied, so the tests will include decompression times in addition of compression times.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-c74bc33 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"61138\" data-id=\"c74bc33\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-26ffea9 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"26ffea9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Results<\/h2>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-aa1a237 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"38372\" data-id=\"aa1a237\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a24ff5c exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"a24ff5c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>First, we tested reading the uncompressed image and rewriting it uncompressed too. Average execution times are reported below. The \u00ab\u00a0<abbr>GDAL<\/abbr>\u00a0(reduced)\u00a0\u00bb label means that the average execution time of\u00a0<code>gdalinfo<\/code>\u00a0has been subtracted from the execution time of\u00a0<code>gdal_translate<\/code>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-b816f69 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"94145\" data-id=\"b816f69\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2b6b3c0 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"2b6b3c0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"261\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.41.47-PM.png?fit=768%2C261&amp;ssl=1\" class=\"attachment-medium_large size-medium_large wp-image-6438\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.41.47-PM.png?w=864&amp;ssl=1 864w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.41.47-PM.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.41.47-PM.png?resize=768%2C261&amp;ssl=1 768w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-61f3368 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"89569\" data-id=\"61f3368\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e03412d exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"e03412d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Apache\u00a0<abbr>SIS<\/abbr>\u00a0appears faster than other libraries for this particular benchmark. It may be because Apache\u00a0<abbr>SIS<\/abbr>\u00a0does not reorganize the pixel layout: it writes the image with\u00a0<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/21\/docs\/api\/java.desktop\/java\/awt\/image\/BandedSampleModel.html\">banded sample model<\/a>\u00a0(called \u00ab\u00a0planar configuration\u00a0\u00bb in TIFF), as it was in the image that\u00a0<abbr>SIS<\/abbr>\u00a0has read. By contrast,\u00a0<abbr>GDAL<\/abbr>\u00a0and Image I\/O reorganize the pixels into the\u00a0<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/21\/docs\/api\/java.desktop\/java\/awt\/image\/PixelInterleavedSampleModel.html\">pixel interleaved sample model<\/a>. Note that for a Java application, the Java2D architecture around the\u00a0<code>Raster<\/code>,\u00a0<code>SampleModel<\/code>\u00a0and\u00a0<code>ColorModel<\/code>\u00a0classes provides a great level of abstraction, generally making unnecessary to restructure the image data.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-53beee7 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"30937\" data-id=\"53beee7\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-cd36629 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"cd36629\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Results with deflate compression<\/h3>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-6775c79 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"59467\" data-id=\"6775c79\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-73541d6 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"73541d6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The next benchmark involves reading the same image but with pixel interleaved sample model and deflate compression, then rewriting that image. First, the compression was tested without predictor. The average execution times are reported below. The same\u00a0<code>gdalinfo<\/code>\u00a0measurement than in the previous benchmark is reused for the \u00ab\u00a0GDAL (reduced)\u00a0\u00bb column. No attempt was made for instructing\u00a0<abbr>GDAL<\/abbr>\u00a0to use\u00a0<code>libdeflate<\/code>\u00a0(see below):<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-d155e76 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"27123\" data-id=\"d155e76\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5ea7546 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"5ea7546\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"272\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.51.55-PM.png?fit=800%2C272&amp;ssl=1\" class=\"attachment-large size-large wp-image-6439\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.51.55-PM.png?w=864&amp;ssl=1 864w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.51.55-PM.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.51.55-PM.png?resize=768%2C261&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-eb81f45 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"93041\" data-id=\"eb81f45\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-be50704 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"be50704\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The benchmark has been repeated many times and Java Image I\/O was consistently slightly faster than other libraries. One hypothesis may be that, by default, Image I\/O reads the whole image as one single tile, while the other libraries does tiling. We have not tried to adjust Image I\/O parameters for testing that hypothesis.<\/p><p>Apache\u00a0<abbr>SIS<\/abbr>\u00a0appears slightly faster than\u00a0<abbr>GDAL<\/abbr>\u00a0in this benchmark, but we should not make general conclusion from this observation because the Java profiler measured that\u00a0<abbr>SIS<\/abbr>\u00a0spend about 95% of its time in the\u00a0<code>java.util.zip<\/code>\u00a0native code. We presume that a similar proportion applies to\u00a0<abbr>GDAL<\/abbr>\u00a0as well, so 95% of this benchmark is probably comparing the same code. We have no certain explanation for the slight difference nevertheless measured between\u00a0<abbr>GDAL<\/abbr>\u00a0and\u00a0<abbr>SIS<\/abbr>. One hypothesis may be that the startup time estimation based on\u00a0<code>gdalinfo<\/code>\u00a0is not good enough. Another hypothesis may be that Apache\u00a0<abbr>SIS<\/abbr>&lsquo;s efforts payoff.\u00a0<abbr>SIS<\/abbr>\u00a0tries hard, sometime at the cost of code complexity, to transfer data as directly as possible (i.e. avoid copy operations from one buffer to other temporary buffers before the final destination).<\/p><p>Note that\u00a0<abbr>GDAL<\/abbr>\u00a0has the capability to\u00a0<a href=\"https:\/\/github.com\/OSGeo\/gdal\/pull\/3068\">use\u00a0<code>libdeflate<\/code>\u00a0instead of\u00a0<code>zlib<\/code><\/a>, with a reported performance gain of 35-50%. This acceleration has not been tested in this benchmark.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-a1c9cac e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"51290\" data-id=\"a1c9cac\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2046319 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"2046319\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Results with horizontal differentiating predictor<\/h3>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-21604a1 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"73074\" data-id=\"21604a1\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-546f040 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"546f040\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Adding the horizontal differentiating predictor at writing time has the same effect on the two tested libraries. The difference between them are within margin errors, so no conclusion can be made. The \u00ab\u00a0Time increase\u00a0\u00bb column is the difference between the time measured here and the time measured in the benchmark without predictor. The majority of this increase is probably caused by time spent in\u00a0<code>zlib<\/code>\u00a0instead of time spent in applying the predictor. Note that the file sizes also increase. The image used in this test is a case where applying a differentiating predictor is counter-productive.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-4a2c28c e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"71468\" data-id=\"4a2c28c\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4ded885 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"4ded885\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"167\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.54.53-PM.png?fit=800%2C167&amp;ssl=1\" class=\"attachment-large size-large wp-image-6440\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.54.53-PM.png?w=1158&amp;ssl=1 1158w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.54.53-PM.png?resize=300%2C63&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.54.53-PM.png?resize=1024%2C214&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-11-08-at-3.54.53-PM.png?resize=768%2C160&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-e05ee83 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"26211\" data-id=\"e05ee83\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-cb4672c exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"cb4672c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"has_eae_slider elementor-element elementor-element-66b314b e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-eae-slider=\"36488\" data-id=\"66b314b\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ca9916f exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"ca9916f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Because the benchmarks spent 95% of their time in the\u00a0<code>zlib<\/code>\u00a0library (except for the uncompressed case), we cannot make conclusion about the performance of the Java code in Apache\u00a0<abbr>SIS<\/abbr>\u00a0compared to the C\/C++ code in\u00a0<abbr>GDAL<\/abbr>. However, the benchmarks suggest that Apache\u00a0<abbr>SIS<\/abbr>\u00a0is successful in its attempt to avoid adding overhead. The interfacing between Apache\u00a0<abbr>SIS<\/abbr>\u00a0and\u00a0<code>java.util.zip<\/code>\u00a0and\u00a0<code>java.nio<\/code>\u00a0packages (e.g. using\u00a0<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/21\/docs\/api\/java.base\/java\/nio\/ByteBuffer.html#direct-vs-non-direct-buffers-heading\">direct buffers<\/a>) seems as efficient as the interfacing between\u00a0<abbr>GDAL<\/abbr>\u00a0and the native libraries that it uses. The benchmark measurements were slightly in favor of Apache\u00a0<abbr>SIS<\/abbr>, but close to margin errors. Furthermore, a bias may exist despite our effort to apply a correction for\u00a0<abbr>GDAL<\/abbr>\u00a0startup time.<\/p><p>The benchmarks reported in this blog are a bit superficial and could be improved in many ways: benchmarks should be run on a lot of different images with different sizes, tilings, sample models and color models, benchmarks should request various sub-regions, enable parallelization, measure raster reprojection times, measure memory consumption,\u00a0<i>etc<\/i>. However, doing fair performance comparisons of the writers is time-consuming, because it requires making sure that each library compresses the same data. They usually don&rsquo;t, because of different choices in sample models and tile sizes. Adjusting the parameters of each library for comparing the same things may need to be done on a case-by-case basis.<\/p><p>However, we can probably conclude one thing: the widely spread belief that a C\/C++ library such as\u00a0<abbr>GDAL<\/abbr>\u00a0will surely be faster than an equivalent Java library such as Apache\u00a0<abbr>SIS<\/abbr>\u00a0is not always grounded in reality. It is true in some circumstances (e.g. startup time of a Java application stay longer), but should not be generalized. Slow Java codes are often due to poor algorithms rather than the language. More benchmarks between libraries written carefully in both languages are needed before to make conclusions.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-156b2418 elementor-section-full_width elementor-section-height-default elementor-section-height-default exad-glass-effect-no wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no exad-sticky-section-no\" data-eae-slider=\"25992\" data-id=\"156b2418\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-764bb235 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"3747\" data-id=\"764bb235\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1770b8fa exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-shortcode\" data-id=\"1770b8fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"5276\" class=\"elementor elementor-5276\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-267b5fb elementor-section-boxed elementor-section-height-default elementor-section-height-default exad-glass-effect-no wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no exad-sticky-section-no\" data-eae-slider=\"75586\" data-id=\"267b5fb\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;,&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-8dac029 exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"54766\" data-id=\"8dac029\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ff0bb56 hfe-nav-menu__align-center hfe-nav-menu__breakpoint-mobile hfe-submenu-icon-arrow hfe-link-redirect-child exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-navigation-menu\" data-id=\"ff0bb56\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;padding_vertical_menu_item&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:7,&quot;sizes&quot;:[]},&quot;menu_space_between&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:0,&quot;sizes&quot;:[]},&quot;padding_horizontal_menu_item&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:15,&quot;sizes&quot;:[]},&quot;padding_horizontal_menu_item_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_horizontal_menu_item_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_horizontal_menu_item_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_menu_item_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_menu_item_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_menu_item_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;menu_space_between_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;menu_space_between_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;menu_space_between_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;dropdown_border_radius&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;dropdown_border_radius_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;dropdown_border_radius_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;dropdown_border_radius_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;padding_horizontal_dropdown_item&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_horizontal_dropdown_item_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_horizontal_dropdown_item_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_horizontal_dropdown_item_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_dropdown_item&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:15,&quot;sizes&quot;:[]},&quot;padding_vertical_dropdown_item_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_dropdown_item_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;padding_vertical_dropdown_item_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;distance_from_menu&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;distance_from_menu_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;distance_from_menu_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;distance_from_menu_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_size&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_size_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_size_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_size_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_width&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_width_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_width_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_width_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_radius&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_radius_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_radius_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;toggle_border_radius_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"navigation-menu.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"hfe-nav-menu hfe-layout-vertical hfe-nav-menu-layout vertical\" data-layout=\"vertical\">\n\t\t\t\t<div role=\"button\" class=\"hfe-nav-menu__toggle elementor-clickable\" tabindex=\"0\" aria-label=\"Menu Toggle\">\n\t\t\t\t\t<span class=\"screen-reader-text\">Menu<\/span>\n\t\t\t\t\t<div class=\"hfe-nav-menu-icon\">\n\t\t\t\t\t\t<i aria-hidden=\"true\"  class=\"fas fa-align-justify\"><\/i>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<nav class=\"hfe-nav-menu__layout-vertical hfe-nav-menu__submenu-arrow\" data-toggle-icon=\"&lt;i aria-hidden=&quot;true&quot; tabindex=&quot;0&quot; class=&quot;fas fa-align-justify&quot;&gt;&lt;\/i&gt;\" data-close-icon=\"&lt;i aria-hidden=&quot;true&quot; tabindex=&quot;0&quot; class=&quot;far fa-window-close&quot;&gt;&lt;\/i&gt;\" data-full-width=\"yes\">\n\t\t\t\t\t<ul id=\"menu-1-ff0bb56\" class=\"hfe-nav-menu\"><li id=\"menu-item-624\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy parent hfe-creative-menu\"><a href=\"https:\/\/www.geomatys.com\/en\/privacy-policy\/\" class = \"hfe-menu-item\">Privacy Policy<\/a><\/li>\n<li id=\"menu-item-4761\" class=\"menu-item menu-item-type-post_type menu-item-object-page parent hfe-creative-menu\"><a href=\"https:\/\/www.geomatys.com\/en\/mentions-legales\/\" class = \"hfe-menu-item\">Mentions l\u00e9gales<\/a><\/li>\n<li id=\"menu-item-625\" class=\"menu-item menu-item-type-custom menu-item-object-custom parent hfe-creative-menu\"><a href=\"#header\" class = \"hfe-menu-item\">Retour en haut<\/a><\/li>\n<\/ul> \n\t\t\t\t<\/nav>\n\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-8da774f exad-glass-effect-no exad-sticky-section-no\" data-eae-slider=\"71133\" data-id=\"8da774f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-654cb58 exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"654cb58\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.geomatys.com\/en\/\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"300\" height=\"58\" src=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?fit=300%2C58&amp;ssl=1\" class=\"attachment-medium size-medium wp-image-3137\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?w=982&amp;ssl=1 982w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?resize=300%2C58&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?resize=768%2C148&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/01\/logo-geomatys.png?w=188&amp;ssl=1 188w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-22e6314 elementor-shape-rounded elementor-grid-0 e-grid-align-center exad-sticky-section-no exad-glass-effect-no elementor-widget elementor-widget-social-icons\" data-id=\"22e6314\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"social-icons.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-social-icons-wrapper elementor-grid\" role=\"list\">\n\t\t\t\t\t\t\t<span class=\"elementor-grid-item\" role=\"listitem\">\n\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-linkedin elementor-repeater-item-69ef169\" href=\"https:\/\/www.linkedin.com\/company\/geomatys\/\" target=\"_blank\">\n\t\t\t\t\t\t<span class=\"elementor-screen-only\">Linkedin<\/span>\n\t\t\t\t\t\t<i aria-hidden=\"true\" class=\"fab fa-linkedin\"><\/i>\t\t\t\t\t<\/a>\n\t\t\t\t<\/span>\n\t\t\t\t\t\t\t<span class=\"elementor-grid-item\" role=\"listitem\">\n\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-twitter elementor-repeater-item-ae824dc\" href=\"https:\/\/twitter.com\/Geomatys\" target=\"_blank\">\n\t\t\t\t\t\t<span class=\"elementor-screen-only\">Twitter<\/span>\n\t\t\t\t\t\t<i aria-hidden=\"true\" class=\"fab fa-twitter\"><\/i>\t\t\t\t\t<\/a>\n\t\t\t\t<\/span>\n\t\t\t\t\t\t\t<span class=\"elementor-grid-item\" role=\"listitem\">\n\t\t\t\t\t<a class=\"elementor-icon elementor-social-icon elementor-social-icon-youtube elementor-repeater-item-c0981b6\" href=\"https:\/\/www.youtube.com\/channel\/UCQK9UM2EbzdlKLqnq3ogJBA\" target=\"_blank\">\n\t\t\t\t\t\t<span class=\"elementor-screen-only\">Youtube<\/span>\n\t\t\t\t\t\t<i aria-hidden=\"true\" class=\"fab fa-youtube\"><\/i>\t\t\t\t\t<\/a>\n\t\t\t\t<\/span>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>GeoTIFF reader\/writer performance comparison Cet article est disponible en anglais uniquement. Apache Spatial Information System (SIS)\u00a0version 1.4 contains a Cloud Optimized GeoTIFF (COG) reader for raster data. The development branch of Apache\u00a0SIS\u00a01.5 (not yet released at the time of writing this blog) contains also a GeoTIFF writer. Those reader and writer are implemented in pure Java code for avoiding the difficulty of bindings to native libraries such as\u00a0GDAL. Pure Java code also provides more flexibility for Java developers. For example, the Apache\u00a0SIS\u00a0reader accepts any implementation of the Java\u00a0ReadableByteChannel\u00a0standard interface as the source of bytes. Another reason for developing GeoTIFF reader and writer in Java was for prototyping the use of new GeoTIFF keys that are proposed in\u00a0OGC TestBed-19 \u2014 Geospatial in space. Coding yet another GeoTIFF reader and writer seems a duplication of work, since most of the geospatial world uses the popular\u00a0GDAL\u00a0library for that purpose. But actually, from Apache\u00a0SIS\u00a0perspective, there is not so much duplication. The most difficult part in a GeoTIFF reader and writer is to handle tiling and compression efficiently. But this task is largely format-independent, and\u00a0SIS\u00a0needs also to handle netCDF and other formats. The Apache\u00a0SIS\u00a0library shares code internally, thus reducing the task of GeoTIFF support to header parsing. By contrast,\u00a0GDAL\u00a0is largely an aggregation of independent libraries such as\u00a0libtiff\u00a0and\u00a0libpng, each with their own ways to resolve common problems. Nevertheless, coding GeoTIFF support in Java raises questions about how its performances compare to\u00a0GDAL. There is a widespread belief that Java programs are slower than their C\/C++ counterpart. In reality, it depends a lot on the kind of application and how the libraries were coded. Differences in algorithms can play a bigger role than differences in the programming languages. This blog will not answer that debate, because the benchmarks presented here depend a lot on native code, either for I\/O operations or for\u00a0DEFLATE\u00a0compression (the latter is handled by native code in the\u00a0java.util.zip\u00a0standard package). However, the benchmarks in this blog demonstrate the capability of a Java program to avoid adding overhead. The result is that Apache\u00a0SIS, at least in those benchmarks, compares favorably with\u00a0GDAL. Method The benchmarks reported in this blog are very limited and only scratch the surface on the topic of raster data handling: All benchmarks were tested with a single image (in two variants). Only one compression method tested (in two variants), together with uncompressed raster. No sub-regions and no sub-samplings tested (there is no technical reasons for this omission). Multi-thread parallelization not tested (would have required some more developments in Apache\u00a0SIS). Sub-regions and requests for reduced resolutions on\u00a0COG\u00a0images should be handled efficiently by Apache\u00a0SIS, but benchmarking those features would have required a more complex setup, especially if we want to test in a cloud environment. The simple benchmarks in this blog used a single image which was always read fully, from a local file on a laptop. The image was a single non-COG\u00a0raster with the following properties: Raster Thumbnail Raster Properties Producer: DigitalGlobe Image date: 2014\/06\/16 File size: 192 Mb Image size: 8192 \u00d7 8192 pixels Strip size: 8192 \u00d7 128 pixels Sample model: banded (3 separated arrays of red, green and blue). Sample type: bytes, values ranging from 2 to 255. Compression: None CRS: WGS 84 \/ UTM zone 31N The image was read and rewritten using three libraries:\u00a0gdal_translate, Java Image I\/O and Apache\u00a0SIS. For each library, the read\/write operations were repeated 10 times in order to allow the Java Virtual Machine to warmup. The two first iterations were ignored, and execution time of the remaining 8 iterations were recorded. Average times and standard deviations are reported in this blog. In the particular case of the\u00a0GDAL\u00a0library, the execution time of\u00a0gdalinfo\u00a0has also been measured and its average value has been subtracted from all\u00a0gdal_translate\u00a0times. The intend is to take in account the time needed for loading the\u00a0GDAL\u00a0binary, or at least the parts required for reading the image header (it also incidentally includes the time for parsing that header). We apply this correction because our benchmark code relaunches the\u00a0GDAL\u00a0command in each iteration, contrarily to Image I\/O and Apache\u00a0SIS\u00a0libraries which are loaded only during their first iteration. The benchmark code is\u00a0available on GitHub\u00a0in the\u00a0GeoTIFF.java\u00a0file. The processor of the test machine was Intel Core i7-8750H and the operating system was Fedora Linux 38 (Workstation Edition). Read and write operations were performed in the\u00a0\/tmp\/\u00a0directory, which uses the\u00a0tmpfs\u00a0file system. It means that the raster files reside partially in\u00a0RAM, so the benchmarks have less delay caused by I\/O operations. Method with deflate compression The same tests were executed again with the\u00a0DEFLATE\u00a0compression. That compression is performed by the\u00a0zlib\u00a0library, accessible in standard Java thought the\u00a0java.util.zip\u00a0package. However, the\u00a0zlib\u00a0performance varies greatly depending on the data to compress. For fair comparisons, we must ensure that all the tested libraries write the same data. It is not the case by default because: GDAL\u00a0and Java Image I\/O change the sample model from \u00ab\u00a0banded\u00a0\u00bb to \u00ab\u00a0pixel interleaved\u00a0\u00bb. GDAL\u00a0changes the strip height from 128 pixels to 1 pixel, thus writing strips of 8 kb. Java Image I\/O changes the strip height from 128 pixels to 8 pixels, thus writing strips of 64 kb. Apache\u00a0SIS\u00a0keeps the sample model and strips height as they were in the image that was read. For avoiding those differences, the input image has been rewritten by Apache\u00a0SIS\u00a0with a \u00ab\u00a0pixel interleaved\u00a0\u00bb sample model and strips of 8 pixels in height. In addition, the\u00a0-co BLOCKYSIZE=8\u00a0option has been passed to\u00a0gdal_translate. A\u00a0DEFLATE\u00a0compression has been applied, so the tests will include decompression times in addition of compression times. Results First, we tested reading the uncompressed image and rewriting it uncompressed too. Average execution times are reported below. The \u00ab\u00a0GDAL\u00a0(reduced)\u00a0\u00bb label means that the average execution time of\u00a0gdalinfo\u00a0has been subtracted from the execution time of\u00a0gdal_translate. Apache\u00a0SIS\u00a0appears faster than other libraries for this particular benchmark. It may be because Apache\u00a0SIS\u00a0does not reorganize the pixel layout: it writes the image with\u00a0banded sample model\u00a0(called \u00ab\u00a0planar configuration\u00a0\u00bb in TIFF), as it was in the image that\u00a0SIS\u00a0has read. By contrast,\u00a0GDAL\u00a0and Image I\/O reorganize the pixels into the\u00a0pixel interleaved sample model. Note that for a Java application, the Java2D<\/p>","protected":false},"author":1,"featured_media":6435,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_umich_oidc_access":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6434","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-actus"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.geomatys.com\/wp-content\/uploads\/2023\/11\/GeoTIFF.jpg?fit=256%2C256&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts\/6434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/comments?post=6434"}],"version-history":[{"count":9,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts\/6434\/revisions"}],"predecessor-version":[{"id":9044,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/posts\/6434\/revisions\/9044"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/media\/6435"}],"wp:attachment":[{"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/media?parent=6434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/categories?post=6434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geomatys.com\/en\/wp-json\/wp\/v2\/tags?post=6434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}