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

Rushforth, Peter prushfor at NRCan.gc.ca
Mon Apr 14 09:56:53 PDT 2008


Hi Bruno,

> 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.

I don't know of a map being more than one or two pages.
A map series could be treated as a group of one-page documents. 
Granted a map can have a *lot* of detail on it. See comments wrt
to using WMS for graphics rendering, below.

> XSLT? XSL-FO? What a performance killer!
> 
> >> Use Cases:
> >> ----------
> >> I.  Interactive Browsing (e.g. web mapping)  1. 
> Good-looking web maps 
> >> (more control of grid/graticule
> >> labeling)

XSLT is pretty reasonable for many tasks.  Saxon is the
leading XSLT processor today, written in java and .net.

In addition, if graphics intensive processing is done in a 
distributed way (WMS), the integration stage should be less 
onerous.  Having the flexibility of XSLT scripting at that point is 
a great advantage over java etc coding, IMHO.

> 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.

This appears to be new in PDF 1.5?  Could an *open* version
of a pdf mapping format be based on such behaviour? Just a
thought.  Apache FOP targets support of PDF 1.4 - although 
perhaps it is not even possible to theoretically support 
PDF 1.5 using XSL-FO yet.  Interactive layer control 
doesn't really matter for printing though, but obviously useful
in context.  

> >> 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.

Respectfully disagree - I think it would depend on what you are 
expecting to do in your xsl-fo creation process.  If you make 
your XSLT engine do all the graphics creation, perhaps you 
are right.  However if you draw on WMS servers to do the 
heavy lifting, leaving the decoupage, scalebar, north arrow, surround
text, 
legend etc calculations to XSLT, you would have the best of 
both worlds - performant graphics processing with the flexibility 
of a standard XML scripting language.  GUI application could be 
done with a thick client, allowing on-the-fly interactive template 
creation to generate custom maps / map series based on remote services.

The styling "rules" (xslt templates) which create the output could 
be stored (perhaps in a database) and mixed-and-matched at design time
by
the GUI user to create a style through which data could be transformed
to viewable documents.  The style itself could be captured as a whole
for re-use / modification / subclassing. 

> 
> 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 will check it out, thanks.

Why not join the wiki page for this discussion too:
http://wiki.osgeo.org/wiki/OSGeo_Cartographic_Library

Cheers,
Peter



More information about the Discuss mailing list