<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        mso-believe-normal-left:yes;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.start-tag
        {mso-style-name:start-tag;}
span.end-tag
        {mso-style-name:end-tag;}
span.attribute-name
        {mso-style-name:attribute-name;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><![if mso 9]><style>p.MsoNormal
        {margin-left:3.0pt;}
</style><![endif]><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="margin-left:3.0pt;margin-top:3.0pt;margin-right:3.0pt;margin-bottom:.75pt">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If you just do a plain [shpxy] in a comment or something what do see?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Bob Basques<br>
<b>Sent:</b> Friday, April 27, 2012 11:18 AM<br>
<b>To:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-users] Imagemap making . . . (last post didn't format very well., sorry . . .)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">All,</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">So, I'm trying to make an imagemap of line segments that are all only two vertices long. &nbsp;(two-point line strings) from postgres, I've verified this with to_NumPoints on both
 of the features described below. &nbsp;This same template process works fine with SHP files. &nbsp;I have to be missing something obvious.</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">Using this call(which grabs two of the segments):</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><u><span style="font-family:&quot;Comic Sans MS&quot;;color:blue"><a href="http://gis.ci.stpaul.mn.us/datasets/DB/SAINT_PAUL/PUBLIC_WORKS/AVL/STREETS/trails_segments_public.map?mapext=555266.1928265226%20157102.55366815554%20577346.2664937055%20170723.37833297616&amp;mapsize=924%20570&amp;mode=nquery&amp;searchmap=true&amp;veh_id=2153&amp;time_idx1=4/24/2012%209:55:00&amp;time_idx2=4/24/2012%209:56:00"><i>http://gis.ci.stpaul.mn.us/datasets/DB/SAINT_PAUL/PUBLIC_WORKS/AVL/STREETS/trails_segments_public.map?mapext=555266.1928265226%20157102.55366815554%20577346.2664937055%20170723.37833297616&amp;mapsize=924%20570&amp;mode=nquery&amp;searchmap=true&amp;veh_id=2153&amp;time_idx1=4/24/2012%209:55:00&amp;time_idx2=4/24/2012%209:56:00</i></a></span></u>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">and that generates this SQL:
</span><o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">select &quot;esn&quot;,&quot;veh_id&quot;,&quot;time_idx1&quot;,&quot;time_idx2&quot;,&quot;time_interval&quot;,&quot;time_diff_secs&quot;,&quot;dist&quot;,&quot;gps_speed1&quot;,&quot;gps_speed2&quot;,&quot;calc_speed&quot;,&quot;bearing&quot;,encode(AsBinary(force_collection(force_2d(&quot;the_geom&quot;)),'NDR'),'hex')
 as geom,&quot;veh_id&quot; from public.stmaint_trails_segments as t where the_geom &amp;&amp; GeomFromText('POLYGON((555258.759391547 157102.553668156,555258.759391547 170723.378332976,577353.699928681 170723.378332976,577353.699928681 157102.553668156,555258.759391547 157102.553668156))',200068)
 and ( veh_id like '2153' AND time_idx1 &gt; '4/24/2012 9:55:00' AND time_idx2 &lt;'4/24/2012 9:56:00')</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">and SQL result:</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">11031823;&quot;2153&quot;;&quot;2012-04-24 09:55:13-05&quot;;&quot;2012-04-24 09:55:31-05&quot;;&quot;00:00:18&quot;;&quot;18&quot;;474.708833608277;15.9;18.9;17.9813952124347;356.698784312184;&quot;0107000000010000000102000000020000009aec99afc035214144b128eb9c430341158476038a3521411f0e92496c520341&quot;;&quot;2153&quot;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">11031823;&quot;2153&quot;;&quot;2012-04-24 09:55:31-05&quot;;&quot;2012-04-24 09:55:50-05&quot;;&quot;00:00:19&quot;;&quot;19&quot;;474.002298490239;18.9;13.1;17.0096518596976;359.825436952247;&quot;010700000001000000010200000002000000158476038a3521411f0e92496c52034199201020873521413bbac5493c610341&quot;;&quot;2153&quot;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">from this TEMPLATE:</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;popup class=&quot;VEHICLES&quot; shape=&quot;poly&quot; coords=&quot;[shpxy proj=image buffer=7px]&quot;&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;title&gt;ID: [veh_id]&lt;/title&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;ESN:&quot;&gt; [esn]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;TimeStamp:&quot;&gt; [time_idx2]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;Speed (GPS):&quot;&gt; [calc_speed]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;Bearing:&quot;&gt; [bearing]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;Distance this segment:&quot;&gt; [dist]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;item title=&quot;Time interval for this segment:&quot;&gt; [time_interval]&lt;/item&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;/popup&gt;</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:&quot;Comic Sans MS&quot;">I get this as output:
</span><o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
<p style="margin:0in;margin-bottom:.0001pt" id="line1"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">&lt;<span class="start-tag">imagemap</span>&gt;&lt;<span class="start-tag">name</span>&gt;Vehicles&lt;/<span class="end-tag">name</span>&gt;&lt;<span class="start-tag">style</span>&nbsp;<span class="attribute-name">name</span>=&quot;VEHICLES&quot;&gt;&lt;<span class="start-tag">title</span>&gt;&lt;<span class="start-tag">attr</span>&nbsp;<span class="attribute-name">name</span>=&quot;background&quot;
<span class="attribute-name">value</span>=&quot;#0A0A0A&quot;/&gt;&lt;<span class="start-tag">attr</span>&nbsp;<span class="attribute-name">name</span>=&quot;fontWeight&quot;
<span class="attribute-name">value</span>=&quot;bold&quot;/&gt;&lt;<span class="start-tag">attr</span>&nbsp;<span class="attribute-name">name</span>=&quot;color&quot;
<span class="attribute-name">value</span>=&quot;#FFFFFF&quot;/&gt;&lt;/<span class="end-tag">title</span>&gt;&lt;<span class="start-tag">contents</span>&gt;&lt;<span class="start-tag">attr</span>&nbsp;<span class="attribute-name">name</span>=&quot;background&quot;
<span class="attribute-name">value</span>=&quot;#AFA&quot;/&gt;&lt;/<span class="end-tag">contents</span>&gt;&lt;/<span class="end-tag">style</span>&gt;&lt;<span class="start-tag">popup</span>&nbsp;<span class="attribute-name">class</span>=&quot;VEHICLES&quot;
<span class="attribute-name">shape</span>=&quot;poly&quot; <span class="attribute-name">coords</span>=&quot;368,520 368,519 368,519 368,519 368,518 368,518 368,517 367,517 367,517 367,516 367,516 367,516 366,516 366,515 366,515 366,515 365,515 365,514 365,514 364,514 364,514
 364,514 364,513 363,513 363,513 362,513 362,513 362,513 361,513 361,513 361,513 360,513 360,513 360,513 359,513 359,513 358,513 358,514 358,514 357,514 357,514 357,514 357,515 356,515 356,515 356,515 356,516 355,516 355,516 355,517 355,517 355,517 354,517
 354,518 354,518 354,519 354,519 354,519 354,520 354,520 354,520 355,539 355,540 355,540 355,540 355,541 355,541 355,542 356,542 356,542 356,543 356,543 356,543 357,543 357,544 357,544 357,544 358,544 358,545 358,545 359,545 359,545 359,545 359,546 360,546
 360,546 361,546 361,546 361,546 362,546 362,546 362,546 363,546 363,546 363,546 364,546 364,546 365,546 365,545 365,545 366,545 366,545 366,545 366,544 367,544 367,544 367,544 367,543 368,543 368,543 368,542 368,542 368,542 369,542 369,541 369,541 369,540
 369,540 369,540 369,539 369,539 369,539 368,520&quot;&gt;&lt;<span class="start-tag">title</span>&gt;ID: 2153&lt;/<span class="end-tag">title</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;ESN:&quot;&gt;&nbsp;11031823&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;TimeStamp:&quot;&gt;&nbsp;2012-04-24
 09:55:31-05&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Speed (GPS):&quot;&gt;&nbsp;17.9813952124347&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Bearing:&quot;&gt;&nbsp;356.698784312184&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Distance
 this segment:&quot;&gt;&nbsp;474.708833608277&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Time interval for this segment:&quot;&gt;&nbsp;00:00:18&lt;/<span class="end-tag">item</span>&gt;&lt;/<span class="end-tag">popup</span>&gt;&lt;<span class="start-tag">popup</span>&nbsp;<span class="attribute-name">class</span>=&quot;VEHICLES&quot;
<span class="attribute-name">shape</span>=&quot;poly&quot; <span class="attribute-name">coords</span>=&quot;368,500 368,500 368,499 368,499 368,499 368,498 368,498 368,497 367,497 367,497 367,496 367,496 367,496 366,496 366,495 366,495 366,495 365,495 365,494 365,494 364,494
 364,494 364,494 364,493 363,493 363,493 362,493 362,493 362,493 361,493 361,493 361,493 360,493 360,493 360,493 359,493 359,493 358,493 358,494 358,494 358,494 357,494 357,494 357,495 356,495 356,495 356,495 356,496 355,496 355,496 355,496 355,497 355,497
 354,497 354,498 354,498 354,499 354,499 354,499 354,500 354,500 354,520 354,520 354,521 354,521 354,521 354,522 354,522 354,523 355,523 355,523 355,524 355,524 355,524 356,524 356,525 356,525 356,525 357,525 357,526 357,526 358,526 358,526 358,526 358,527
 359,527 359,527 360,527 360,527 360,527 361,527 361,527 361,527 362,527 362,527 362,527 363,527 363,527 364,527 364,526 364,526 364,526 365,526 365,526 365,525 366,525 366,525 366,525 366,524 367,524 367,524 367,524 367,523 367,523 368,523 368,522 368,522
 368,521 368,521 368,521 368,520 368,520 368,500&quot;&gt;&lt;<span class="start-tag">title</span>&gt;ID: 2153&lt;/<span class="end-tag">title</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;ESN:&quot;&gt;&nbsp;11031823&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;TimeStamp:&quot;&gt;&nbsp;2012-04-24
 09:55:50-05&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Speed (GPS):&quot;&gt;&nbsp;17.0096518596976&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Bearing:&quot;&gt;&nbsp;359.825436952247&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Distance
 this segment:&quot;&gt;&nbsp;474.002298490239&lt;/<span class="end-tag">item</span>&gt;&lt;<span class="start-tag">item</span>&nbsp;<span class="attribute-name">title</span>=&quot;Time interval for this segment:&quot;&gt;&nbsp;00:00:19&lt;/<span class="end-tag">item</span>&gt;&lt;/<span class="end-tag">popup</span>&gt;&lt;/<span class="end-tag">imagemap</span>&gt;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<pre><br><br><br><o:p></o:p></pre>
<p style="margin:0in;margin-bottom:.0001pt" id="line1"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:&quot;Comic Sans MS&quot;">Where the heck are all those COORD values coming from, shouldn't there only be four (4) point pairs per feature (or is it five, repeat last point)?Thanks</span><span style="font-family:&quot;Comic Sans MS&quot;">bobb</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
<pre><o:p>&nbsp;</o:p></pre>
<p style="margin:0in;margin-bottom:.0001pt"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>