Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-12 Thread Lime, Steve D (MNIT)
The shpext tag can re-project, format and buffer a shapes extent if that helps.

From: Basques, Bob (CI-StPaul) [mailto:bob.basq...@ci.stpaul.mn.us]
Sent: Wednesday, July 12, 2017 8:37 AM
To: Lime, Steve D (MNIT) <steve.l...@state.mn.us>
Cc: Stephen Woodbridge <wood...@swoodbridge.com>; 
mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Fwd: Zoom to something and display in one shot 
from MapServer CGI.

Steve (L),

That’s really close to what I was looking for.  I vaguely remembered something 
going on enhancement wise, related to URL requests inside of a MapServer 
request.

I’ll try this out and get back here with the results.

bobb


On Jul 11, 2017, at 4:55 PM, Lime, Steve D (MNIT) 
<steve.l...@state.mn.us<mailto:steve.l...@state.mn.us>> wrote:

You can also do pure mapserver with a query layer and a URL template. It's 
doing a dynamic redirect but it's a single call from your perspective. You'd 
have a layer like so:

LAYER
 NAME 'parcel_query'
 TYPE QUERY
 DATA 'parcels'
 VALIDATION
   qstring '^[0-9]{16}$' # 16-digit pin number
 END
 TEMPLATE 'http://{url to display service}=[shpext]'
END

and then a query URL like so:

 
http://.../cgi-bin/mapserv?map=mymap.map?mode=itemquery=parcels=pin=202923230045

Assumes one feature per pin...

It's not a pretty URL, if that's needed use a script as Steve suggests or 
something like mod_rewrite in front.

Steve

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Stephen Woodbridge
Sent: Tuesday, July 11, 2017 1:07 PM
To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: Re: [mapserver-users] Fwd: Zoom to something and display in one shot 
from MapServer CGI.

Bobb,

If you using sql you can do this in one pass, just write a trivial php
script that returns an image.

1. connect to db
2. sql to query expanded bbox of parcel
   select st_astext(st_extent(st_expand(geom, delta)))
 from parcels where pin=?
3. create url to mapserver based on bbox and image size
5. header('Content-type: image/png');
4. passthru(url);

Don't make it more complicated than it needs to be. You can do the same
using perl, python, script language of your choice.

-Steve

On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:




Hi Steve,

I want to send a CGI request like :  ServerName?pin=202923230045

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.

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 . . . .

bobb



On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge
<wood...@swoodbridge.com<mailto:wood...@swoodbridge.com> 
<mailto:wood...@swoodbridge.com>> wrote:

On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:

All,
It’s probably because it’s Tues. but I think I’ve asked this before
in the past . . .
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.
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.

Bobb,

What are you trying to zoom? the image or the client?

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.

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.

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> 
<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


"If you're going through hell, keep going. “
- Winston Churchill




"Be nice to people on your way up because you meet them on your way down."
   - Jimmy Durante





_

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-12 Thread Basques, Bob (CI-StPaul)
Steve (L),

That’s really close to what I was looking for.  I vaguely remembered something 
going on enhancement wise, related to URL requests inside of a MapServer 
request.

I’ll try this out and get back here with the results.

bobb


On Jul 11, 2017, at 4:55 PM, Lime, Steve D (MNIT) 
<steve.l...@state.mn.us<mailto:steve.l...@state.mn.us>> wrote:

You can also do pure mapserver with a query layer and a URL template. It's 
doing a dynamic redirect but it's a single call from your perspective. You'd 
have a layer like so:

LAYER
 NAME 'parcel_query'
 TYPE QUERY
 DATA 'parcels'
 VALIDATION
   qstring '^[0-9]{16}$' # 16-digit pin number
 END
 TEMPLATE 'http://{url to display service}=[shpext]'
END

and then a query URL like so:

 
http://.../cgi-bin/mapserv?map=mymap.map?mode=itemquery=parcels=pin=202923230045

Assumes one feature per pin...

It's not a pretty URL, if that's needed use a script as Steve suggests or 
something like mod_rewrite in front.

Steve

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Stephen Woodbridge
Sent: Tuesday, July 11, 2017 1:07 PM
To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: Re: [mapserver-users] Fwd: Zoom to something and display in one shot 
from MapServer CGI.

Bobb,

If you using sql you can do this in one pass, just write a trivial php
script that returns an image.

1. connect to db
2. sql to query expanded bbox of parcel
   select st_astext(st_extent(st_expand(geom, delta)))
 from parcels where pin=?
3. create url to mapserver based on bbox and image size
5. header('Content-type: image/png');
4. passthru(url);

Don't make it more complicated than it needs to be. You can do the same
using perl, python, script language of your choice.

-Steve

On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:


Hi Steve,

I want to send a CGI request like :  ServerName?pin=202923230045

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.

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 . . . .

bobb


On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge
<wood...@swoodbridge.com<mailto:wood...@swoodbridge.com> 
<mailto:wood...@swoodbridge.com>> wrote:

On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:
All,
It’s probably because it’s Tues. but I think I’ve asked this before
in the past . . .
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.
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.

Bobb,

What are you trying to zoom? the image or the client?

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.

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.

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


"If you're going through hell, keep going. “
- Winston Churchill





"Be nice to people on your way up because you meet them on your way down."
   - Jimmy Durante





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Lime, Steve D (MNIT)
You can also do pure mapserver with a query layer and a URL template. It's 
doing a dynamic redirect but it's a single call from your perspective. You'd 
have a layer like so:

LAYER
  NAME 'parcel_query'
  TYPE QUERY
  DATA 'parcels'
  VALIDATION
qstring '^[0-9]{16}$' # 16-digit pin number
  END
  TEMPLATE 'http://{url to display service}=[shpext]'
END

and then a query URL like so:

  
http://.../cgi-bin/mapserv?map=mymap.map?mode=itemquery=parcels=pin=202923230045

Assumes one feature per pin...

It's not a pretty URL, if that's needed use a script as Steve suggests or 
something like mod_rewrite in front.

Steve

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Stephen Woodbridge
Sent: Tuesday, July 11, 2017 1:07 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Fwd: Zoom to something and display in one shot 
from MapServer CGI.

Bobb,

If you using sql you can do this in one pass, just write a trivial php 
script that returns an image.

1. connect to db
2. sql to query expanded bbox of parcel
select st_astext(st_extent(st_expand(geom, delta)))
  from parcels where pin=?
3. create url to mapserver based on bbox and image size
5. header('Content-type: image/png');
4. passthru(url);

Don't make it more complicated than it needs to be. You can do the same 
using perl, python, script language of your choice.

-Steve

On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:
> 
>>
>> Hi Steve,
>>
>> I want to send a CGI request like :  ServerName?pin=202923230045
>>
>> 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.
>>
>> 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 . . . .
>>
>> bobb
>>
>>
>>> On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge 
>>> <wood...@swoodbridge.com <mailto:wood...@swoodbridge.com>> wrote:
>>>
>>> On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:
>>>> All,
>>>> It’s probably because it’s Tues. but I think I’ve asked this before 
>>>> in the past . . .
>>>> 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.
>>>> 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.
>>>
>>> Bobb,
>>>
>>> What are you trying to zoom? the image or the client?
>>>
>>> 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.
>>>
>>> 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.
>>>
>>> -Steve W
>>>
>>> ---
>>> This email has been checked for viruses by Avast antivirus software.
>>> https://www.avast.com/antivirus
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org>
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> "If you're going through hell, keep going. “
>> - Winston Churchill
>>
>>
> 
> 
> 
> "Be nice to people on your way up because you meet them on your way down."
> - Jimmy Durante
> 
> 
> 
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Andy Colson

On 7/11/2017 1:43 PM, Basques, Bob (CI-StPaul) wrote:

Steve,

Yeah, my poison is Perl.  Was just trying to make it simpler is all.

I have a few services already in place like this.

A separate service it is then . . .

bobb


You want something like this:
http://maps.camavision.com/map/jasperia?pin=08.34.204.012


I use perl with mapscript, the request looks like:

my $xpin = $req->param('pin');
# pin can only contain letters and numbers
($xpin) = $xpin =~ /(\w+)/;

my $map = new mapscript::mapObj($filename);

$q = $db->prepare(
"select * from $schema.getpoint where pin = \$1",
{pg_server_prepare => 0}
);

getPoint returns box2d(st_expand(the_geom, 100)) for a single pin.

Then we generate some javascript:

if ($zoom =~ /BOX\(([-0-9\.]+)\s+([-0-9\.]+),([-0-9\.]+)\s+([-0-9\.]+)\)/)
{
$zoom = "zoomToBound($1, $2, $3, $4);\n";
}

That variable is included in the html, and I have a javascript library 
function:


function zoomToBound(x1, y1, x2, y2) {
var bb = new OpenLayers.Bounds.fromArray([x1, y1, x2, y2]);
map.zoomToExtent(bb, true);
}


-Andy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Basques, Bob (CI-StPaul)
Steve,

Yeah, my poison is Perl.  Was just trying to make it simpler is all.

I have a few services already in place like this.

A separate service it is then . . .

bobb




On Jul 11, 2017, at 1:06 PM, Stephen Woodbridge 
> wrote:

Bobb,

If you using sql you can do this in one pass, just write a trivial php script 
that returns an image.

1. connect to db
2. sql to query expanded bbox of parcel
  select st_astext(st_extent(st_expand(geom, delta)))
from parcels where pin=?
3. create url to mapserver based on bbox and image size
5. header('Content-type: image/png');
4. passthru(url);

Don't make it more complicated than it needs to be. You can do the same using 
perl, python, script language of your choice.

-Steve

On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:

Hi Steve,

I want to send a CGI request like :  ServerName?pin=202923230045

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.

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 . . . .

bobb


On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge 
 
> wrote:

On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:
All,
It’s probably because it’s Tues. but I think I’ve asked this before in the past 
. . .
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.
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.

Bobb,

What are you trying to zoom? the image or the client?

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.

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.

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org 
https://lists.osgeo.org/mailman/listinfo/mapserver-users


"If you're going through hell, keep going. “
- Winston Churchill


"Be nice to people on your way up because you meet them on your way down."
   - Jimmy Durante
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users



“There is nothing quite so useless as doing with great efficiency something 
that should not be done at all.”
- Peter Drucker





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Stephen Woodbridge

Bobb,

If you using sql you can do this in one pass, just write a trivial php 
script that returns an image.


1. connect to db
2. sql to query expanded bbox of parcel
   select st_astext(st_extent(st_expand(geom, delta)))
 from parcels where pin=?
3. create url to mapserver based on bbox and image size
5. header('Content-type: image/png');
4. passthru(url);

Don't make it more complicated than it needs to be. You can do the same 
using perl, python, script language of your choice.


-Steve

On 7/11/2017 12:22 PM, Basques, Bob (CI-StPaul) wrote:




Hi Steve,

I want to send a CGI request like :  ServerName?pin=202923230045

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.


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 . . . .


bobb


On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge 
> wrote:


On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:

All,
It’s probably because it’s Tues. but I think I’ve asked this before 
in the past . . .
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.
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.


Bobb,

What are you trying to zoom? the image or the client?

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.


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.


-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org 
https://lists.osgeo.org/mailman/listinfo/mapserver-users



"If you're going through hell, keep going. “
- Winston Churchill






"Be nice to people on your way up because you meet them on your way down."
- Jimmy Durante





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Dan Little
You're likely better off with a simple script that computes the bounding
box and then uses mapserver to render the map.

E.G.: /cgi-bin/parcel-view.py?PIN=[xyz]

def getParcelBBOX(conn, pin):


On Tue, Jul 11, 2017 at 11:22 AM, Basques, Bob (CI-StPaul) <
bob.basq...@ci.stpaul.mn.us> wrote:

>
>
> Hi Steve,
>
> I want to send a CGI request like :  ServerName?pin=202923230045
>
> 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.
>
> 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 . . . .
>
> bobb
>
>
> On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge 
> wrote:
>
> On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:
>
> All,
> It’s probably because it’s Tues. but I think I’ve asked this before in the
> past . . .
> 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.
> 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.
>
>
> Bobb,
>
> What are you trying to zoom? the image or the client?
>
> 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.
>
> 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.
>
> -Steve W
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> "If you're going through hell, keep going. “
> - Winston Churchill
>
>
>
>
>
> "Be nice to people on your way up because you meet them on your way down."
>  - Jimmy Durante
>
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Basques, Bob (CI-StPaul)


Hi Steve,

I want to send a CGI request like :  ServerName?pin=202923230045

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.

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 . . . .

bobb


On Jul 11, 2017, at 10:38 AM, Stephen Woodbridge 
> wrote:

On 7/11/2017 10:39 AM, Basques, Bob (CI-StPaul) wrote:
All,
It’s probably because it’s Tues. but I think I’ve asked this before in the past 
. . .
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.
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.

Bobb,

What are you trying to zoom? the image or the client?

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.

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.

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


"If you're going through hell, keep going. “
- Winston Churchill





"Be nice to people on your way up because you meet them on your way down."
- Jimmy Durante



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users