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

2017-09-11 Thread Lime, Steve D (MNIT)
Looks like you need to use the polygon extent to compute the rotation angle but 
then should use the extent of the rotated polygon for the map extent.



From: Travis Kirstine 
Sent: Friday, September 8, 2017 9:23 PM
To: Carlos Ruiz; Lime, Steve D (MNIT)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] rotate and fit based on polygon

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
[https://lh6.googleusercontent.com/MLd9NjXDV9xuCgkbcxcQIqdUGvnuzkGeZhP51pN3RsEHd2FO5g=w1200-h630-p]

rotate_image.jpg
drive.google.com






On 8 September 2017 at 16:25, Carlos Ruiz 
mailto:boolean10...@yahoo.com>> 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 
mailto: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] On-the-fly hillshade with Mapserver and gdaldem

2017-09-11 Thread Jeff McKenna
This is exactly what the purpose of the ZOO-Project (WPS standard) is 
(http://zoo-project.org/), and in fact there is already an add-on 
ZOO-Project package available for MS4W (http://ms4w.com/download.html); 
however the GDAL/OGR services need to be added to MS4W, which I have 
created a ticket for you to follow along its progress at: 
http://www.ms4w.com/trac/ticket/133


Currently the MS4W ZOO-Project package supports PHP and MapServer only; 
the GDAL/OGR services will be added shortly.  (probably the next MS4W 
release will contain these in the base MS4W, not as an add-on)  There is 
also an existing ticket for a Python service, which will come in MS4W 4.x


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2017-09-11 7:14 AM, Rahkonen Jukka (MML) wrote:

Hi,

Could it be possible to generate multidirectional hillshade on-the-fly 
for example by running gdaldem http://www.gdal.org/gdaldem.html in the 
background?


-Jukka Rahkonen-



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

Re: [mapserver-users] On-the-fly hillshade with Mapserver and gdaldem

2017-09-11 Thread Even Rouault
On lundi 11 septembre 2017 10:14:13 CEST Rahkonen Jukka (MML) wrote:
> Hi,
> 
> Could it be possible to generate multidirectional hillshade on-the-fly for
> example by running gdaldem http://www.gdal.org/gdaldem.html in the
> background?

Would require changes to MapServer. Either creating a CONNECTION HILLSHADE (ala 
CONTOUR), or something more generic that would enable to run an arbitrary 
executable 
with options

Another way of doing it with GDAL 2.2 is to use VRT with pixel functions in 
Python:
http://www.gdal.org/gdal_vrttut.html#gdal_vrttut_derived_python

There's actually one example to do (single direction) hillshading.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] On-the-fly hillshade with Mapserver and gdaldem

2017-09-11 Thread Rahkonen Jukka (MML)
Hi,

Could it be possible to generate multidirectional hillshade on-the-fly for 
example by running gdaldem http://www.gdal.org/gdaldem.html in the background?

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