MapServer / MapServer-import

3 stars 2 forks source link

set opacity of existing rasters through SLD #777

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: bartvde@osgis.nl Date: 2004/07/19 - 09:18

Hi,

I am trying to use an SLD to influence the opacity of an existing raster but
it's not working. I use the maptools binary from 14-06-04.

The SLD I use:
http://www.vz.geodan.nl:1112/rasteropacity.sld

The URL I am trying:
http://www.vz.geodan.nl:1112/cgi-bin/mapserv_43.exe?map=/ms4w/apps/general/map/geostreets8bit.map&layers=layer_5&request=GetMap&format=image/png&srs=EPSG:28992&bbox=100000,400000,200000,500000&width=750&height=750&version=1.1.1&sld=http://www.vz.geodan.nl:1112/rasteropacity.sld

I both tried PNG and PNG24 output, in both cases the result is not influenced by
the SLD.
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2004/07/19 - 09:19

Added Assefa to the cc.
tbonfort commented 12 years ago

Author: assefa Date: 2004/07/19 - 16:58

Bart,

 Could you do a couple of tests : use php mapscript to apply the sld and see the
resulting layer. Here is a sample script :

  dl ("php_mapscript_43.dll");
  $oMap = ms_newmapObj("c:/msapps/world_testdata/map/raster.map");
  $oLayer = $oMap->getlayerbyname("landsat");

$oLayer->applysldurl("http://localhost/msapps/world_testdata/tests/sld_tests/sld_raster_ttt.xml");
  $oMap->save("c:/msapps/world_testdata/tests/sld_tests/bug777.map");

  I have tried your sld and the opacity is read properly and transofrmed into a
Transparency parameter on the layer.  

  I would like to know if the layer is not well built or it is another issue
with transparency on your layer.
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2004/07/19 - 20:24

Hi Assefa,

thanks for the quick answer.

I tried your script, I get the following for my layer_2 in the output MAP file:

  LAYER
    DUMP TRUE
    MAXSCALE 25000
      METADATA
        "WMS_SRS"   "EPSG:28992 EPSG:4326"
        "WMS_ABSTRACT"  "Geostreets Level 2"
        "WMS_TITLE" "Geostreets Level 2"
      END
    MINSCALE 12000
    NAME "layer_2"
    SIZEUNITS PIXELS
    STATUS ON
    TILEINDEX "F:/Data/Geostreets/2/level2.shp"
    TILEITEM "location"
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE RASTER
    UNITS METERS
  END

Do you need anymore info? Please let me know.
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2004/07/19 - 20:38

Assefa, BTW: the 14th June binaries include the Opacity support or not?
tbonfort commented 12 years ago

Author: assefa Date: 2004/07/19 - 21:19

Changes in CVS were done on June 14. So not sure if the binaries include the
support. I will check these binaries later on today. But for sure the latest
binaries on maptools contain this support.
tbonfort commented 12 years ago

Author: assefa Date: 2004/07/19 - 22:01

Bart,

 There are no 4.3 windows binaries on maptools dated on June 14 (latest are
dated June 16 and June 25). Are your binaries from maptools ? If they are from
the mapserver site and dated from June 14, the opacity changes is certainly not
included. If that is the case, please updraed to newer version.
tbonfort commented 12 years ago

Author: assefa Date: 2004/10/25 - 21:16

Closing the bug. If there is a problem with the functionnality please reopen.