<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Steve,
<div class=""><br class="">
</div>
<div class="">Yeah, my poison is Perl.  Was just trying to make it simpler is all.
<div class=""><br class="">
</div>
<div class="">I have a few services already in place like this.</div>
<div class=""><br class="">
</div>
<div class="">A separate service it is then . . .</div>
<div class=""><br class="">
</div>
<div class="">bobb</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 11, 2017, at 1:06 PM, Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com" class="">woodbri@swoodbridge.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Bobb,<br class="">
<br class="">
If you using sql you can do this in one pass, just write a trivial php script that returns an image.<br class="">
<br class="">
1. connect to db<br class="">
2. sql to query expanded bbox of parcel<br class="">
  select st_astext(st_extent(st_expand(geom, delta)))<br class="">
    from parcels where pin=?<br class="">
3. create url to mapserver based on bbox and image size<br class="">
5. header('Content-type: image/png');<br class="">
4. passthru(url);<br class="">
<br class="">
Don't make it more complicated than it needs to be. You can do the same using perl, python, script language of your choice.<br class="">
<br class="">
-Steve<br class="">
<br class="">
On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:<br class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
Hi Steve,<br class="">
<br class="">
I want to send a CGI request like :  ServerName?pin=202923230045<br class="">
<br class="">
And zoom to the pin (parcel polygon) in the returned image and also add a buffer percentage.  This is for a reporting application.  I can do it with an intermediate service, but it’s been awhile since I did this, and was wondering if anything new in MapServer
 might help with this for a single pass approach.<br class="">
<br class="">
The zoom parameters would be hardcoded into the MapFILE in an ideal world, I can build an SQL for this for example, but I recall I couldn’t use the BBOX returned from the SQL as a BBOX for Mapserver parent call, my memory is cloudy on that capability from MapServer
 though, hence the question.  Now that you have me talking it through though, I think the last time I asked about this it was to inquire about possibly chaining more than one MapServer call together to get the result.  I think there were fears at the time about
 possible runaway processes being created . . . .<br class="">
<br class="">
bobb<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com" class="">woodbri@swoodbridge.com</a> <<a href="mailto:woodbri@swoodbridge.com" class="">mailto:woodbri@swoodbridge.com</a>>> wrote:<br class="">
<br class="">
On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:<br class="">
<blockquote type="cite" class="">All,<br class="">
It’s probably because it’s Tues. but I think I’ve asked this before in the past . . .<br class="">
I have a DB with PIN numbers for PARCELS and I want to be able to auto-zoom(with buffer)  to a PARCEL by just sending in a PIN number via CGI.<br class="">
can the BBOX be pulled from the DB based on the geom in one shot?  I’ve done this in the past with a Webservice that went and grabbed the BBOX separately, then assembled the url for getting the graphic back from Mapserver.<br class="">
</blockquote>
<br class="">
Bobb,<br class="">
<br class="">
What are you trying to zoom? the image or the client?<br class="">
<br class="">
If it is the client then how is mapserver on the server supposed to tell the client it needs to zoom? You have to query the server to get the bbox then make the client zoom appropriately.<br class="">
<br class="">
For the image, assuming you want a static image showing the parcel, then I would write a php/python/perl script the you pass the PIN to and it does the work to figure out the extents and return the image.<br class="">
<br class="">
-Steve W<br class="">
<br class="">
---<br class="">
This email has been checked for viruses by Avast antivirus software.<br class="">
<a href="https://www.avast.com/antivirus" class="">https://www.avast.com/antivirus</a><br class="">
<br class="">
_______________________________________________<br class="">
mapserver-users mailing list<br class="">
mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org><br class="">
https://lists.osgeo.org/mailman/listinfo/mapserver-users<br class="">
</blockquote>
<br class="">
<br class="">
"If you're going through hell, keep going. “<br class="">
- Winston Churchill<br class="">
<br class="">
<br class="">
</blockquote>
"Be nice to people on your way up because you meet them on your way down."<br class="">
   - Jimmy Durante<br class="">
_______________________________________________<br class="">
mapserver-users mailing list<br class="">
<a href="mailto:mapserver-users@lists.osgeo.org" class="">mapserver-users@lists.osgeo.org</a><br class="">
https://lists.osgeo.org/mailman/listinfo/mapserver-users<br class="">
</blockquote>
<br class="">
_______________________________________________<br class="">
mapserver-users mailing list<br class="">
<a href="mailto:mapserver-users@lists.osgeo.org" class="">mapserver-users@lists.osgeo.org</a><br class="">
https://lists.osgeo.org/mailman/listinfo/mapserver-users</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: 'Comic Sans MS'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class=""><br class="Apple-interchange-newline">
<br class="">
</div>
<div class="">“There is nothing quite so useless as doing with great efficiency something that should not be done at all.” </div>
<div class="">                        - Peter Drucker</div>
<div class=""><br class="">
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline" style="color: rgb(0, 0, 0); font-family: 'Comic Sans MS'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</body>
</html>