Re: [mapserver-users] rotate and fit based on polygon

2017-09-08 Thread Travis Kirstine
Thanks Carlos, we've employed the method you've suggested already but not
getting the results we are looking for, perhaps the linked image will help
illustrate my problem

https://drive.google.com/file/d/0BwWJtNuZjvCUR1AtVEZVLTdCbk0/view?usp=sharing



On 8 September 2017 at 16:25, Carlos Ruiz  wrote:

> Travis,
>
> Do you have the polygons in PostGIS ? Maybe you can get the extent by
> using st_extent(geom) and retrieve it on PHP/Python to set the map extent.
> You could also get a margin by multiplying extent b 1.1 (10%).
>
>
>
> On Thursday, September 7, 2017, 1:27:06 PM CDT, Travis Kirstine <
> traviskirst...@gmail.com> wrote:
>
>
> I have a bunch of polygons that represent 8.5 x 11 printed map sheets.
> I'd like to produce images for each sheet that best fits the polygon within
> the outputted image.  We've tried using mapscript by setting the map extent
> based on the bbox of the source polygon and rotation but results aren't
> great depending on the orientation of the source polygon.  Is there a way
> to set the "extent" based on a polygon?
> ___
> 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] rotate and fit based on polygon

2017-09-08 Thread Carlos Ruiz
Travis,
Do you have the polygons in PostGIS ? Maybe you can get the extent by using 
st_extent(geom) and retrieve it on PHP/Python to set the map extent. You could 
also get a margin by multiplying extent b 1.1 (10%).


On Thursday, September 7, 2017, 1:27:06 PM CDT, Travis Kirstine 
 wrote:  
 
 I have a bunch of polygons that represent 8.5 x 11 printed map sheets.  I'd 
like to produce images for each sheet that best fits the polygon within the 
outputted image.  We've tried using mapscript by setting the map extent based 
on the bbox of the source polygon and rotation but results aren't great 
depending on the orientation of the source polygon.  Is there a way to set the 
"extent" based on a polygon? ___
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] rotate and fit based on polygon

2017-09-08 Thread Lime, Steve D (MNIT)
It’s kinda hard to picture what you’re after, any way to help visualize it?

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Travis Kirstine
Sent: Thursday, September 07, 2017 1:27 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] rotate and fit based on polygon

I have a bunch of polygons that represent 8.5 x 11 printed map sheets.  I'd 
like to produce images for each sheet that best fits the polygon within the 
outputted image.  We've tried using mapscript by setting the map extent based 
on the bbox of the source polygon and rotation but results aren't great 
depending on the orientation of the source polygon.  Is there a way to set the 
"extent" based on a polygon?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Multi template

2017-09-08 Thread Lime, Steve D (MNIT)
Hi Pierre: Ok, I whipped up a test. It is possible to use both the legacy 
templates and the output format method. The key is setting a value for the WEB 
object QUERYFORMAT parameter. If that parameter is set to some value that 
doesn't match any existing OUTPUTFORMAT names then MapServer will use the 
legacy approach. So this means you can do something like:

WEB
  QUERYFORMAT "default" # use the legacy approach
END

and as long as there is no OUTPUTFORMAT named "default" then MapServer with use 
the legacy approach. If you don't set QUERYFORMAT or set it to the name of a an 
existing OUTPUTFORMAT then there is no path to the legacy approach unless you 
set the CGI parameter qformat to something that doesn't exist.

I hope that's not too confusing.

I have a test case with  two OUTPUTFORMATs and QUERYFORMAT "default"...

  
http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery
 (gets legacy approach)
  
http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery&qformat=mytemplate1
 (gets OUTPUTFORMAT one)
  
http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery&qformat=mytemplate2
 (gets OUTPUTFORMAT two)

This is consistent with how I remember setting this up, it's just been awhile 
and I don't use the legacy approach much anymore.

Steve

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of pe_lord
Sent: Wednesday, September 06, 2017 7:56 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Multi template

What about your own curiosity?
I've retried and I get the same behavior. And you?

Pierre



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
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