Showing posts with label Library. Show all posts
Showing posts with label Library. Show all posts

2010/02/18

How to Install GCC Compiler in Ubuntu

Install package called build-essential is the best way

build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
gcc -v
make -v

AGG Rendering Specifics

MapServer 5.0 released with a new rendering backend.

Setting the OutputFormat


24 bit png (high quality, large file size):

OUTPUTFORMAT
    NAME 'AGG'
    DRIVER AGG/PNG
   IMAGEMODE RGB
END

24 bit png, transparent background:

OUTPUTFORMAT
    NAME 'AGGA'
    DRIVER AGG/PNG
    IMAGEMODE RGBA
END

24 bit jpeg (jpeg compression artifacts may appear, but smaller file size):

OUTPUTFORMAT
    NAME 'AGG_JPEG'
    DRIVER AGG/JPEG
    IMAGEMODE RGB
END

png output, with number of colors reduced with quantization.

OUTPUTFORMAT
    NAME 'AGG_Q'
    DRIVER AGG/PNG
    IMAGEMODE RGB
    FORMATOPTION "QUANTIZE_FORCE=ON"
    FORMATOPTION "QUANTIZE_DITHER=OFF"
    FORMATOPTION "QUANTIZE_COLORS=256"
END

New Features


All rendering is now done antialiased by default. All ANTIALIAS keywords are now ignored, as well as TRANSPARENCY ALPHA. Pixmaps and fonts are now all drawn respecting the image’s internal alpha channel (unless a backgroundcolor is specified).

As with GD in ver. 4.10, using a SYMBOL of type ELLIPSE to draw thick lines isn’t mandatory anymore. To draw a thick line just use:

STYLE
    WIDTH 5
    COLOR 0 0 255
END

A line symbolizer has been added, that works with vector or pixmap symbols, to draw textured lines. This happens by default if a line’s style is given a symbol of type vector or pixmap. To enable “shield” symbolization, i.e. a marker placed only on some points of the line, you must add a GAP parameter to your symbol definition. This GAP value is scaled w.r.t the style’s SIZE parameter. Specify a positive gap value for symbols always facing north (optionally rotated by the ANGLE of the current style), or a negative value for symbols that should follow the line orientation

This happens by default if a line’s style is given a symbol of type vector or pixmap. To enable “shield” symbolization, i.e. a marker placed only on some points of the line, you must add a GAP parameter to your symbol definition. This GAP value is scaled w.r.t the style’s SIZE parameter - specify a positive gap value for symbols always facing north (optionally rotated by the ANGLE of the current style), or a negative value for symbols that should follow the line orientation

Pixmap and font symbols can now be rotated without loosing their transparency

For POLYGON layers with no specific SYMBOL, the WIDTH keyword specifies the width of the outline, if an OUTLINECOLOR was specified. This is a shorthand that avoids having to create multiple styles for basic rendering, and will provide a marginal performance gain. Note that in this case, the width of the outline is /not/ scale dependent.

Modified Behavior


When specifying a SYMBOL for a polygon shape, the GAP parameter of the symbol is used as a separation between each rendered symbol. This works for symbols of type vector, pixmap and ellipse. For example a symbol defined by

SYMBOL
    NAME 'triangle'
    TYPE VECTOR
    FILLED TRUE
    POINTS
        0 1
       .5 0
        1 1
        0 1
    END
    GAP 1
END

GD Won't Complie Against libpng 1.4.0

From the libpng README.

"Removed the deprecated png_check_sig() function/macro."

The file ext/gd/libgd/gd_png.c currently uses this function and so will not compile against libpng 1.4.0. The libpng man page notes the following:

"The function png_check_sig(sig, num) was replaced with !png_sig_cmp(sig, 0, num). It has been deprecated since libpng-0.90."

Hehe

Sekilas Tentang Library yang Dibutuhkan Oleh MapServer

1. GD
GD adalah library grafik. GD dependencies terdiri dari zlib, libpng, FreeType, dan libJPEG, yang memungkinkan GD memiliki kemampuan untuk mengkompres image, merender image PNG, menggunakan font TrueType, dan merender image JPEG.

2. FreeType
FreeType adalah sebuah font-rendering engine. Tidak digunakan langsung oleh MapServer tetapi digunakan GD untuk merender font.

3. libJPEG
Untuk merender image JPEG.

4. libpng
Untuk merender image PNG.

5. zlib
Untuk kompresi data.

6. GDAL
Library translator untuk data raster. Memiliki kemampuan untuk mengimport georeferenced raster image.

7. OGR
Menyediakan akses untuk membaca dan menulis berbagai macam format vektor.

8. Proj4
Library untuk proyeksi kartografi.

9. shapelib
Library untuk membuat dan manipulasi shapefile.

10.libcurl
Untuk menyediakan WMS support.

11.PDFLib
Membuat output PDF.

Hehe