<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:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1F497D"><o:p> </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:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> 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> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">All,</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">So, I'm trying to make an imagemap of line segments that are all only two vertices long. (two-point line strings) from postgres, I've verified this with to_NumPoints on both
of the features described below. This same template process works fine with SHP files. I have to be missing something obvious.</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">Using this call(which grabs two of the segments):</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><u><span style="font-family:"Comic Sans MS";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&mapsize=924%20570&mode=nquery&searchmap=true&veh_id=2153&time_idx1=4/24/2012%209:55:00&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&mapsize=924%20570&mode=nquery&searchmap=true&veh_id=2153&time_idx1=4/24/2012%209:55:00&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> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">and that generates this SQL:
</span><o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">select "esn","veh_id","time_idx1","time_idx2","time_interval","time_diff_secs","dist","gps_speed1","gps_speed2","calc_speed","bearing",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
as geom,"veh_id" from public.stmaint_trails_segments as t where the_geom && 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 > '4/24/2012 9:55:00' AND time_idx2 <'4/24/2012 9:56:00')</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">and SQL result:</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">11031823;"2153";"2012-04-24 09:55:13-05";"2012-04-24 09:55:31-05";"00:00:18";"18";474.708833608277;15.9;18.9;17.9813952124347;356.698784312184;"0107000000010000000102000000020000009aec99afc035214144b128eb9c430341158476038a3521411f0e92496c520341";"2153"</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier">11031823;"2153";"2012-04-24 09:55:31-05";"2012-04-24 09:55:50-05";"00:00:19";"19";474.002298490239;18.9;13.1;17.0096518596976;359.825436952247;"010700000001000000010200000002000000158476038a3521411f0e92496c52034199201020873521413bbac5493c610341";"2153"</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">from this TEMPLATE:</span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><popup class="VEHICLES" shape="poly" coords="[shpxy proj=image buffer=7px]"></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><title>ID: [veh_id]</title></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="ESN:"> [esn]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="TimeStamp:"> [time_idx2]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="Speed (GPS):"> [calc_speed]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="Bearing:"> [bearing]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="Distance this segment:"> [dist]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><item title="Time interval for this segment:"> [time_interval]</item></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"></popup></span>
<o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:"Comic Sans MS"">I get this as output:
</span><o:p></o:p></p>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0in;margin-bottom:.0001pt" id="line1"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-family:Courier"><<span class="start-tag">imagemap</span>><<span class="start-tag">name</span>>Vehicles</<span class="end-tag">name</span>><<span class="start-tag">style</span> <span class="attribute-name">name</span>="VEHICLES"><<span class="start-tag">title</span>><<span class="start-tag">attr</span> <span class="attribute-name">name</span>="background"
<span class="attribute-name">value</span>="#0A0A0A"/><<span class="start-tag">attr</span> <span class="attribute-name">name</span>="fontWeight"
<span class="attribute-name">value</span>="bold"/><<span class="start-tag">attr</span> <span class="attribute-name">name</span>="color"
<span class="attribute-name">value</span>="#FFFFFF"/></<span class="end-tag">title</span>><<span class="start-tag">contents</span>><<span class="start-tag">attr</span> <span class="attribute-name">name</span>="background"
<span class="attribute-name">value</span>="#AFA"/></<span class="end-tag">contents</span>></<span class="end-tag">style</span>><<span class="start-tag">popup</span> <span class="attribute-name">class</span>="VEHICLES"
<span class="attribute-name">shape</span>="poly" <span class="attribute-name">coords</span>="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"><<span class="start-tag">title</span>>ID: 2153</<span class="end-tag">title</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="ESN:"> 11031823</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="TimeStamp:"> 2012-04-24
09:55:31-05</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Speed (GPS):"> 17.9813952124347</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Bearing:"> 356.698784312184</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Distance
this segment:"> 474.708833608277</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Time interval for this segment:"> 00:00:18</<span class="end-tag">item</span>></<span class="end-tag">popup</span>><<span class="start-tag">popup</span> <span class="attribute-name">class</span>="VEHICLES"
<span class="attribute-name">shape</span>="poly" <span class="attribute-name">coords</span>="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"><<span class="start-tag">title</span>>ID: 2153</<span class="end-tag">title</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="ESN:"> 11031823</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="TimeStamp:"> 2012-04-24
09:55:50-05</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Speed (GPS):"> 17.0096518596976</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Bearing:"> 359.825436952247</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Distance
this segment:"> 474.002298490239</<span class="end-tag">item</span>><<span class="start-tag">item</span> <span class="attribute-name">title</span>="Time interval for this segment:"> 00:00:19</<span class="end-tag">item</span>></<span class="end-tag">popup</span>></<span class="end-tag">imagemap</span>></span><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<pre><o:p> </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:"Courier New""><o:p> </o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Comic Sans MS"">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:"Comic Sans MS"">bobb</span><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<pre><o:p> </o:p></pre>
<p style="margin:0in;margin-bottom:.0001pt"><o:p> </o:p></p>
</div>
</body>
</html>