Re: [mapserver-users] KML as Outputformat returns incorrect coordinates

2011-07-06 Thread luis peinado
Hi all,
I'm having some related problem:
I have no problem with my mapserver png outputformat:
This png request works really fine:
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=image/pngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039

Changing only the FORMAT parameter to KML:
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=KMLTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039

(sorry, my server is not at the Internet).

I get as a response an xml file with no extension and taking a look at it
with my text editor, I can see things like
PolygonouterBoundaryIsLinearRingcoordinates
583.23708456,950.02673133
583.22503040,950.03227145

And these coordinates are wrong.

Mapserver's log doese not seem to show any problem:
Log after the FORMAT=kml query

[Wed Jul  6 13:08:21 2011].550681 CGI Request 1 on process 1073
[Wed Jul  6 13:08:21 2011].550929 msWMSLoadGetMapParams(): enabling
non-square pixels.
[Wed Jul  6 13:08:21 2011].551361 msDrawMap(): kicking into non-square pixel
preserving mode.
[Wed Jul  6 13:08:21 2011].551380 msDrawMap(): rendering using outputformat
named kml (KML).
[Wed Jul  6 13:08:21 2011].551400 msDrawMap(): WMS/WFS set-up and query,
0.000s
[Wed Jul  6 13:08:22 2011].533734 msDrawMap(): Layer 0 (zonhum), 0.982s
[Wed Jul  6 13:08:22 2011].533776 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Jul  6 13:08:22 2011].533791 msDrawMap() total time: 0.983s
[Wed Jul  6 13:08:22 2011].942736 msSaveImage(stdout) total time: 0.409s
[Wed Jul  6 13:08:22 2011].943681 mapserv request processing time (msLoadMap
not incl.): 1.393s
[Wed Jul  6 13:08:22 2011].943700 msFreeMap(): freeing map at 0x9603678.

Can someone help me?
Thanks in advance for any response.
Lluís.

2011/6/6 Joe Franklin trader...@yahoo.com

 I'm using Mapserver 6.0.  I get the same results using the windows MS4W
 version as well as compiling it myself on Centos 5.  I'm including a simple
 map file with an embedded point, but I also tested using a point shapefile.
 Anyone else see this problem?

 Works using shp2img- returns -77.,48.0:
 shp2img -m airport.map

 Doesn't work using mapserv CGI or PHP Mapscript - returns
 76.8000,409.6000
 mapserv -nh
 QUERY_STRING=map=airport.mapservice=wmsVERSION=1.1.1REQUEST=GetMapSRS=epsg:4326WIDTH=512HEIGHT=512LAYERS=AirportsTRANSPARENT=TRUEFORMAT=kmlBBOX=-80,40,-60,50


 MAP
 NAME Airport
 STATUS ON
 SIZE 512 512
 EXTENT -80 40 -60 50
 IMAGETYPE kml
 UNITS DD
 IMAGECOLOR 255 255 255
 PROJECTION
   init=epsg:4326
 END
 WEB
   METADATA
   ows_enable_request *
   wms_title   Airport
   wms_onlineresource  http://localhost/mapserv?map=/tmp/airport.map
 
   ows_srs epsg:4326
   END
 END  #WEB
 SYMBOL
 NAME 'circle'
 TYPE ellipse
 FILLED true
 POINTS 1 1 END
 END
 LAYER
 NAME Airports
 TYPE point
 FEATURE
   POINTS -77 48 END
 END
 METADATA
   wms_title Airports
 END # METADATA
 STATUS ON
 CLASS
   STYLE
 COLOR 255 0 0
 SYMBOL 1
 SIZE 5
   END # STYLE
   TEMPLATE ttt_query.html
 END # CLASS
 END # LAYER
 END


 MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
 SUPPORTS=PROJ
 SUPPORTS=AGG SUPPORTS=CAIRO 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=FASTCGI
 SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
 INPUT=SHAPEFILE

 ___
 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] KML as Outputformat returns incorrect coordinates

2011-07-06 Thread Jeff McKenna
You might be hitting the same issue that I reported a few weeks ago 
(http://trac.osgeo.org/mapserver/ticket/3928).


-jeff

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




On 11-07-06 8:17 AM, luis peinado wrote:

Hi all,
I'm having some related problem:
I have no problem with my mapserver png outputformat:
This png request works really fine:
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=image/pngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=image/pngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039

Changing only the FORMAT parameter to KML:
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=KMLTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039
http://geoserver3/wms60/ddgi/servidor/espaisprotegits?FORMAT=KMLTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageLAYERS=zonhumSRS=EPSG%3A4326BBOX=-1.0469740101326659,41.39036252208658,5.764549426147167,42.77237478582793WIDTH=1860HEIGHT=1039

(sorry, my server is not at the Internet).

I get as a response an xml file with no extension and taking a look at
it with my text editor, I can see things like
PolygonouterBoundaryIsLinearRingcoordinates
583.23708456,950.02673133
583.22503040,950.03227145

And these coordinates are wrong.

Mapserver's log doese not seem to show any problem:
Log after the FORMAT=kml query

[Wed Jul  6 13:08:21 2011].550681 CGI Request 1 on process 1073
[Wed Jul  6 13:08:21 2011].550929 msWMSLoadGetMapParams(): enabling
non-square pixels.
[Wed Jul  6 13:08:21 2011].551361 msDrawMap(): kicking into non-square
pixel preserving mode.
[Wed Jul  6 13:08:21 2011].551380 msDrawMap(): rendering using
outputformat named kml (KML).
[Wed Jul  6 13:08:21 2011].551400 msDrawMap(): WMS/WFS set-up and query,
0.000s
[Wed Jul  6 13:08:22 2011].533734 msDrawMap(): Layer 0 (zonhum), 0.982s
[Wed Jul  6 13:08:22 2011].533776 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Jul  6 13:08:22 2011].533791 msDrawMap() total time: 0.983s
[Wed Jul  6 13:08:22 2011].942736 msSaveImage(stdout) total time: 0.409s
[Wed Jul  6 13:08:22 2011].943681 mapserv request processing time
(msLoadMap not incl.): 1.393s
[Wed Jul  6 13:08:22 2011].943700 msFreeMap(): freeing map at 0x9603678.

Can someone help me?
Thanks in advance for any response.
Lluís.

2011/6/6 Joe Franklin trader...@yahoo.com mailto:trader...@yahoo.com

I'm using Mapserver 6.0.  I get the same results using the windows
MS4W version as well as compiling it myself on Centos 5.  I'm
including a simple map file with an embedded point, but I also
tested using a point shapefile.  Anyone else see this problem?

Works using shp2img- returns -77.,48.0:
shp2img -m airport.map

Doesn't work using mapserv CGI or PHP Mapscript - returns
76.8000,409.6000
mapserv -nh

QUERY_STRING=map=airport.mapservice=wmsVERSION=1.1.1REQUEST=GetMapSRS=epsg:4326WIDTH=512HEIGHT=512LAYERS=AirportsTRANSPARENT=TRUEFORMAT=kmlBBOX=-80,40,-60,50


MAP
NAME Airport
STATUS ON
SIZE 512 512
EXTENT -80 40 -60 50
IMAGETYPE kml
UNITS DD
IMAGECOLOR 255 255 255
PROJECTION
init=epsg:4326
END
WEB
   METADATA
ows_enable_request *
wms_title Airport
wms_onlineresource http://localhost/mapserv?map=/tmp/airport.map;
ows_srs epsg:4326
   END
END  #WEB
SYMBOL
 NAME 'circle'
 TYPE ellipse
 FILLED true
 POINTS 1 1 END
END
LAYER
 NAME Airports
 TYPE point
 FEATURE
   POINTS -77 48 END
 END
 METADATA
wms_title Airports
 END # METADATA
 STATUS ON
 CLASS
   STYLE
 COLOR 255 0 0
 SYMBOL 1
 SIZE 5
   END # STYLE
   TEMPLATE ttt_query.html
 END # CLASS
END # LAYER
END


MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=CAIRO 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=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE




[mapserver-users] Example of GPSBabel outputformat wanted

2011-07-06 Thread Rahkonen Jukka
Hi,

After reading some Mapserver, GDAL and GPSBabel documents I have a feeling that 
it should be possible to reach pretty amusing results with Mapserver WFS and 
ORG output. For example it looks possible to do WFS GetFeature request and get 
back POIs which could be installed directly into Garmin handheld GPS units.
[1] http://mapserver.org/trunk/output/ogr.html
[2] http://svn.osgeo.org/mapserver/trunk/msautotest/wxs/wfs_ogr.map
[3] http://gdal.org/ogr/drv_gpsbabel.html
[4] http://www.gpsbabel.org/htmldoc-development/fmt_garmin_gpi.html

I wonder if someone has a working example about some OGR/GPSBabel driver based 
outputformat section of a mapfile like the ones in document [2] to be used as 
an template. The syntax is not very clear for a firsttimer.

-Jukka Rahkonen-


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


[mapserver-users] Compiling Mapserver 6 ./configure problem with gif-lib

2011-07-06 Thread Gunnar Stroeer
Hi all,
 
I've a problem with compiling Mapserver on SLES11, I can't do a clean
configure command without getting errors, even I installed the giv-lib
devs.
 
The gif_lib.h is located in following folders:
 
find -name gif_lib.h
./usr/local/src/gdal-1.6.2/frmts/gif/libungif/gif_lib.h
./usr/src/debug/giflib-4.1.6/lib/gif_lib.h
 

My ./configure command for Mapserver 6.0.0 is:
 
./configure --with-gd --with-freetype --without-tiff
--with-gdal=/usr/local/bin/gdal-config
--with-ogr=/usr/local/bin/gdal-config
--with-proj=/usr/local/src/proj-4.7.0 --with-zlib --with-jpeg
--with-png=/usr/ --with-curl-config=/usr/bin/curl-config --with-threads
--with-postgis --with-wfs --with-wcs --with-wmsclient --with-wfsclient
--with-php=/usr/include/php5/ --enable-debug
-with-agg=/usr/local/src/agg-2.5 --with-geos
--with-fastcgi=/usr/local/src/fcgi-2.4.0 --with-oraclespatial=yes
 
I've also tried adding --with-gif=/usr/src/ and variations without
success. The error is:

...
checking for /usr//include/png.h... yes
checking setjmp.h usability... yes
checking setjmp.h presence... yes
checking for setjmp.h... yes
configure: checking where GIF is installed...
checking for DGifOpenFileHandle in -lgif... no
checking gif_lib.h usability... no
checking gif_lib.h presence... no
checking for gif_lib.h... no
configure: error: cannot find gif headers in system path
 

I'd appreciate any help for getting a solution.
 
Regards,
Gunnar
 
 
-
Gunnar Ströer
Administration Geodatenmanagement
 
Stadt Freiburg i. Br.
Stabsstelle Geodatenmanagement

Fehrenbachallee 12
79106 Freiburg i. Br.

Tel. +49 761/201-4031
Fax +49 761/201-4049
E-Mail: gunnar.stro...@stadt.freiburg.de

-

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


FW: [mapserver-users] php-Mapscript and MySQL layer syntax

2011-07-06 Thread Chris Green
Hello to all, especially PHP-Mapscript users:

 

Apologies for asking the same question twice, but I got no responses to the
below and I am still stuck on both problems. Very happy to receive some help
on either but especially the first one..

 

 

Chris 

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green
Sent: 27 June 2011 09:05
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] php-Mapscript and MySQL layer syntax

 

Hi to all

 

I am using PHP5-Mapscript together with Mapserver 6.0 and I have a layer
which obtains its data from a MySQL database via an OGR connection. This all
works, but I am having trouble with two items of PHP-Mapscript syntax:

 

 

1.   $layer-getExtent() - I can't make this work with my layer: can
someone confirm if it works with a MySQL layer and if so give a syntax
example?

 

 

2.   $query= $layer-queryByAttributes(null, $expression, MS_MULTIPLE); 

 

 

On the 2nd question I came across some advice from Frank Wamerdam dated 2006
which said:

 

The trick with OGR connections to pass the filter through to OGR is to use

a query expression starting with WHERE.  So you might do something like:

 

   expr = 'WHERE ' + $qField + ' = ' + $qValue

   $qLayer-queryByAttributes(null,$expr,MS_MULTIPLE);

 

(forgive my incorrect PHP syntax, I'm just trying to get the idea accross).

 

 

However I can't come up with any expression that gives me any results at
all. Is there any current advice on how to do this kind of query over an OGR
connection?

 

 

Chris

___
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] Re: Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8

2011-07-06 Thread Ben Madin
Léo,

First, I'd volunteer that you have incorrect paths - using ~ probably isn't 
going to work unless the webserver is running as you (unlikely, but possible)

I'm assuming from what you have that your system looks like (and your user is 
called macbook) :

Sites
  |
  +---mapserver
  |
  +- introduction
  | |
  | +- test.map
  | |
  | +- shape
  |  |
  |  +- europe.shp etc
  |
  +- temp
  |
  +- test.php


 $map = ms_newMapObj(~/macbook/Sites/mapeserver/introduction/test.map);

probably then should be :

$map = ms_newMapObj(introduction/test.map);

 SHAPEPATH ~/macbook/Sites/mapserver/introduction/shape/

probably then should be :

SHAPEPATH /Users/macbook/Sites/mapserver/introduction/shape/

  IMAGEPATH '~/macbook/Sites/mapeserver/temp/'

probably then could be :

 IMAGEPATH 'temp/'

  IMAGEURL  '/temp/'

should then work.

You also need to make the temp/ directory writeable by the webserver - for now, 
I'd just Get Info on the directory, and make that directory write and read by 
anyone - security risk blah, but for now, just get it working.

Then open your Console (in Utilities) and navigate down to FILES  
/private/var/log  apache2  error_log

if you have error logging turned on in php.ini, this will help you enough to 
find out what is going wrong.

If you are really stuck I'd go with Daniel's suggestion on turning on debugging 
in mapserver, which you will need to do while you are learning, but for now 
just the apache error log should get you started.

Good luck.

cheers

Ben


On 06/07/2011, at 10:01 PM, mapserver-users-requ...@lists.osgeo.org wrote:

 From: Léo D. leo_dum...@yahoo.fr
 Date: 6 July 2011 12:19:19 AM AWST
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Re: Installing PHP MapScript with MapServer 
 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8
 
 
 Thanks to both of you for your answers.
 
 I've allready edit my php.ini to add extension=php_mapscript.so and with a
 phpinfo() I can see the section about MapScript.
 Moreover when I run this script to test if the extension is loaded or not
 and I have a positive result, so I think that PHP MapScript is working:
 
 if (!extension_loaded('MapScript')) {
 echoNot loaded;
 }
 else {
 echoLoaded!;
 }
 
 But when I try to run the example script from the mapserver.org
 documentation (without the dl() instruction), it doesn't work and I have no
 error message, just an empty page. Here is my php code:
 
 ?php
 $map = ms_newMapObj(~/macbook/Sites/mapeserver/introduction/test.map);
 $image = $map-draw();
 $image_url = $image-saveWebImage();
 
 echo'html
   head
 titleExemple : Afficher un shapefile/title
   /head
   body
  '.$image_url.' 
   /body
 /html';
 ?
 
 And here is my mapfile:
 
 MAP
 NAME Europe en bleu
 SIZE 400 400
 STATUS ON
 EXTENT -31.2467 27.6065 40.1199 80.762
 UNITS DD
 SHAPEPATH ~/macbook/Sites/mapserver/introduction/shape/
   
 WEB
  IMAGEPATH '~/macbook/Sites/mapeserver/temp/'
  IMAGEURL  '/temp/'
 END
 
 LAYER
  NAME Europe
  TYPE POLYGON
  STATUS ON
  DATA europe
  CLASS
STYLE
  COLOR 20 10 110
  OUTLINECOLOR 200 200 200
END
  END
 END
 
 END
 
 Maybe I've made a mistake in one of these files…
 Thanks for your help !
 
 Léo
 

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


[mapserver-users] transparnt polygon color

2011-07-06 Thread Amr Zakaria

How to make polygon with transparent color

Best VB programmer , Azz.


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


Re: [mapserver-users] transparnt polygon color

2011-07-06 Thread Smith, Michael ERDC-CRREL-NH
Use the keyword OPACITY [0-100] where 100 is fully opaque. Opacity is available 
at both the LAYER and STYLE level.

See http://mapserver.org/mapfile/layer.html and 
http://mapserver.org/mapfile/style.html

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers


From: Amr Zakaria amrzakari...@hotmail.commailto:amrzakari...@hotmail.com
Date: Wed, 6 Jul 2011 13:40:46 +
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] transparnt polygon color

How to make polygon with transparent color

Best VB programmer , Azz.


___ mapserver-users mailing list 
mapserver-users@lists.osgeo.orgmailto: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] Re: Installing PHP MapScript with MapServer 6.0.0-3 and PHP 5.3.6 on Mac OS X 10.6.8

2011-07-06 Thread Carlos Ruiz
Léo,

If you server is not a production server, please make sure that you have the 
php.ini error handling as follows:


error_reporting = E_ALL


Remember to restart Apache.

Also, in the MAP section, add something like this:

DEBUG ON
CONFIG MS_ERRORFILE /var/www/html/errores.txt

Let's see what happens.

Cheers from México


IC Carlos Ruiz




From: Léo D. leo_dum...@yahoo.fr
To: mapserver-users@lists.osgeo.org
Sent: Tuesday, July 5, 2011 11:19 AM
Subject: [mapserver-users] Re: Installing PHP MapScript with MapServer 6.0.0-3 
and PHP 5.3.6 on Mac OS X 10.6.8

Thanks to both of you for your answers.

I've allready edit my php.ini to add extension=php_mapscript.so and with a
phpinfo() I can see the section about MapScript.
Moreover when I run this script to test if the extension is loaded or not
and I have a positive result, so I think that PHP MapScript is working:

if (!extension_loaded('MapScript')) {
echoNot loaded;
}
else {
echoLoaded!;
}

But when I try to run the example script from the mapserver.org
documentation (without the dl() instruction), it doesn't work and I have no
error message, just an empty page. Here is my php code:

?php
$map = ms_newMapObj(~/macbook/Sites/mapeserver/introduction/test.map);
$image = $map-draw();
$image_url = $image-saveWebImage();

echo'html
   head
     titleExemple : Afficher un shapefile/title
   /head
   body
      '.$image_url.' 
   /body
/html';
?

And here is my mapfile:

MAP
NAME Europe en bleu
SIZE 400 400
STATUS ON
EXTENT -31.2467 27.6065 40.1199 80.762
UNITS DD
SHAPEPATH ~/macbook/Sites/mapserver/introduction/shape/
    
WEB
  IMAGEPATH '~/macbook/Sites/mapeserver/temp/'
  IMAGEURL  '/temp/'
END

LAYER
  NAME Europe
  TYPE POLYGON
  STATUS ON
  DATA europe
  CLASS
    STYLE
      COLOR 20 10 110
      OUTLINECOLOR 200 200 200
    END
  END
END

END

Maybe I've made a mistake in one of these files…
Thanks for your help !

Léo

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Installing-PHP-MapScript-with-MapServer-6-0-0-3-and-PHP-5-3-6-on-Mac-OS-X-10-6-8-tp6546297p6550486.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


[mapserver-users] Font rendering in MapServer 6.0

2011-07-06 Thread Brad Posthumus
We're in the process of upgrading from MapServer 5.4 to 6.0 and, after
following the migration guide from 5.4-5.6-6.0, almost everything is
working fine. The one exception is truetype font rendering. Text in 6.0
doesn't render well - it's blocky and distorted. Has anyone encountered this
change in their MapServer upgrade? 

Here's an example of a legend request in 5.4:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/legend_5_4.png 

and the same legend request in 6.0:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/legend_6_0.png 

This result is using the following legend definition for both:

  LEGEND
STATUS ON
KEYSIZE 19 14
KEYSPACING 6 4
LABEL
  TYPE truetype
  FONT arial
  SIZE 10
END
TEMPLATE ../htdocs/legendTemplate.html
  END

In a WMS request, the result is blockier with a broken outline and larger
text. Using 5.4:

http://osgeo-org.1803224.n2.nabble.com/file/n6555935/wms_5_4.png 

and 6.0:
http://osgeo-org.1803224.n2.nabble.com/file/n6555935/wms_6_0.png 

...using this label definition in each of the layer classes:

  LABEL
TYPE TRUETYPE
FONT [FONTNAME_M] 
SIZE [FONTSIZE]   
POSITION cc
ANTIALIAS FALSE
FORCE TRUE
COLOR 0 0 0
OUTLINECOLOR 255 255 235
  END

I should point out we have included DEFRESOLUTION 72 in the MAP section
which fixed our vector rendering, and the only reason why the city symbols
are larger in the 6.0 screenshot is that they're also based on a font.



--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-tp6555935p6555935.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] Re: wms server - raster image quality

2011-07-06 Thread Brad Posthumus

mark volz-2 wrote:
 
 I set up a WMS Server using Mapserver.  The quality of the map is
 terrible.   If anyone an example of a mapfile to serve imagery via wms it
 would be appreciated.
 

I found the playing around with the PROCESSING values can make a big
difference.

http://mapserver.org/input/raster.html#special-processing-directives

What type of image is it? Colour or panchromatic? 



--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/wms-server-raster-image-quality-tp6538171p6555988.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] Re: Font rendering in MapServer 6.0

2011-07-06 Thread Brad Posthumus
I mistakenly had DEFRESOLUTION 72 instead of DEFRESOLUTION 96 in my test
mapfile. This fixes the text/symbol size problem. However, the font quality
is still an issue in 6.0

http://osgeo-org.1803224.n2.nabble.com/file/n6556130/wms_6_0.png 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-tp6555935p6556130.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] RE: Random colours for polygon fill?

2011-07-06 Thread Robert Sanson
Looks an interesting approach. I tried it with my layer in ArcGIS Server 
(stored in MS-SQL v 2005) and couldn't get it to work. I am using Mapserver 
5.4.2
 
Here is my layer:
 
LAYER
  NAME fbnd
  GROUP CRS
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE SDE
  CONNECTIONTYPE PLUGIN
  PLUGIN d:/ms4w/apache/specialplugins/msplugin_sde_93.dll
  CONNECTION db-esri,port:5155,cadastre,user,pass
  DATA CADASTRE.SDEADMIN.VW_FARM_BOUNDARY_SP,SHAPE
  DUMP TRUE
  HEADER   ../templates/apiaries_query_header.html
  TEMPLATE ../templates/apiaries_query_body.html
  LABELMAXSCALE 10
  LABELCACHE on
  LABELITEM 'key_decision_maker'
  MAXSCALE 25
  CLASS
NAME fbnd
DEBUG on
STYLE
  WIDTH 3
  #COLOR 135 206 235
  COLOR [convert(varchar(3), ((128 + convert(int,env_min_x)) % 253)) +   
+ convert(varchar(3), ((200 + convert(int,env_min_x)) % 254)) +   + 
convert(varchar(3), ((64 + convert(int,env_min_x)) % 255))]
  OUTLINECOLOR 0 255 0
END
LABEL
  TYPE truetype
  FONT arial
  SIZE 9
  POSITION auto
  OUTLINECOLOR 255 255 255 #--Halo
  COLOR 76 179 145 
  MINDISTANCE 50
  BUFFER 2
END #LABEL
  END #CLASS
Many thanks,
 
Robert

 Anzel, Phil - Fort Collins, CO phil.an...@ftc.usda.gov 7/07/2011 2:11 
 a.m. 
Hi, Robert,

A simple approach would be to generate a pseudo-random color based upon a value 
unique to each record in your source data. For example, in the following 
example the source data, pulled from a Microsoft Sql Server database, has an 
integer column named ShapeID:

  layer
name mupolygon
status on
connectiontype plugin
plugin C:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll
processing CLOSE_CONNECTION=DEFER
connection server=...;
projection 'init=epsg:4269' END   # NAD83
units DD
DATA shapeGeometry from soilmu_a_wy721_nad83 using unique shapeID using 
SRID=4269
type polygon
opacity 40
class
  name mupoly
  style
COLOR [convert(varchar(3), (128 + shapeID) % 253) + ' ' + 
convert(varchar(3), (200 + shapeID) % 254) + ' ' + convert(varchar(3), (64 + 
shapeID) % 255)]
outlinecolor 0 0 0
outlinewidth 1
  end
end  # of class mupoly
  end # of layer mupolygon

In the context used above, the content of COLOR's specification (everything 
between the square brackets) is passed on as part of the SQL statement 
generated and transmitted to the database engine. Many variations are possible. 
Note that this approach does not provide any protection against the unlikely 
case where adjacent polygons display the same color.

I cannot speak to using data from other data sources. Best of luck with this.

- Phil Anzel
  Web Soil Survey developer
  Vistronix Inc for USDA/NRCS/ITC


-Original Message-

--

Message: 4
Date: Wed, 06 Jul 2011 09:08:28 +1200
From: Robert Sanson robert.san...@asurequality.com
Subject: [mapserver-users] Random colours for polygon fill?
To: mapserver-users@lists.osgeo.org
Message-ID: 4e14260b.379f.003...@asurequality.com
Content-Type: text/plain; charset=us-ascii

Dear Mapserver users

Just wondering if it is possible to colour a polygon Shape file layer with each 
distinct polygon having a different colour?

Many thanks,

Robert Sanson



This email and any attachments are confidential and intended solely for the 
addressee(s). If you are not the intended recipient, please notify us 
immediately and then delete this email from your system.

This message has been scanned for Malware and Viruses by Websense Hosted 
Security.
www.websense.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Random colours for polygon fill?

2011-07-06 Thread Anzel, Phil - Fort Collins, CO
Robert,
It may be that the SDE plugin does not allow insertion of the Sql fragment from 
the COLOR to be executed by the provider. In such a case the solution provided 
under separate cover by B. Heath Robinson might provide guidance. I do not know 
if the ArcGIS Server lets you use a view as a data source; if so you could add 
a calculated column to yield the RGB string (either as a hexadecimal valye as 
suggested by Heath) or as a string with space-delimited R, G and B values.
FWIW the approach I had suggested worked in MapServer 5.6.2 against Sql Server 
2008; beyond that I've not tried it.
- Phil
From: Robert Sanson [mailto:robert.san...@asurequality.com]
Sent: Wednesday, July 06, 2011 4:48 PM
To: Anzel, Phil - Fort Collins, CO; mapserver-users@lists.osgeo.org
Subject: RE: Random colours for polygon fill?

Looks an interesting approach. I tried it with my layer in ArcGIS Server 
(stored in MS-SQL v 2005) and couldn't get it to work. I am using Mapserver 
5.4.2

Here is my layer:

LAYER
  NAME fbnd
  GROUP CRS
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE SDE
  CONNECTIONTYPE PLUGIN
  PLUGIN d:/ms4w/apache/specialplugins/msplugin_sde_93.dll
  CONNECTION db-esri,port:5155,cadastre,user,pass
  DATA CADASTRE.SDEADMIN.VW_FARM_BOUNDARY_SP,SHAPE
  DUMP TRUE
  HEADER   ../templates/apiaries_query_header.html
  TEMPLATE ../templates/apiaries_query_body.html
  LABELMAXSCALE 10
  LABELCACHE on
  LABELITEM 'key_decision_maker'
  MAXSCALE 25
  CLASS
NAME fbnd
DEBUG on
STYLE
  WIDTH 3
  #COLOR 135 206 235
  COLOR [convert(varchar(3), ((128 + convert(int,env_min_x)) % 253)) +   
+ convert(varchar(3), ((200 + convert(int,env_min_x)) % 254)) +   + 
convert(varchar(3), ((64 + convert(int,env_min_x)) % 255))]
  OUTLINECOLOR 0 255 0
END
LABEL
  TYPE truetype
  FONT arial
  SIZE 9
  POSITION auto
  OUTLINECOLOR 255 255 255 #--Halo
  COLOR 76 179 145
  MINDISTANCE 50
  BUFFER 2
END #LABEL
  END #CLASS
Many thanks,

Robert

 Anzel, Phil - Fort Collins, CO phil.an...@ftc.usda.gov 7/07/2011 2:11 
 a.m. 
Hi, Robert,

A simple approach would be to generate a pseudo-random color based upon a value 
unique to each record in your source data. For example, in the following 
example the source data, pulled from a Microsoft Sql Server database, has an 
integer column named ShapeID:

  layer
name mupolygon
status on
connectiontype plugin
plugin C:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll
processing CLOSE_CONNECTION=DEFER
connection server=...;
projection 'init=epsg:4269' END   # NAD83
units DD
DATA shapeGeometry from soilmu_a_wy721_nad83 using unique shapeID using 
SRID=4269
type polygon
opacity 40
class
  name mupoly
  style
COLOR [convert(varchar(3), (128 + shapeID) % 253) + ' ' + 
convert(varchar(3), (200 + shapeID) % 254) + ' ' + convert(varchar(3), (64 + 
shapeID) % 255)]
outlinecolor 0 0 0
outlinewidth 1
  end
end  # of class mupoly
  end # of layer mupolygon

In the context used above, the content of COLOR's specification (everything 
between the square brackets) is passed on as part of the SQL statement 
generated and transmitted to the database engine. Many variations are possible. 
Note that this approach does not provide any protection against the unlikely 
case where adjacent polygons display the same color.

I cannot speak to using data from other data sources. Best of luck with this.

- Phil Anzel
  Web Soil Survey developer
  Vistronix Inc for USDA/NRCS/ITC


-Original Message-

--

Message: 4
Date: Wed, 06 Jul 2011 09:08:28 +1200
From: Robert Sanson robert.san...@asurequality.com
Subject: [mapserver-users] Random colours for polygon fill?
To: mapserver-users@lists.osgeo.org
Message-ID: 4e14260b.379f.003...@asurequality.com
Content-Type: text/plain; charset=us-ascii

Dear Mapserver users

Just wondering if it is possible to colour a polygon Shape file layer with each 
distinct polygon having a different colour?

Many thanks,

Robert Sanson


This email and any attachments are confidential and intended solely for the 
addressee(s). If you are not the intended recipient, please notify us 
immediately and then delete this email from your system.

This message has been scanned for Malware and Viruses by Websense Hosted 
Security. www.websense.comhttp://www.websense.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Random colours for polygon fill?

2011-07-06 Thread pcreso
Hi Robert,

I have resolved a similar issue with mapserver (where mapserver variable 
substitution couldn't supply the required functionality) by having a cgi script 
write the mapfile on the fly, using some logic to customise the mapfile as 
required. Then the script invokes mapserver with the mapfile.

Sort of:

write mapfile header down to common layer details 
for class in LIST ; do
  write class with random colour
done
close mapfile
invoke mapserver with new mapfile

The issue with this approach is that every invocation will have different 
colours (unless you always start with the same random seed  use a pseudorandom 
sequence).


Option 2 is similar. I believe mapserver's runtime variable substitution 
supports the CLASS expression. A cgi could generate the name/value pairs for 
the required random colours, append them to the URL query string, invoke 
mapserver  have mapserver carry out the variable substitution as it 
preprocesses the mapfile.


Another similar issue I resolved recently: A WMS polygon layer with various but 
fixed colours  a WFS layer with a point in each polygon with the metadata in 
OpenLayers.

A table stores the RGB values used in the WMS classes, a query generates a java 
#hex string from the RGB values, so the WFS layer provides the colour to render 
each point in, OpenLayers reads the colour for each feature from the WFS 
fields, so they match the WMS polygons.

The query in the data statement generates java #hex from rgb values, which is 
fine from postgis, I'm not sure if you can do this from a shapefile, but if so, 
you could  perhaps predefine your colours in the shapefile, with a value per 
feature:

geom from (select r.gid + (100 * p.id) as gid,
    r.gid as r_id,
    p.id as p_id,
    r.regioncode,
    r.regionname,
    p.geom,
 ('#'||case when (length(to_hex(r_fill))=1)
 then '0'||to_hex(r_fill)
 else to_hex(r_fill) end||
   case when (length(to_hex(g_fill))=1)
 then '0'||to_hex(g_fill)
 else to_hex(g_fill) end||
   case when (length(to_hex(b_fill))=1)
 then '0'||to_hex(b_fill)
   else to_hex(b_fill) end) as hex_fill,
 ('#'||case when (length(to_hex(r_pen))=1)
 then '0'||to_hex(r_pen)
 else to_hex(r_pen) end||
   case when (length(to_hex(g_pen))=1)
 then '0'||to_hex(g_pen)
 else to_hex(g_pen) end||
   case when (length(to_hex(b_pen))=1)
 then '0'||to_hex(b_pen)
   else to_hex(b_pen) end) as hex_pen
  ...


Cheers,

   Brent
 


Dear Mapserver users



Just wondering if it is possible to colour a polygon Shape file layer with each 
distinct polygon having a different colour?



Many thanks,



Robert Sanson 


   
This email and any attachments are confidential and intended solely for the 
addressee(s). If you are not the intended recipient, please notify us 
immediately and then delete this email
 from your system. 
This message has been scanned for Malware and Viruses by Websense Hosted 
Security.
www.websense.com 

 

-Inline Attachment Follows-

___
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


[mapserver-users] s52 format

2011-07-06 Thread Sila Khan
Dear mapserver users
Any of you  have an idea about s52 format ,as i loaded my s57 chart on
mapserver but its not looking fine as i found it in other nautical chart
viewer (open CPN) in s52 standard format
how could i display s57 in s52 format in mapserver.
thanks
Regards
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users