Re: [mapserver-users] Re: Help (tipstricks) on raster datasetoptimization

2010-02-17 Thread Rahkonen Jukka
Hi,

The main point is to build overviews for the whole site, isn't it? And then one 
input will be enough for Mapserver. Tileindex does not understand overviews, 
and if such are created as an external image, the overview image must be 
combined with the tileindex layer by putting them into same GROUP and add some 
scale dependency. It works also well, but your solution is more simple to use. 
Only disadvantage I can see there is that in my tests a long time ago Mapserver 
was quite a lot faster if it was using tileindex than having .vrt file 
referring to same originals as an input.  Things could have changed, and 
because your system is utilising overviews the originals will be opened only 
when zoomed in rather close and there is perhaps not so much .vrt file 
interpretation needed.

If Mapserver still happens to be faster with tileindex than .vrt, how about 
making an tileindex overview builder utility for Mapserver, and add support of 
utilising tileindex overviews somehow directly, without grouping scale 
depentent layers?  GROUP layers are not very nice with WMS usage because also 
the component layers are advertised by the service, not only the group.

-Jukka Rahkonen-

 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta BrainDrain
 Lähetetty: 17. helmikuuta 2010 10:31
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Re: Help (tipstricks) on raster 
 datasetoptimization
 
 
 I'm usinng next steps:
 //translating source tiles
 gdal_translate.exe -of GTiff -co COMPRESS=DEFLATE -co TILED=YES
 \\server\Tiles\tile1_1.tif c:\Tiles\tile1_1.tif
 
 //building virtual table
 gdalbuildvrt -resolution average mosaic.vrt c:\Tiles\*.tif
 //adding overviews
 gdaladdo -r average --config INTERLEAVE_OVERVIEW PIXEL --config
 COMPRESS_OVERVIEW DEFLATE mosaic.vrt 2 4 8 16
 //mapserver map file:
 LAYER
   STATUS ON
   NAME quickbird2008
   TYPE RASTER
   DATA ../data/tiles/mosaic.vrt
 ...
 Works great!
 -- 
 View this message in context: 
 http://n2.nabble.com/Help-tips-tricks-on-raster-dataset-optimi
zation-tp3825869p4584924.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapScript wrapper for WxS

2010-02-17 Thread Peter Hopfgartner

Pavel Iacovlev wrote:

try using instead of :
$request = ms_newOwsrequestObj();
$numValues = $request-loadparams();

this:
$request = ms_newowsrequestobj();
foreach ($_GET as $key = $value) {
$request-setParameter($key, $value);
}

  

Hi Pavel,

this seems to work, so far. Is this realted to 
http://trac.osgeo.org/mapserver/ticket/1975 ?


Peter

Would it

On Wed, Feb 17, 2010 at 11:16 AM, Peter Hopfgartner
peter.hopfgart...@r3-gis.com wrote:
  

Hello

On a CentOS5, 64 bit machine I have a basic WMS through CGI, which runs
fine.

I'm trying to wrap this in a PHP script, like in
http://www.mapserver.org/ogc/mapscript.html:

?php
$request = ms_newOwsrequestObj();
$numValues = $request-loadparams();
/*exampple on how to modify the parameters :
forcing the version from 1.1.1 to 1.1.0 */
$request-setParameter(map,/data/sites/gisclient/mapset/map/wms_reti.map);

(...)


Logging to file I see that it is stops when calling loadparams(). It returns
a document with 0 bytes.

On the same installation, the following Python wrapper gives the correct
Capabilities document:


#!/usr/bin/python

import mapscript

req = mapscript.OWSRequest()
req.loadParams()

map = mapscript.mapObj( '/data/sites/gisclient/mapset/map/wms_reti.map' )
map.OWSDispatch( req )

.

MapServer is 5.6.1. Trying on a machine with 5.2.2, the PHP script fails,
too.

Is there anything I am missing, here?

Thanks,

Peter

--

Dott. Peter Hopfgartner

R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgart...@r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING: http://www.xing.com/go/invita/8917535
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users






  



--

Dott. Peter Hopfgartner

R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgart...@r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING: http://www.xing.com/go/invita/8917535 


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


Re: [mapserver-users] MapScript wrapper for WxS

2010-02-17 Thread Pavel Iacovlev
Yes, and the bug is 3 years old. Setting the variables manually from
$_GET works with no trouble.

On Wed, Feb 17, 2010 at 1:20 PM, Peter Hopfgartner
peter.hopfgart...@r3-gis.com wrote:
 Pavel Iacovlev wrote:

 try using instead of :
 $request = ms_newOwsrequestObj();
 $numValues = $request-loadparams();

 this:
 $request = ms_newowsrequestobj();
 foreach ($_GET as $key = $value) {
    $request-setParameter($key, $value);
 }



 Hi Pavel,

 this seems to work, so far. Is this realted to
 http://trac.osgeo.org/mapserver/ticket/1975 ?

 Peter

 Would it

 On Wed, Feb 17, 2010 at 11:16 AM, Peter Hopfgartner
 peter.hopfgart...@r3-gis.com wrote:


 Hello

 On a CentOS5, 64 bit machine I have a basic WMS through CGI, which runs
 fine.

 I'm trying to wrap this in a PHP script, like in
 http://www.mapserver.org/ogc/mapscript.html:
 
 ?php
 $request = ms_newOwsrequestObj();
 $numValues = $request-loadparams();
 /*exampple on how to modify the parameters :
 forcing the version from 1.1.1 to 1.1.0 */

 $request-setParameter(map,/data/sites/gisclient/mapset/map/wms_reti.map);

 (...)
 

 Logging to file I see that it is stops when calling loadparams(). It
 returns
 a document with 0 bytes.

 On the same installation, the following Python wrapper gives the correct
 Capabilities document:

 
 #!/usr/bin/python

 import mapscript

 req = mapscript.OWSRequest()
 req.loadParams()

 map = mapscript.mapObj( '/data/sites/gisclient/mapset/map/wms_reti.map' )
 map.OWSDispatch( req )
 
 .

 MapServer is 5.6.1. Trying on a machine with 5.2.2, the PHP script fails,
 too.

 Is there anything I am missing, here?

 Thanks,

 Peter

 --

 Dott. Peter Hopfgartner

 R3 GIS Srl - GmbH
 Via Johann Kravogl-Str. 2
 I-39012 Meran/Merano (BZ)
 Email: peter.hopfgart...@r3-gis.com
 Tel. : +39 0473 494949
 Fax  : +39 0473 069902
 www  : http://www.r3-gis.com

 XING: http://www.xing.com/go/invita/8917535
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users








 --

 Dott. Peter Hopfgartner

 R3 GIS Srl - GmbH
 Via Johann Kravogl-Str. 2
 I-39012 Meran/Merano (BZ)
 Email: peter.hopfgart...@r3-gis.com
 Tel. : +39 0473 494949
 Fax  : +39 0473 069902
 www  : http://www.r3-gis.com

 XING: http://www.xing.com/go/invita/8917535




-- 
http://iap.md, The future is open
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] svg output label anomalies

2010-02-17 Thread Barend Köbben
Hi,

The first anomaly is because you have
  COLOR 0 0 255
  OUTLINECOLOR 255 255 255
for you labels. The SVG driver mimics a separate stroke and fill color by
having two instances, each in a different color.

Your second anomaly is not clearly descibed. Do you mean the png is NOT
rotated and the SVG is? Or is the SVG one rotated wrongly (cw instead of
ccw), while the png is rotated correctly?

Barend
-- 
Barend Köbben
Senior Lecturer
ITC ­ University of Twente, Faculty of Geo-Information Science and
Earth Observation
PO Box 6, 7500AA Enschede, The Netherlands
+31 (0)53 4874253


On 16-02-10 23:59, sbau...@abt.net sbau...@abt.net wrote:

 I'm writing a street mapping application that has two output formats:
 a png file to the web browser and an svg file for further editing and
 printing via inkscape. I'm using a single map file with two output
 formats like this:
 
 OUTPUTFORMAT
 NAME png
 DRIVER GD/PNG
 MIMETYPE image/png
 IMAGEMODE PC256
 EXTENSION png
 END
 OUTPUTFORMAT
 NAME svg
 MIMETYPE image/svg+xml
 DRIVER svg
 FORMATOPTION  COMPRESSED_OUTPUT=FALSE
 FORMATOPTION  FULL_RESOLUTION=TRUE
 END
 
 The perl script on the web server chooses the output in response to
 what's sent from the browser. If an svg output is desired the perl
 script does the following to generate an svg file:
 
 # draw map and save image
 #
 my $image = $map-draw();
 $map-drawLabelCache($image);
 $image-save($image_path.$image_name);
 
 if ($parms-param('print')) {
 my $print_map = $map-clone();
 $print_map-selectOutputFormat(svg);
 $print_map-{resolution} = 90;
 my $print_image = $print_map-draw();
 $print_map-drawLabelCache($print_image);
 my $filename=$image_path.$print_name;
 $print_image-save($filename);
 open(DLFILE, $filename);
 my @fileholder = DLFILE;
 close(DLFILE);
 print Content-Type:application/x-download\n;
 print Content-Disposition:attachment;filename=nys1.svg\n\n;
 print @fileholder;
 exit;
 }
 
 where $map and $image are generated for the png output. I'm cloning
 this map object and changing some of the attributes that are svg
 specific. The hope is that the svg output would duplicate what
 appears on the screen because what appears on the screen is good for
 my purposes.
 
 There are two anomalies. First, all the labels are printed in
 duplicate. I've verified this by looking at the svg file with a text
 editor. I can live with this one.
 
 The label directive on the map file is:
 
 LABEL
 TYPE truetype
 FONT arial
 SIZE 8
 ANGLE auto
 COLOR 0 0 255
 OUTLINECOLOR 255 255 255
 MINDISTANCE 100
 MINFEATURESIZE auto
 POSITION auto
 END
 
 This brings up the second and more serious anomaly. I'm using
 mapserver to align and position the labels close to the line
 features. It does a good job on the png file. However, it does not
 rotate labels in the clockwise direction but keeps them horizontal.
 It's fine for labels that are rotated counter-clockwise. I've
 verified this by reading the svg file. Here are two examples:
 
 text x=130 y=-1 font-family=arial font-size=8pt
   fill=#00 stroke=#ff
   stroke-width=0.1 text-anchor=middle
   Main St
 /text
 text x=259 y=419 font-family=arial font-size=8pt
   fill=#00 stroke=#ff
   stroke-width=0.1 transform=rotate(-84.995650 259 419)
   text-anchor=middleMain St
 /text
 
 The rotate transform gives the rotation angle and the pivot point.
 That's a counter-clockwise rotation because svg makes the downward
 directon on the y-axis to be positive.
 
 Here's the version string for my installation:
 
 MapServer version 5.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
 OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
 SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
 SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
 SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS
 SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=TIFF INPUT=POSTGIS INPUT=OGR
 INPUT=GDAL INPUT=MYGIS INPUT=SHAPEFILE
 
 Any help would be appreciated. Thanks.
 
 
 Stephen Bauman
 13810 Franklin Ave 2N
 Flushing NY 11355-3302
 Tel: 718-359-7972  (USA)
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

Faculty of Geo-Information Science and Earth Observation (ITC)
University of Twente

E-mail disclaimer
The information in this e-mail, 

Re: [mapserver-users] MapScript wrapper for WxS

2010-02-17 Thread Peter Hopfgartner

Pavel Iacovlev wrote:

Yes, and the bug is 3 years old. Setting the variables manually from
$_GET works with no trouble.

  

Hi Pavel,

thank you for your quick help! Would it make sense, to add a comment in 
the docs, at least?


Regards,

Peter

On Wed, Feb 17, 2010 at 1:20 PM, Peter Hopfgartner
peter.hopfgart...@r3-gis.com wrote:
  

Pavel Iacovlev wrote:


try using instead of :
$request = ms_newOwsrequestObj();
$numValues = $request-loadparams();

this:
$request = ms_newowsrequestobj();
foreach ($_GET as $key = $value) {
   $request-setParameter($key, $value);
}


  

Hi Pavel,

this seems to work, so far. Is this realted to
http://trac.osgeo.org/mapserver/ticket/1975 ?

Peter

Would it


On Wed, Feb 17, 2010 at 11:16 AM, Peter Hopfgartner
peter.hopfgart...@r3-gis.com wrote:

  

Hello

On a CentOS5, 64 bit machine I have a basic WMS through CGI, which runs
fine.

I'm trying to wrap this in a PHP script, like in
http://www.mapserver.org/ogc/mapscript.html:

?php
$request = ms_newOwsrequestObj();
$numValues = $request-loadparams();
/*exampple on how to modify the parameters :
forcing the version from 1.1.1 to 1.1.0 */

$request-setParameter(map,/data/sites/gisclient/mapset/map/wms_reti.map);

(...)


Logging to file I see that it is stops when calling loadparams(). It
returns
a document with 0 bytes.

On the same installation, the following Python wrapper gives the correct
Capabilities document:


#!/usr/bin/python

import mapscript

req = mapscript.OWSRequest()
req.loadParams()

map = mapscript.mapObj( '/data/sites/gisclient/mapset/map/wms_reti.map' )
map.OWSDispatch( req )

.

MapServer is 5.6.1. Trying on a machine with 5.2.2, the PHP script fails,
too.

Is there anything I am missing, here?

Thanks,

Peter

--

Dott. Peter Hopfgartner

R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgart...@r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING: http://www.xing.com/go/invita/8917535
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users






  

--

Dott. Peter Hopfgartner

R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgart...@r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING: http://www.xing.com/go/invita/8917535






  



--

Dott. Peter Hopfgartner

R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgart...@r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING : http://www.xing.com/go/invita/8917535 


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


Re: [mapserver-users] svg output label anomalies

2010-02-17 Thread sbauman
Barend Köbben kob...@itc.nl wrote on Wed, 17 Feb 2010 11:59:40
+0100

 Hi,

 The first anomaly is because you have
   COLOR 0 0 255
   OUTLINECOLOR 255 255 255
 for you labels. The SVG driver mimics a separate stroke and fill color
 by having two instances, each in a different color.


Thanks for your reply.

It's a good theory. However, when I remove the OUTLINECOLOR directive
the svg output file still has two copies of each label.

Printing two copies of text is fairly common for rendering a shadow
for vector graphics. It is not necessary for outlining the text for
svg. Mapserver correctly distinguishes between the fill color and
stroke/outline color in its svg text rendering. (Look at the svg text
example in my original post).

Without looking at Mapserver's code, my guess is that no shadow
results in one copy on top of another (no offset). This cannot be
detected in a raster image; it can in a vector image.

 Your second anomaly is not clearly descibed. Do you mean the png is
 NOT rotated and the SVG is? Or is the SVG one rotated wrongly (cw
 instead of ccw), while the png is rotated correctly?


I'm sorry for the confusion. Let me try to be clearer.

The png is correct. The problem with the svg.

Labels that should be rotated ccw are rotated correctly. Labels that
should be rotated cw are not rotated at all - they remain horizontal.

This second anomaly is the one I'd like to get resolved. One
advantage in working with svg files is that they are text. I can
remove the extra labels using a simple text editor application as a
post processor.

The label rotation anomaly presents a bigger challenge. I'm trying to
avoid the obvious workaround - writing my own drawLabelCache routine,
using mapscript, for rendering svg output.

Thanks for your input.


Stephen Bauman
13810 Franklin Ave 2N
Flushing NY 11355-3302
Tel: 718-359-7972  (USA)

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


Re: [mapserver-users] svg output label anomalies

2010-02-17 Thread Rahkonen Jukka
Hi,
 
 The label rotation anomaly presents a bigger challenge. I'm trying to 
 avoid the obvious workaround - writing my own drawLabelCache routine, 
 using mapscript, for rendering svg output.

Can you rotete all the labesl clockwise, for example 360-50= 310° cw instead of 
50° ccw?

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