Opacity, Gdal, OGR, MapInfo and projections...

Daniel Morissette morissette at dmsolutions.ca
Wed Jan 3 10:52:26 EST 2001


Frédéric Marchand wrote:
> 
> I would like to know if MapServer support Opacity (or transparency) for
> shapefile. I mean, i have a region shapefile over a geotiff and i would like
> to see the tiff under region (which is opaque)
> 

You could use a symbol to fill your polygons, and by playing with the
density of the symbols, then you can control the level of opacity. 
We've done that before and it gives very cool results... I think it was
using a dot symbol but I'm not sure... Email me directly if you need
more details.

> Also, when you zoom in the raster, it become very pixelized and since openev
> blur the raster when you zoom in and it use gdal, i was wondering if
> MapServer can do that.
> 

Actually, MapServer does not use GDAL yet... but we'll add it sometimes
in the next few months.  BTW I don't think it's GDAL that does the
blur in OpenEV... Frank W. can probably confirm that.

> And at last, i have seen a post to how to use OGR with .tab, but i lost the
> post... (i use kmail instead of mailx now... :-)). I did that so far:
> 

I attached a simple .map file that loads a canada.tab file in lat/lon
coordinates... it works well with the test_draw_map.phtml script that
comes in the mapserver/mapscript/php3/examples directory, assuming that
you've compiled OGR into your php_mapscript.so, of course.

Note that the resulting map will be very ugly... but it at least shows
how to use OGR in MapServer!  :)

Good Luck!
-- 
------------------------------------------------------------
 Daniel Morissette                morissette at dmsolutions.ca
                 http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.

#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 400 300

# This is the extents for the canada.tab file in lat/lon
EXTENT -52.6855 41.7072 -140.993 83.1159
UNITS DD

#SHAPEPATH "../data"
IMAGECOLOR 255 255 255

#LABELOVERLAP FALSE

#
# Start of web interface definition
#
WEB
  IMAGEPATH "/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
END

LAYER
  NAME country
  TYPE POLYGON
  STATUS DEFAULT
  CONNECTIONTYPE OGR
  CONNECTION data/canada.tab
  CLASS
    COLOR 0 255 0
    OUTLINECOLOR 0 0 0
  END
END

END # Map File




More information about the mapserver-users mailing list