[Mapserver-users] Raster with SVG output in Mapserver 4.1 dev

Steve Lime steve.lime at dnr.state.mn.us
Thu Feb 19 08:51:53 PST 2004


You can get one layer at a time using the method you mention. Has this been a problem?

As for rasters, I would look at MapServer just as an image engine. Generate the SVG independently of the raster layer and use a call to MapServer from within the SVG (e.g. src=/cgi-bin/mapserv?map=...&mode=map) to get the layer you need as a GIF, PNG or JPEG image.

Steve

>>> yuth hor <mofumyke at yahoo.com> 2/12/2004 5:35:10 AM >>>

Hi all

 

Now, I have tested SVG output from the nightly build of Mapserver 4.1. It quite stable and work fine. Our test application, in this case, we will use Mapserver only as a SVG generator by request through CGI. My question is

 

-        Can we request each SVG layers by specify the layer name? (now we have to request one CGI statement as one SVG layer for example, 

 

http://host/cgi-bin/mapserv_41.exe?map=D:\apache_group\Apache\htdocs\umn2svg\test.map& mode=nquery& qlayer=water  à return water layer

http://host/cgi-bin/mapserv_41.exe?map=D:\apache_group\Apache\htdocs\umn2svg\test.map& mode=nquery& qlayer=contour  à return contour layer

 

But if we didn't specify qlayer="" it will return all layer in the mapfile

 

-        Can we enclose the Raster image that generate by Mapserver from tmp directory together with the svg output?

 

I try to do but it not success. No image in the tmp directory.

----CGI request---

http://host/cgi-bin/mapserv?map=/usr/local/apache/htdocs/umn2svg/trysvgimage.map&mode=nquery&qlayer=ndvi 

 

---- SVG return error ----

"mismatched tag: line6, column2" 

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"    "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [

        

]>

<svg>

<!-- this is the start of a layer -->

<g >

<image width="468" height="420" id="testsvg_Image_1_" xlink:href="../tmp/test10765838246078.jpg" />

</g>

<!-- this is the end of a layer -->

</svg>

 

---- mapfile ---

MAP

  NAME 'test'

  EXTENT 325704 620898 1213325 2263428

  SIZE 800 600 

  STATUS ON

  UNITS METERS

IMAGETYPE JPEG

  

 

  WEB

    HEADER 'iheader.svg'

    FOOTER 'ifooter.svg'

    QUERYFORMAT 'image/svg+xml'

    IMAGEPATH "/usr/local/apache/htdocs/tmp/"

    IMAGEURL "../tmp/"

  END

 

   

    LAYER

        NAME ndvi

        STATUS DEFAULT

        DATA 'sptindex'

        TYPE QUERY

        HEADER image_header.svg

        FOOTER image_footer.svg

        TEMPLATE image.svg

  END

  

END

 

Anyone can give me some light?

 

Thanks

 

Teerayut Horanont



---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online





More information about the MapServer-users mailing list