[mapserver-users] Random colours for polygon fill?

2011-07-05 Thread Robert Sanson
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


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-05 Thread Daniel Morissette

On 11-07-05 12:19 PM, Léo D. wrote:


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:



If you do a "View Source" in your browser on the empty page, is the 
soruce really empty or does it contain anything or an error message?


Next step would be to look at the Apache error_log file for error 
messages, and also try enabling debug output and see if anything shows 
up. Fro more info see: http://mapserver.org/optimization/debugging.html


--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

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


RE: [mapserver-users] pie/bar graphs with labels?

2011-07-05 Thread Fuchs Juan Carlos
Estimados
Siempre es posible hacer una nueva capa con anotaciones y vlocar ahí las
etiquetas
agrupar la capa chart con la capa anotaciones
y manejar el grupo como una sola capa.
que por este camino se llega a un sinfín de capas?, y sí,  así es la vida en
Mapserver.
pero imagino que esto ya lo ´sabían, solo digo
 
Saludos
JC
 

-Mensaje original-
De: Carlos Ruiz [mailto:boolean10...@yahoo.com]
Enviado el: Martes, 05 de Julio de 2011 11:31 a.m.
Para: pelin; mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] pie/bar graphs with labels?


Rolando,


Al parecer no es posible dibujar etiquetas en capas de tipo chart. He hecho
el intento haciendo uso de LABELITEM y LABEL 

pero no las dibuja. Desconozco si exista una directiva en PROCESSING que
pudiera hacer esto.


Saludos desde Guadalajara, México


It seems it's not possible to draw labels with chart type layers. I've been
trying with LABELITEM and LABEL but it doesn't work.
I don't know if there's a PROCESSING directive to draw a label.


Cheers from Guadalajara, México
 
IC Carlos Ruiz



  _  

From: pelin 
To: mapserver-users@lists.osgeo.org
Sent: Tuesday, July 5, 2011 6:46 AM
Subject: [mapserver-users] pie/bar graphs with labels?


estimados, como estan. 
les hago una consulta,es posible poner labels en layers que son CHART?

is feasible put labels into layers with type CHART?


Saludos!

-- 

http://blogs.hydras.com.ar/srodriguez/

 Atentamente
 Rolando Sergio Rodriguez


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

2011-07-05 Thread Léo D .
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')) {
echo"Not loaded";
}
else {
echo"Loaded!";
}

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:

draw();
$image_url = $image->saveWebImage();

echo'
   
 Exemple : Afficher un shapefile
   
   
  '.$image_url.' 
   
';
?>

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


RE: [mapserver-users] PHP mapscript shapefile query with multiple filters

2011-07-05 Thread Charlie Allgrove
We're running 5.6 at the moment. I'll try closing layers between querie...and 
let you know

 

Cheers

 

Charlie

 

From: Steve Lime [mailto:sdl...@gmail.com] 
Sent: 05 July 2011 16:30
To: Charlie Allgrove
Cc: 
Subject: Re: [mapserver-users] PHP mapscript shapefile query with multiple 
filters

 

What version? What happens if you close the layer between calls to queries?

 

Steve

Sent from my iPad


On Jul 4, 2011, at 11:15 AM, "Charlie Allgrove" 
 wrote:

Hi

 

I have a shapefile containing almost 250k points in 3 cols (lat/long/sitetype). 

I need to use PHP mapscript to query that file to tell me how many points of a 
given type are present in a given rectangle.

 

The script will either tell me the number of points in rectangle, OR points of 
a given type, but never both...

Unfortunately I'm not at liberty to post the datafile anywhere, but the gist of 
the PHP is here:

 



$lstrMapPath = "/path/to/shapefile";

$lstrOutput = "";

 

$lobjMap = ms_newMapObj($lstrMapPath);

 

$lobjLayer = $lobjMap->getLayerByName("layer1");

if(!$lobjLayer) {

exit; // errors handled elsewhere

}

 

$lobjLayer->open();

/* THIS WORKS */

@$lobjLayer->queryByRect($lobjRect);

$lintCount = $lobjLayer->getNumResults();



/* THIS ALSO WORKS - BUT NOT IF THE queryByRect() is enabled above */

/*

@$lobjLayer->queryByAttributes('sitetype','8',MS_MULTIPLE);

$lintCount = $lobjLayer->getNumResults();

*/

$lstrOutput = "layer".$k.":".$lintCount;

$lobjLayer->close();

 

echo $lstrOutput;

 



 

Any pointers would be gratefully received!

 

Cheers

 

Charlie

 

___
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] mapserver on apache - issue

2011-07-05 Thread Steve Lime
I'm guessing this is a layer status issue. The cgi and shp2img behave 
differently in that regard. The cgi sets any non-default layer to off so you 
must request the layers to be on explicitly using the "layer" variable, e.g. 
...&layer=foo1&layer=foo2&...

Steve

Sent from my iPad

On Jul 5, 2011, at 1:24 AM, Dushi  wrote:

> Hi guys,
> Im using mapserver with apache on Ubuntu. I'm trying to generate a PNG image 
> using shape files by calling a map file. When i call the mapserver through 
> apache2 web server it only generates an empty PNG with white space. but when 
> i call it through "shp2img" utility it works fine. please be kind to help me. 
> i'm a new to mapserver.
> Thank you so much 
> -- 
> Me on Web
> http://dushan888.wordpress.com
> http://www.twitter.com/Dushi
> http://identi.ca/dushi
> ___
> 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] PHP mapscript shapefile query with multiple filters

2011-07-05 Thread Steve Lime
What version? What happens if you close the layer between calls to queries?

Steve

Sent from my iPad

On Jul 4, 2011, at 11:15 AM, "Charlie Allgrove" 
 wrote:

> Hi
> 
>  
> 
> I have a shapefile containing almost 250k points in 3 cols 
> (lat/long/sitetype).
> 
> I need to use PHP mapscript to query that file to tell me how many points of 
> a given type are present in a given rectangle.
> 
>  
> 
> The script will either tell me the number of points in rectangle, OR points 
> of a given type, but never both...
> 
> Unfortunately I'm not at liberty to post the datafile anywhere, but the gist 
> of the PHP is here:
> 
>  
> 
> 
> 
> $lstrMapPath = "/path/to/shapefile";
> 
> $lstrOutput = "";
> 
>  
> 
> $lobjMap = ms_newMapObj($lstrMapPath);
> 
>  
> 
> $lobjLayer = $lobjMap->getLayerByName("layer1");
> 
> if(!$lobjLayer) {
> 
> exit; // errors handled elsewhere
> 
> }
> 
>  
> 
> $lobjLayer->open();
> 
> /* THIS WORKS */
> 
> @$lobjLayer->queryByRect($lobjRect);
> 
> $lintCount = $lobjLayer->getNumResults();
> 
>
> 
> /* THIS ALSO WORKS - BUT NOT IF THE queryByRect() is enabled above */
> 
> /*
> 
> @$lobjLayer->queryByAttributes('sitetype','8',MS_MULTIPLE);
> 
> $lintCount = $lobjLayer->getNumResults();
> 
> */
> 
> $lstrOutput = "layer".$k.":".$lintCount;
> 
> $lobjLayer->close();
> 
>  
> 
> echo $lstrOutput;
> 
>  
> 
> 
> 
>  
> 
> Any pointers would be gratefully received!
> 
>  
> 
> Cheers
> 
>  
> 
> Charlie
> 
>  
> 
> ___
> 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] pie/bar graphs with labels?

2011-07-05 Thread pelin
Estimado Carlos:
  Muchas gracias por la respuesta. Yo tambien trate pero aun no consegui
nada, pero seguire intentando.

Saludos!

Atentamente

Rolando Sergio Rodriguez
DIT Direccion de Informacion Territorial - SPER
Provincia del Chaco Marcelo T. de Alvear 145 - 9no Piso de Casa de Gobierno
Tel: 03722-456426 (Directo)
 03722-448000 int. 6426
Cel: 03722-15-814858 (red win)
BB Messenger: 22F397A7
http://etisig.chaco.gov.ar
http://etisig.siup.gov.ar
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] pie/bar graphs with labels?

2011-07-05 Thread Carlos Ruiz
Rolando,

Al parecer no es posible dibujar etiquetas en capas de tipo chart. He hecho el 
intento haciendo uso de LABELITEM y LABEL 

pero no las dibuja. Desconozco si exista una directiva en PROCESSING que 
pudiera hacer esto.

Saludos desde Guadalajara, México

It seems it's not possible to draw labels with chart type layers. I've been 
trying with LABELITEM and LABEL but it doesn't work.
I don't know if there's a PROCESSING directive to draw a label.

Cheers from Guadalajara, México

 
IC Carlos Ruiz




From: pelin 
To: mapserver-users@lists.osgeo.org
Sent: Tuesday, July 5, 2011 6:46 AM
Subject: [mapserver-users] pie/bar graphs with labels?


estimados, como estan. 
les hago una consulta,es posible poner labels en layers que son CHART?

is feasible put labels into layers with type CHART?


Saludos!

-- 

http://blogs.hydras.com.ar/srodriguez/

 Atentamente
         Rolando Sergio Rodriguez

___
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: RES: [mapserver-users] ENC: Openlayers Identify Problem

2011-07-05 Thread Steve Lime
Is that the exact error message?

Sent from my iPad

On Jul 2, 2011, at 12:48 PM, Eduardo Kanegae  wrote:

> Hi Steve,
> 
> Just to drop a last note on topic 
> http://lists.osgeo.org/pipermail/mapserver-users/2011-June/069053.html
> - the problem was solved: the layer template file was missing 'mapserver 
> template' header tag.
> 
> The strange thing: mapserver was reporting "no items found at this point".
> 
> best
> 
> -- 
> Eduardo Patto Kanegae 
> http://www.webmapit.com.br
> +55(19)9610-8768
> 
> ___
> 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] pie/bar graphs with labels?

2011-07-05 Thread pelin
estimados, como estan.
les hago una consulta,es posible poner labels en layers que son CHART?

is feasible put labels into layers with type CHART?


Saludos!

-- 

http://blogs.hydras.com.ar/srodriguez/

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