Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 >

jeudi 25 septembre 2008

Un petit mail qui fait bien plaisir pour une petite contribution personnelle sur PostGIS!

Voilà un mail qui fait super plaisir de la part de Kevin Neufeld, l'un des développeurs de PostGIS......Ca a du bon parfois la reconnaissance de ses pères .!!!

Great! Thanx.  I'll see if I can incorporate this into the Makefile and autobuild process
at some point.

Cheers,
Kevin

Jean David TECHER wrote:
>Hi Kevin,
>
>Thanks for your comments.
>
>The instructions are available on my Web Site at
>
>http://www.davidgis.fr/blog/index.php?2008/09/25/387-building-pdf-for-postgis-using-dblatex I've tried to write in English...Hope this
>helps!
>
>Best regards.
>
>--david;
>
>
>Quoting Kevin Neufeld :
>
>>Hi David,
>>
>>Is there any chance you remember the syntax and parameters used to
>>generate your pdf?  It would be sweet if we could incorporate such a
>>doc in our automatic build system so it stays current.
>>
>>Cheers,
>>Kevin
>>
>>Kevin Neufeld wrote:
>>>Very nicely done David.
>>>
>>>PaulR - are you really set on producing a PDF via Apache's FOP?   This looks far
>>>better than anything I've been able to reproduce  with FOP or Docbook's db2pdf.
>>>
>>>David, what exactly is your command line for generating the doc  (maybe I can put it
>>>in the autobuild process that gets updated on  every SVN commit)?  Assuming of course
>>>that folks are ok with  adding a new dependency with the build process ...
>>>
>>>Cheers,
>>>Kevin
>>>
>>>Jean David TECHER wrote:
>>>>Dear all,
>>>>
>>>>I've tried to compil the postgis.pdf using the svn tarball.
>>>>
>>>>The output is available at
>>>>
>>>>http://www.davidgis.fr/postgis-out.pdf
>>>>
>>>>AFAIK, the output seems to be beautifull since you can see the images.
>>>>
>>>>Hope these help people for a printing solution for postgis doc  ;)
>>>>
>>>>--david;
>>>>

Building PDF for PostGIS using dblatex

By default when you want to have the postgis.pdf taken from the source, you have to install fo or db2pdf. However, you can use a tool like dblatex. The solution is available at http://dblatex.sourceforge.net/. This project is maintaned by Benoît Guillon (a French guy too like me ).

The main goal is as followed

Install dblatex >=0.2.7

First of all you need dblatex. Please read the instructions taken from the dblatex's site. You need to have python, latex and so on..

When you're ready. It is time to install

./setup.py install

Building the pdf doc from PostGIS

  1. Download the sources from svn
    wget http://www.postgis.org/postgis-svn.tar.gz
  2. Untar the sources
    tar xvf postgis-svn.tar.gz
  3. Go to postgis directory, run configure and go to doc directory
    ./configure && cd doc && make
  4. The file reference.xml must be change. We have to replace the term entry by listitem before using dbaltex
    cp reference.xml reference.xml.orig; cat reference.xml.orig |sed -e "s:term:listitem:g" > reference.xml
  5. It's time to use dblatex. Here is the command and the output
    root@olivia:/mnt/sources/tmp/postgis-svn/doc# dblatex -T native -t pdf -o postgis-svn-1.4.0.pdf -I "$PWD/html" postgis-out.xml 
    Build the listings...
    XSLT stylesheets DocBook -  LaTeX 2e (0.2.9)
    ===================================================
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_crosses-math.gif" fig0.pdf
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_crosses01.gif" fig1.pdf
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_crosses02.gif" fig2.pdf
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_crosses03.gif" fig3.pdf
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_crosses04.gif" fig4.pdf
    convert "/mnt/sources/tmp/postgis-svn/doc/html/images/st_touches-math.gif" fig5.pdf
    Build postgis-out.pdf
    This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
    entering extended mode
    This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
    entering extended mode
    'postgis-svn-1.4.0.pdf' successfully built

Here is the final PDF http://www.davidgis.fr/download/postgis-svn-1.4.0.pdf...Beautifull isn't it ???

Exemple d'un update et d'un case when

On a la table suivante

www_log=# create table test(id integer,name text);
CREATE TABLE
www_log=# insert into test select generate_series(1,10),'toto';
INSERT 0 10
www_log=# select * from test ;
 id | name 
----+------
  1 | toto
  2 | toto
  3 | toto
  4 | toto
  5 | toto
  6 | toto
  7 | toto
  8 | toto
  9 | toto
 10 | toto
(10 lignes)

On va mettre tout ça à jour. Quand id est pair name vaut tata ,yoyo sinon.

www_log=# UPDATE test set name=(case when id%2=0 then 'tata' else 'yoyo' end);
UPDATE 10
www_log=# select * from test ;
 id | name 
----+------
  1 | yoyo
  2 | tata
  3 | yoyo
  4 | tata
  5 | yoyo
  6 | tata
  7 | yoyo
  8 | tata
  9 | yoyo
 10 | tata
(10 lignes)

mercredi 24 septembre 2008

[PostgreSQLFr.org] Migration des forums

L'annonce a été publiée hier. Elle se trouve ici. Je ne fais que relayer l'information.

Il faut penser à s'inscrire comme stipulé pour poster un message sur le nouveau forum.