blog und wiki des projektes offene kartierung
a rudimentary documention of developing a simple MakeAMap? tool.

parts:


1. todos / features

  • get file extent with ogrinfo -ro
  • make a mapserver mapfile
  • combine with a waypoint file!
  • ask for a project allocation
  • add mapdata to metamap -- i.a.
  • add new projects
  • cgi template
  • PDF export -- i.a.
  • SVG export
  • Flash export (see [1] )
  • KML export
  • edit extent
  • edit waypoints (to add links and annotations!)
  • add/define symbols


2. howtos

2.1. plattform and used software

version 0.1 (2006-09)

  • linux debian sarge, apache 2.0, perl
  • mapserver 4.8.4
  • libs:
    • pdflib lite
  • perl modules

2.2. enable pdf output for mapserver

compiling mapserver version 4.8.4 with pdf output on debian sarge (the mapserver version 4.1.4 which comes which is part of sarge doesn't have pdf support compiled in)

steps:

  • get all necessary packages via apt-get
  • download and compiling postgis
  • installing pdflib lite
    compiling of this library (as suggested by the mapserver doku) failed at my server. i used a precompiled package, found at [debian unofficial] and installed it with
    dpkg -i libpdflite5_6.0.3-1duo+sarge1_i386.deb
    and
    dpkg -i libpdflite-dev_6.0.3-1duo+sarge1_i386.deb
  • download and compile mapserver:
  • select ./configure options as given at [compiling_on_unix], change paths to existing locations of the different libs.

 ./configure    --with-ogr=/usr/bin/gdal-config 
                --with-gdal=/usr/bin/gdal-config 
                --with-httpd=/usr/sbin/apache2 
                --with-wms 
                --with-wfs 
                --with-wcs 
                --with-wfsclient 
                --with-wmsclient 
                --enable-debug 
                --with-curl-config=/usr/bin/curl-config 
                --with-proj 
                --with-tiff 
                --with-jpg 
                --with-png 
                --with-freetype=/usr/local 
                --with-threads 
                --with-postgis=/usr/bin/pg_config 
                --with-libiconv=/usr/local 
                --with-xml2-config=/usr/bin/xml2-config 
                --with-pdf= /usr/local/lib 
                --with-geos = /usr/bin/geos-config 

  • run ./configure and make
  • if successfull, copy "mapserv" to the cgi-bin directory

2.3. map config for pdf output

  • map size for approx. DIN A4 format: MAP > SIZE 595 842
 MAP
  ...
  STATUS ON
  IMAGETYPE pdf
  # define a font-list for the use of truetype fonts
  FONTSET "/var/www/vhosts/maps.offene-kartierung.de/httpsdocs/fonts/font.set"
  OUTPUTFORMAT
    NAME pdf
    MIMETYPE "application/x-pdf"
    DRIVER pdf
  END
  ...
  # a title layer
  LAYER
    NAME "title"
    STATUS DEFAULT
    TRANSFORM FALSE
    TYPE ANNOTATION
    FEATURE
        POINTS 
          40 120   #position, 40 from left, 120 from top
        END
        TEXT "title"
    END
    CLASS
        LABEL
	  TYPE truetype
          FONT "arial-bold"   # name defined in fontset
	  SIZE 35   # in points (?)
	  ANGLE 2   # rotate type two degrees counterclockwise
          POSITION CR
          COLOR 0 0 0  # color black
        END
    END
  END

OffeneKartierung > Wiki > Tools > MakeAMapDev || RecentChanges | Preferences
Edit text of this page | View other revisions
Last edited September 4, 2007 6:06 pm by UlfT (diff)
Search: