2010/08/09

Where do I find my EPSG code?

There is a text file “epsg” in your PROJ4 installation (/usr/share/proj/epsg) which contain the EPSG information used by PROJ4. In Windows, this is often located in C:\proj\nad or is found with an environment variable called PROJ_LIB.

Hehe

Why doesn’t PIL (Python Imaging Library) open my PNGs?

PIL does not support interlaced PNGs at this time (no timetable on when it actually will either). To be able to read PNGs in PIL, they must not be interlaced. Modify your OUTPUTFORMAT with a FORMATOPTION like so:

OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
FORMATOPTION "INTERLACE=OFF"
END

Hehe

Which image format should I use?

Although MapScript can generate the map in any desired image format it sufficient to only consider the three most prevalent ones: JPEG, PNG, and GIF.

JPEG is an image format that uses a lossy compression algorithm to reduce an image’s file size and is mostly used when loss of detail through compression is either not noticeable or negligible, as in most photos. Maps on the other hand mainly consist of fine lines and areas solidly filled in one colour, which is something JPEG is not known for displaying very well. In addition, maps, unless they include some aerial or satellite imagery, generally only use very few different colours. JPEG with its 24bit colour depth capable of displaying around 16.7 million colours is simple not suitable for this purpose. GIF and PNG however use an indexed colour palette which can be optimized for any number (up to 256) of colours which makes them the perfect solution for icons, logos, charts or maps.

Although GIF shows a quantitative as well as qualitative advantage over PNG when generating maps that contain full coloured remote sensing imagery, PNG is the clear quantitative winner in terms of generated file sizes for maps with or without additional monochrome imagery and should therefore been the preferred image format. If the mapping application however can also display fullcolour aerial or satellite imagery, the output file format can be changed dynamically to either GIF or even PNG24 to achieve the highest possible image quality.

Hehe

How do I set line width in my maps?

You must set the symbol for the LAYER to be ‘circle’ and then you can set the symbol SIZE to be the width you want. A ‘circle’ symbol can be defined as

SYMBOL
NAME 'circle'
TYPE ELLIPSE
FILLED TRUE
POINTS 1 1 END
END

Hehe

Does MapServer Support Geocoding?

No.

Geocoding is an activity where you take a list of addresses and generate lat/lon points for them. This kind of spatial functionality is provided by proprietary packages such as the ESRI suite of tools, as well as services such as those provided by GDT. MapServer is for map rendering, and it does not provide for advanced spatial operations such as this.

If you are using MapScript, there is a free geocder available through XMLRPC and SOAP at http://geocoder.us . You could hook you application up to use this service to provide lat/lon pairs for addresses, and then use MapServer to display those points.

Hehe

Does MapServer Support Reverse Geocoding?

No.

Reverse geocoding is an activity where you take a list of street features that you already have and generate postal addresses from them. This kind of spatial functionality is provided by proprietary packages such as the ESRI suite of tools, as well as services such as those provided by GDT. MapServer is for map rendering, and it does not provide for advanced spatial operations such as this.

Hehe

2010/08/07

What’s with MapServer’s logo?

The MapServer logo illustrates the confluence of the Minnesota and Mississippi rivers, quite near to the home of the St. Paul Campus of the University of Minnesota, which was the birthplace of MapServer.

Hehe