[ka-Map-users] imageformat

orc reinhard.ortner at edu.fh-kaernten.ac.at
Tue Oct 2 05:54:25 EDT 2007


hi, first thanks for your replay
but after the change the same problem:

here are my configurations:
-----------------------------
config.php:

$aszGMap = array (
         'title' => 'geoland.at',
         'path' => '/usr/share/ka-map-1.0-20070205/htdocs/geoland_test.map',
         'scales' => array( 600000, 250000, 120000, 75000, 30000, 10000 ),
         'format' =>'JPG'
         /* Sample authorized_users entry. See auth.php for more details:
          * ,'authorized_users' => array('popplace' => array('user1',
'user2'),
          *                              'park'     => array('user1')
          */
 );
------------------------------
part of my mapfile:

#Mapfile für Ka-Map

MAP
 TRANSPARENT ON
 NAME geoland_test
 STATUS ON
 SIZE 2400 1800
 EXTENT 390730 119473 594760 238680
 UNITS METERS
 IMAGECOLOR 255 255 255
 IMAGETYPE PNG

SYMBOLSET "/maps/umn/symbols/symbset.sym"
FONTSET   "/maps/umn/fonts/fonts.fnt"

OUTPUTFORMAT
  NAME jpeg
  DRIVER "GD/JPEG"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
END

WEB
  IMAGEPATH '/maps/images.tmp'
  IMAGEURL '/images.tmp'
  METADATA
    "WFS_TITLE"     "Geoland WMS(WFS) Kärnten"
    "WFS_SRS"       "EPSG:4326" 
    "WFS_ABSTRACT"  "Geodaten des Bundeslandes Kärnten als OGC-WFS"
    "WFS_ONLINERESOURCE"
"http://172.21.18.45/cgi-bin/mapserv?map=/usr/share/ka-map-1.0-20070205/htdocs/geoland_test.map"
    "wfs_maxfeatures" "200" 
    "WMS_SRS"         "EPSG:31285 EPSG:31284 EPSG:31286 EPSG:4326 EPSG:0"
          "WMS_TITLE"       "Geoland WMS Kärnten"
          "WMS_feature_INFO_MIME_TYPE" "text/html"
          "WMS_ABSTRACT"    "Geodaten des Bundeslandes Kärnten als OGC-WMS"
    "WMS_ONLINERESOURCE"
"http://172.21.18.45/cgi-bin/mapserv?map=/usr/share/ka-map-1.0-20070205/htdocs/geoland_test.map"
  END
END

# WEB
#   IMAGEPATH "/maps/images.tmp/"
#   IMAGEURL "/images.tmp/"
# END

  LEGEND
   TRANSPARENT TRUE
  END

  SCALEBAR
    TRANSPARENT TRUE
  END

  REFERENCE
   EXTENT 390730 119473 594760 238680
   SIZE 217 109
   IMAGE data/kaernten.png
COLOR -1 -1 -1
   OUTLINECOLOR 255 0 0
 END

  QUERYMAP
  STYLE HILITE
  COLOR 255 0 0
END

#####################################################################
######################### Orthophotos ###############################
#####################################################################

 LAYER
        NAME "Orthofotos"
        GROUP Orthophotos 
        TYPE Raster
        TILEINDEX "/home/geodata/shapes/ortho_ecw/focat_ecw.shp"
        TILEITEM "location"
        STATUS OFF

        METADATA
#          "queryable" "true"
#            imageformat "JPG"
        END #END Metadata

 END

.
.
.
.

END #END MAP

#####################################################################


But still, the image is not displayed correct!
further more, when i set the imageformat "JPG" in the Orthophotos Layer, the
Orthophoto will be loaded
(172.21.18.45/ka-map/title.php?map=gmap&t=-46336&l=155904&s=10000&g=Orthophotos&i=jpg)
but not displayed any more.

is there anything wrong in my mapfile?
the orthophotos are ok when i disply them in a Software like Pain or call
the mapfile with the DesktopGIS qGIS but not with ka-map?





Johan Van de Wauw wrote:
> 
> You can use the format section of your config.php to get 24 bit rendering:
> set format to "PNG24" or "JPG"
> 
> 106  $aszGMap = array (
> 107          'title' => 'GMap 75',
> 108          'path' => '../../gmap/htdocs/gmap75.map',
> 109          'scales' => array( 40000000, 25000000, 12000000, 7500000,
> 3000000,     1000000 ),
> 110          'format' =>'JPG'};
> 
> (you should empty the cache of your webserver and webbrowser before
> you see any difference)
> 
> ==
> There is however one disadvantage: in internet explorer 24-bit PNG are
> not transparent (and JPEG is never  transparent).
> This is usually not a problem for layers with orthophoto's, but could
> be a problem if you have vector/... layers on top of that.
> 
> If that's not the case in your application, stick to the first
> solution. If it is, you could try my little hack:
> 
>  I changed tile.php in my own application [
> http://zadeh.ugent.be/rwanda ] to make sure that only some layers
> (base layer and satellite layer) are drawn as PNG24, and the others as
> regular 8-bit PNG (with working transparency and smaller files).
> 
> I replaced the line:
> 
> setOutputFormat( $_REQUEST['i'] );
> 
> With
> 87,95c87
> <
> < ///////johan
> <    if ((strpos($groups, 'Base')>0)||((strpos($groups, 'atellite')>0)
> ||(strpos($groups, 'andsat')>0))
> <       {setOutputFormat('png24');}
> <    else
> < {     setOutputFormat('png');}
> <
> < ///////johan
> < //   setOutputFormat( $_REQUEST['i'] );
> 
> 
> On 10/2/07, orc <reinhard.ortner at edu.fh-kaernten.ac.at> wrote:
>>
>> again, i tried to show a few orthophotos in my map. The problem is the
>> orthophotos are shown in 8bit color not in 24bit. i tried jpg and ecw
>> pictures.
>> does anybody have a solution where i can tell ka-map that it should
>> disply
>> the orthophotos in 24bit?
>> imagetype and imageformat within the layer is basically ignored (except
>> when
>> i use the jpg source images and i change imagetype to "JPEG" the images
>> are
>> not displaye!)
>> --
>> View this message in context:
>> http://www.nabble.com/imageformat-tf4520772.html#a12993642
>> Sent from the ka-map-users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> ka-Map-users mailing list
>> ka-Map-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> 

-- 
View this message in context: http://www.nabble.com/imageformat-tf4520772.html#a12995947
Sent from the ka-map-users mailing list archive at Nabble.com.




More information about the ka-Map-users mailing list