FW: [OSGeo-Discuss] Proposal: OSGeo Cartographic Library

Bruno Lowagie bruno at 1t3xt.com
Sun Apr 13 04:10:54 PDT 2008


Hi,
this mail was forwarded to me, and I immediately subscribed to
the mailing list to set something straight.

Rushforth, Peter wrote:
> In the XML world, the answer to graphics rendering is SVG + XSL-FO,
> generated by XSLT scripts according to styling rules.  XSL-FO
> is then rendered via a formatting objects processor, like Apache FOP.

OK, but... you do know that this is only true for small datasets.
For large datasets FOP is a bad choice performance wise.
For instance: if you have to convert an XML to a PDF and you
expect the end result to be 50 pages, Apache FOP might be a
good choice. If you expect 10,000+ pages, then it's a bad choice.

A document with 10,000+ pages is not as unusual as most PDF newbies
think. I've just created a PDF with 28,500 pages; each page is
a letter to one of the 28,500 students of Ghent University.
I've heard from banks that create PDFs with 100,000+ pages.
In this case, I use iText (obviously: I'm the developer of iText):
http://www.lowagie.com/iText/

iText is used by Google, NASA, DoD,... It's purpose is to create
all kinds of PDF files as fast as possible.

> I'm of the opinion that a pipeline like:
> 
> GML +/- (any XML data) + SLD/FE + WMS graphics  => XSLT => SVG+XSL-FO ->
> pdf, (?geopdf anyone?)

XSLT? XSL-FO? What a performance killer!

> would make for a killer map scripting environment.  Plus, it has the
> added benefit of being based on standards or de facto standards
> across the board, with open source solutions available in each
> area.

>> Use Cases:
>> ----------
>> I.  Interactive Browsing (e.g. web mapping)  1. Good-looking 
>> web maps (more control of grid/graticule
>> labeling)

FOP doesn't support all PDF features.
For instance: I've made a map in PDF that shows a raster image
when you first open it. Then when you zoom in, the PDF automatically
switches to vector data.

FOP doesn't support OCG! iText does!
OCG = Optional Content Groups: meaning you can turn on and
off layers in a PDF file. For instance: you could add street
names to a map in English en French and define the OCG so that
only one language at a time is shown.

>> II. Ad-hoc Authoring (one-time GIS style layout using GUI)  
>> 1. Good-looking printed (ps,pdf,etc) maps automatically 
>> providing grid/grat, scalebar, legend, north arrow, SRS description
>> - provide an API to exiting GIS apps?

FOP isn't fast enough to create detailed PDFs on the fly.

>> III. Automated Mapping (script driven)
>>  1. Map Series (single page, identical layout)  2. Map Atlas 
>> (mostly map with some text, multi-page)  3. Map-centric 
>> documents (mostly text with some map,
>> multi-page)
>>  4. Route Alignment Sheets (rotated (non 90 deg) to fit
>> page)

With iText you have direct access to all PDF operators and
operands. you can draw every shape you want.

Please download chapter 1 of my book:
http://1t3xt.com/docs/book.php#free
There's an example of a map of a (fictive) city.
I hope you'll find it very interesting!
br,
Bruno



More information about the Discuss mailing list