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

2008-04-13 Thread Ari Jolma

Markus Neteler kirjoitti:

Dear OSGeo,

I would like to launch the idea of an OSGeo Cartographic Library to
share concepts, source code and regression tests:

http://wiki.osgeo.org/wiki/OSGeo_Cartographic_Library
  


I proposed a year ago to develop a geospatial graphics library based on 
Cairo 
http://www.intevation.de/pipermail/freegis-list/2007-April/003142.html


I'm still very much interested in this. Cairo would provide a single API 
to render to an image buffer, on PDF and others. It has good support for 
rendering text with various fonts and there are high-level language APIs.


Currently Cairo can be used in Geoinformatica to render geodata, 
legends, etc. on a map. I'm already using that a bit and will use it 
much more in the future.


What I think is needed first, and would be the core content of the 
library is 1) a mapping of style information into Cairo commands, 2) 
capability to render cartographic symbols on maps, and 3) a mechanism to 
allow plugins that add legends etc. on the map, 4) symbol and label 
placement algorithms. Second need would perhaps be support for various 
geovisualization methods.


1) is rather straight-forward, I guess, using OGC Styled Layers standard
2) I'm not sure, there seems to be free resources like 
http://pubs.usgs.gov/of/1999/of99-430/ which offer symbols in EPS -- I 
don't find support in Cairo to render EPS on surfaces

3) is rather straight-forward
4) start from simple and existing codes

Cairo is of course just one technology and not suited for all needs in 
this domain. Furthermore, the data provider can be made separate from 
the library, but I'd like to start with and use GDAL (OGR in fact) as 
the default.


Anyway, I'd like to finally get going with this and start drafting an 
API. Any ideas how to proceed? Set up a svn repository somewhere?


Regards,

Ari

--
Prof. Ari Jolma
Geoinformatiikka / Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma


___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Bruno Lowagie

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
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Christopher Schmidt
On Sun, Apr 13, 2008 at 11:18:48AM +0300, Ari Jolma wrote:
 I'm still very much interested in this. Cairo would provide a single API 
 to render to an image buffer, on PDF and others. It has good support for 
 rendering text with various fonts and there are high-level language APIs.
 
 Currently Cairo can be used in Geoinformatica to render geodata, 
 legends, etc. on a map. I'm already using that a bit and will use it 
 much more in the future.

I think that for the task you've described, looking into Mapnik might 
be a good idea.

 What I think is needed first, and would be the core content of the 
 library is 1) a mapping of style information into Cairo commands, 2) 
 capability to render cartographic symbols on maps, and 3) a mechanism to 
 allow plugins that add legends etc. on the map, 4) symbol and label 
 placement algorithms. Second need would perhaps be support for various 
 geovisualization methods.

1), 2), and 4) already exist in Mapnik. 3) seems to me like it can
either be added to Mapnik, or added via post-processing, without needing
to reimplement 1), 2) or 4).

 Cairo is of course just one technology and not suited for all needs in 
 this domain. Furthermore, the data provider can be made separate from 
 the library, but I'd like to start with and use GDAL (OGR in fact) as 
 the default.

Mapnik has support for PostGIS and Shapefiles, but has a plugin-based
architecture for reading data, so I would not be surprised to find that
an OGR plugin for data access would be too difficult for someone
experienced in C++/C.

 Anyway, I'd like to finally get going with this and start drafting an 
 API. Any ideas how to proceed? Set up a svn repository somewhere?

I'd strongly recommend starting by looking at existing solutions. 

Regards,
-- 
Christopher Schmidt
Web Developer
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Markus Neteler
On Sun, Apr 13, 2008 at 2:58 PM, Christopher Schmidt 
[EMAIL PROTECTED] wrote:

 On Sun, Apr 13, 2008 at 11:18:48AM +0300, Ari Jolma wrote:
  I'm still very much interested in this. Cairo would provide a single API
  to render to an image buffer, on PDF and others. It has good support for
  rendering text with various fonts and there are high-level language
 APIs.
 
  Currently Cairo can be used in Geoinformatica to render geodata,
  legends, etc. on a map. I'm already using that a bit and will use it
  much more in the future.

 I think that for the task you've described, looking into Mapnik might
 be a good idea.


Some more is here:
 http://grass.osgeo.org/grass63/manuals/html63_user/cairodriver.html

Markus
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Dave Patton

Ari Jolma wrote:

Markus Neteler kirjoitti:

Dear OSGeo,

I would like to launch the idea of an OSGeo Cartographic Library



3) a mechanism to allow plugins that add legends etc. on the map



3) is rather straight-forward


Actually, dealing with the legend, or the contents
of the entire map collar, is non-trivial, however, a
library that can render the content within a map's
neat line has all the tools necessary to be able to
render the map's collar. The difference may be that
there would need to be some additional functionality,
or different methods of calling the same underlying
functionality, in order to make the tasks involved
in composing the collar easy.

--
Dave Patton
CIS Canadian Information Systems
Victoria, B.C.

Degree Confluence Project:
Canadian Coordinator
Technical Coordinator
http://www.confluence.org/

OSGeo FOSS4G2007 conference:
Workshop Committee Chair
Conference Committee member
http://www.foss4g2007.org/

Personal website:
Maps, GPS, etc.
http://members.shaw.ca/davepatton/
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Bruno Lowagie

Dave Patton wrote:

Actually, dealing with the legend, or the contents
of the entire map collar, is non-trivial, however, a
library that can render the content within a map's
neat line has all the tools necessary to be able to
render the map's collar. The difference may be that
there would need to be some additional functionality,
or different methods of calling the same underlying
functionality, in order to make the tasks involved
in composing the collar easy.


If you make the map in PDF, you could provide the
legend as a floating annotation that can be moved
around by the user.
If you are using OCG, you also have the Optional
Content panel that can be used as a legend and that
can be used to make certain layers visible/invisible.

All this is fairly easy to achieve in PDF.
br,
Bruno

___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Tyler Mitchell (OSGeo)

On 13-Apr-08, at 9:23 AM, Bruno Lowagie wrote:

If you make the map in PDF, you could provide the
legend as a floating annotation that can be moved
around by the user.
If you are using OCG, you also have the Optional
Content panel that can be used as a legend and that
can be used to make certain layers visible/invisible.


For me the question of PDF is not limited by number of pages, or  
options that PDF offers, but whether or not it is an efficient format  
for sharing cartographic information - for which, so far, I'd say it  
fails miserably.  How many times have I went to a municipal mapping  
site only to find their maps are all in PDF - what a pain!  It might  
just be me though :)


Also, in the operational/industrial GIS map production environments  
I've been in, we've needed easy ways to print and re-print maps  
without having to open a viewer (and our printers didn't support PDF  
natively - though I assume some do now).  To print, I've focused on  
native plotter file formats and/or Postscript since most plotters can  
support it. Of course this isn't going to be good for web distribution.


For delivering digital files, I've often converted the PS files into  
PDF but it's been far from ideal.  I increasingly believe that web- 
based tools are going to be the only option.  So what about off-line  
delivery?  A CD or USB runable system is an interesting and more  
effective way than a PDF in some cases, though of course both have  
some memory overhead issues.


So, is it just me or does stuffing a 1:20,000 topo map into a PDF  
makes a huge file that is virtually unusable unless you have  
gigabytes of RAM and dual processors.  Delivering a 40MB PDF to  
client who is running an old computer doesn't bode well for your  
service ;-)


For what it's worth,
Tyler
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Bruno Lowagie

Tyler Mitchell (OSGeo) wrote:
For me the question of PDF is not limited by number of pages, or options 
that PDF offers, but whether or not it is an efficient format for 
sharing cartographic information - for which, so far, I'd say it fails 
miserably.  How many times have I went to a municipal mapping site only 
to find their maps are all in PDF - what a pain!  It might just be me 
though :)


It depends on how they are made. Do they have a street index
that allows you to jump to the exact location when you click
on a streetname? Are they made out of raster images converted
to PDF or are they drawn using vector data?

Also, in the operational/industrial GIS map production environments I've 
been in, we've needed easy ways to print and re-print maps without 
having to open a viewer (and our printers didn't support PDF natively - 
though I assume some do now).  To print, I've focused on native plotter 
file formats and/or Postscript since most plotters can support it. Of 
course this isn't going to be good for web distribution.


There are ways to work around that print problem ;-)

For delivering digital files, I've often converted the PS files into PDF 
but it's been far from ideal. 


But then you get a 'flat' PDF without any interactivity.
I don't see any added value when you convert PS to PDF.

I increasingly believe that web-based 
tools are going to be the only option.  So what about off-line 
delivery?  A CD or USB runable system is an interesting and more 
effective way than a PDF in some cases, though of course both have some 
memory overhead issues.


So, is it just me or does stuffing a 1:20,000 topo map into a PDF makes 
a huge file that is virtually unusable unless you have gigabytes of RAM 
and dual processors.  Delivering a 40MB PDF to client who is running an 
old computer doesn't bode well for your service ;-)


Er... stuffing a 1:20,000 topo map. The fact that you mention 1:20,000
indicates that you are probably talking about raster images, not about
vector data. If you write the vector data to a PDF, all the data is
compressed. You get really small file sizes when compared to other
solutions.

In short: the major problem with PDF in the GIS world is a lack of
understanding of the Portable Document Format by people who are
specialized in GIS. Of course PDF sucks if you just stuff if with
raster images or use a PDF that was converted from PS. Even a FOP
generated PDF has no added value.

As soon as I have the time, I'll make you some examples.
br,
Bruno
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss


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

2008-04-13 Thread Jachym Cepicky
www.openstreetmap.org

j

Bruno Lowagie píše v Po 14. 04. 2008 v 07:26 +0200:
 Bruno Lowagie wrote:
  As soon as I have the time, I'll make you some examples.
 
 My main problem is that I haven't been on a GIS project since 1997.
 Can somebody provide me with some (completely free!) sample data:
 - vector data with streets and street names in multiple languages
 - vector data of some shapes (for instance a city, municipalities)
 - some additional data, for instance: location of hotels, landmarks,...
 
 If you provide me with such a data set, I'll make you a PDF and
 show why I think PDF is an ideal format.
 
 br,
 Bruno
 ___
 Discuss mailing list
 Discuss@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/discuss
-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub


signature.asc
Description: Toto je digitálně	 podepsaná část	 zprávy
___
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss