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

yuth hor mofumyke at yahoo.com
Thu Feb 12 03:35:10 PST 2004


--0-1498750920-1076585710=:36989
Content-Type: text/plain; charset=us-ascii


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
--0-1498750920-1076585710=:36989
Content-Type: text/html; charset=us-ascii

<DIV>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US><FONT size=3><FONT face=Century>Hi all</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US><FONT size=3><FONT face=Century><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>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</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: Century; mso-bidi-font-family: Century"><SPAN style="mso-list: Ignore"><FONT face=Century size=3>-</FONT><SPAN style="FONT: 7pt 'Times New Roman'">        </SPAN></SPAN></SPAN><SPAN lang=EN-US><FONT face=Century size=3>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, </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><FONT size=3><SPAN lang=EN-US><FONT face=Century>http://host/cgi-bin/mapserv_41.exe?map=D:\apache_group\Apache\htdocs\umn2svg\test.map& mode=nquery& qlayer=water<SPAN style="mso-spacerun: yes">  </SPAN></FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Century; mso-hansi-font-family: Century; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">à</SPAN></SPAN><SPAN lang=EN-US><FONT face=Century> return water layer</FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><FONT size=3><SPAN lang=EN-US><FONT face=Century>http://host/cgi-bin/mapserv_41.exe?map=D:\apache_group\Apache\htdocs\umn2svg\test.map& mode=nquery& qlayer=contour<SPAN style="mso-spacerun: yes">  </SPAN></FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Century; mso-hansi-font-family: Century; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">à</SPAN></SPAN><SPAN lang=EN-US><FONT face=Century> return contour layer</FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>But if we didn’t specify qlayer=”” it will return all layer in the mapfile</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: Century; mso-bidi-font-family: Century"><SPAN style="mso-list: Ignore"><FONT face=Century size=3>-</FONT><SPAN style="FONT: 7pt 'Times New Roman'">        </SPAN></SPAN></SPAN><SPAN lang=EN-US><FONT face=Century size=3>Can we enclose the Raster image that generate by Mapserver from tmp directory together with the svg output?</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>I try to do but it not success. No image in the tmp directory.</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>----CGI request---</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century><FONT size=3><A href="http://host/cgi-bin/mapserv?map=/usr/local/apache/htdocs/umn2svg/thai-trysvgimage.map&mode=nquery&qlayer=ndvi">http://host/cgi-bin/mapserv?map=/usr/local/apache/htdocs/umn2svg/trysvgimage.map&mode=nquery&qlayer=ndvi</A><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century><FONT size=3>---- SVG return error ----</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century><FONT size=3>“mismatched tag: line6, column2” </FONT></FONT></SPAN></P><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><?xml version="1.0" encoding="utf-8"?><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"<SPAN style="mso-spacerun: yes">    </SPAN>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [<o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><SPAN style="mso-tab-count: 1">        </SPAN><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT
 size=3>]><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><svg><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><!-- this is the start of a layer --><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><g ><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3><image width="468" height="420" id="testsvg_Image_1_" xlink:href="../tmp/test10765838246078.jpg" /><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3></g><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS
 ゴシック"><FONT size=3><!-- this is the end of a layer --><o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN lang=EN-US><FONT face="MS ゴシック"><FONT size=3></svg><o:p></o:p></FONT></FONT></SPAN></PRE>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>---- mapfile ---</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>MAP<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>NAME 'test'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>EXTENT 325704 620898 1213325 2263428<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>SIZE 800 600 <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>STATUS ON<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>UNITS METERS<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt; TEXT-INDENT: 10.5pt; mso-char-indent-count: 1.0"><SPAN lang=EN-US><FONT size=3><FONT face=Century>IMAGETYPE JPEG<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>WEB<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>HEADER 'iheader.svg'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>FOOTER 'ifooter.svg'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>QUERYFORMAT 'image/svg+xml'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>IMAGEPATH "/usr/local/apache/htdocs/tmp/"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>IMAGEURL "../tmp/"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>END<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes">  </SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>LAYER<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>NAME ndvi<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>STATUS DEFAULT<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>DATA 'sptindex'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>TYPE QUERY<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN><SPAN style="mso-spacerun: yes">    </SPAN>HEADER image_header.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>FOOTER image_footer.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">        </SPAN>TEMPLATE image.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>END<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>END</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Anyone can give me some light?</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Thanks</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>Teerayut Horanont<o:p></o:p></FONT></FONT></SPAN></P></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Finance: <a href="http://us.rd.yahoo.com/evt=22055/*http://taxes.yahoo.com/filing.html">Get your refund fast by filing online</a>
--0-1498750920-1076585710=:36989--



More information about the MapServer-users mailing list