PE&RS November 2016 - page 842

842
November 2016
PHOTOGRAMMETRIC ENGINEERING & REMOTE SENSING
SECTOR
INSIGHT:
.
com
We settled on GDAL even with the unproven PDF driver
largely because we believed (correctly, as it turns out) that
defects in the new driver could be addressed quickly – either
by the open source community or by our own programming
staff.
In any event, the integration went smoothly. This was ex-
pected since the library itself was already part of our appli-
cation. Happily, the quality seemed adequate as well. Given
the huge scope of implementing the PDF specification (and
the geospatial features described in “Extension Level 3”) in a
new driver, some explanation here seems appropriate.
Turtles All the Way Down
Just as we were looking to GDAL for foundation raster format
support, the new GDAL driver looked to other open source li-
braries for its foundation support. In our case, the new driver
gets PDF support from the libPoDoFo library which has been
in development for over 10 years. PoDoFo, in turn, uses other
open source libraries: libfontconfig handles things like font
substitution, libtiff and libjpeg read raster images inside of
the PDF file. Each of these libraries in turn, depends on oth-
er open source libraries (Figure 1). Many of these libraries
have been around for decades and are very, very widely used
and proven in production.
What Happens When Something Does Not Work
Our implementation worked well for a broad class of geospa-
tial PDFs we found “in the wild,” but not for one in particu-
lar. The driver refused to recognize a sample produced by the
“PDFlib” project – but Acrobat Reader recognized it.
On reporting the issue to the community (via the online issue
tracking database), we were pleased to get a very prompt re-
sponse from the original contributor of the driver. Obviously
familiar with that 800+ page PDF specification, he initial-
ly suggested that the document itself was non-conformant.
However, on closer examination, determined that a careful
read of the 140 page Extension Level 3 document allowed an
alternative mechanism for attaching the geospatial informa-
tion to a page. He patched the driver immediately and the
offending document rendered as expected (See, GDAL’s ticket
number 4695 for more information ). There was never any
discussion about who should pay for this or how much – we
have sponsored plenty of other open source work but this got
fixed before it ever got to that. How does that happen?
Why Open Source Makes Sense
Certainly, there’s a lot of emotional passion here from the
“Information Wants to Be Free” crowd. . But I think that
gives a one-sided view of the issue: commercial vendors get
foundation software in exchange for … what exactly? I do
not think this “takers” view accurately captures either par-
ty’s calculus. The main reason open source software works is
that it provides consumers a common, tested and extendable
infrastructure for modern software applications. At the same
time, it provides maintainers a large collection of potential
customers who in many cases happily pay for consulting,
fixes and enhancements. These, in turn, all go back into that
same common infrastructure which is precisely why it is so
popular to begin with.
As a community, it is in our best interest to be knowledge-
able and supportive of our common infrastructure. Training
should incorporate open source tools and encourage partic-
ipation in related meetups, conferences and code sprints.
Similarly, industry should recognize the value of our shared
codebase, return our developed enhancements to the commu-
nity and sponsor efforts to improve the libraries. We’re all in
this together.
Author
Michael Rosen, was the Software Architect at LizardTech in
Seattle WA. He’s currently looking for his next opportunity,
.
Figure
1
. Dependency diagram for PoDoFo
819...,832,833,834,835,836,837,838,839,840,841 843,844,845,846,847,848,849,850,851,852,...906
Powered by FlippingBook