RE: [mapserver-users] Problems labelling using Halo option

2010-10-04 Thread David Alda Fernandez de Lezea
 
Assefa,

Sorry for my late response, I've been working in something else. I've checked 
the file 
C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map

LAYER
CONNECTION "user=postgres password= dbname=VITICOLA_IMPRESIONES 
host=192.168.1.161 port=5432"
CONNECTIONTYPE POSTGIS
DATA "the_geom FROM vinedos using unique gid using SRID=23030"
DUMP TRUE
METADATA
  "wms_srs" "EPSG:23030"
  "wms_extent"  "47 470 61 482"
  "wms_transparent" "true"
  "wms_name""vinedos"
  "wms_format"  "image/gif"
  "gml_include_items"   "all"
  "wms_server_version"  "1.1.1"
  "wms_title"   "vinedos"
END
NAME "vinedos"
PROCESSING "LABEL_NO_CLIP=ON"
PROJECTION
  "init=epsg:23030"
END
STATUS ON
TYPE POLYGON
UNITS METERS
CLASS
  NAME "Unknown"
  EXPRESSION ( ([provincia] = 1)  And  ( ([municipio] = 43)  And  ( 
([poligono] = 4)  And  ( ([parcela] = 880)  And  ([recinto] = 1) ) ) ) )
  LABEL
ANGLE AUTO
ANTIALIAS TRUE
FONT "times-bold"
MAXSIZE 256
MINSIZE 4
SIZE 18
TYPE TRUETYPE
BUFFER 0
COLOR 255 255 255
FORCE FALSE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
OUTLINECOLOR 255 255 255
OUTLINEWIDTH 0
PARTIALS TRUE
POSITION CC
  END
  STYLE
ANGLE 360
OPACITY 100
OUTLINECOLOR 0 0 0
SIZE 2
SYMBOL "sld_line_symbol_dash"
  END
  TEXT ([poligono]-[parcela]-[recinto])
END
  END

OUTLINEWIDTH  shouldn't be greater than 0??

What do you think?

By the way, I forgot to mention that I'm working with MS4W 2.3.1 which includes 
MapServer 5.2.1.

About the font issue, it's like if MapServer, when it doesn't the font I 
specify in FONSET, it takes a default font and it applies the HALO correctly, 
but when I try to change the size, it doesn't work, the returned image has the 
same font size. Maybe is something related with the SLD. It's difficult to 
explain.


Un saludo,
 
··

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··
email: da...@ikt.esweb: www.ikt.es
··············

-Mensaje original-
De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] 
Enviado el: jueves, 30 de septiembre de 2010 14:21
Para: David Alda Fernandez de Lezea
CC: mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] Problems labelling using Halo option


  Hi,

Check the file
C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map and the layer 
where the sld is applied, the label object should have the outlinecolor set if 
it worked properly. Is that the case? I am not sure I understand the font 
issue, but you can also see what font was set fir that label object.

regards,


On 30/09/2010 7:43 AM, David Alda Fernandez de Lezea wrote:
> Assefa,
>
> Yes, it's valid. It works, but not with desired behaviour. It draws the 
> polygons with the labels but without the Halo effect.
>
> I forgot to put xml headers in the previous email.
>
> 
>xsi:schemaLocation="http://www.opengis.net/sld
>   StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld";
>   xmlns:ogc="http://www.opengis.net/ogc";
>   xmlns:xlink="http://www.w3.org/1999/xlink";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>
> I also forgot to mention that if I put name="font-family">Verdana  for example, and Verdana does not 
> exist in my fontset, it does the labelling properly (including Halo), but 
> it's like if mapserver gets some default values, because the size has changed 
> and even though I change it in th e SLD, the size keeps the same.
>
>
>
> WMS Log
>
> [Thu Sep 30 13:39:53 2010].513000 CGI Request 1 on process 256 [Thu 
> Sep 30 13:39:53 2010].685000 msApplySLD(): Map file after SLD was applied 
> C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map[Thu Sep 30 
> 13:39:53 2010].826000 msDrawRasterLayerLow(orto0): en

Re: [mapserver-users] Problems labelling using Halo option

2010-09-30 Thread Yewondwossen Assefa

 Hi,

Check the file  
C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map and the 
layer where the sld is applied, the label object should have the 
outlinecolor set if it worked properly. Is that the case? I am not sure 
I understand the font issue, but you can also see what font was set fir 
that label object.


regards,


On 30/09/2010 7:43 AM, David Alda Fernandez de Lezea wrote:

Assefa,

Yes, it's valid. It works, but not with desired behaviour. It draws the 
polygons with the labels but without the Halo effect.

I forgot to put xml headers in the previous email.


http://www.opengis.net/sld
StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld";
xmlns:ogc="http://www.opengis.net/ogc";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

I also forgot to mention that if I putVerdana  for example, and Verdana does not exist 
in my fontset, it does the labelling properly (including Halo), but it's like if mapserver gets some 
default values, because the size has changed and even though I change it in th e SLD, the size keeps 
the same.



WMS Log

[Thu Sep 30 13:39:53 2010].513000 CGI Request 1 on process 256
[Thu Sep 30 13:39:53 2010].685000 msApplySLD(): Map file after SLD was applied 
C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map[Thu Sep 30 
13:39:53 2010].826000 msDrawRasterLayerLow(orto0): entering.
[Thu Sep 30 13:40:02 2010].216000 msDrawMap(): Layer 4 (orto0), 8.390s
[Thu Sep 30 13:40:03 2010].606000 msDrawMap(): Layer 0 (vinedos_sigpac), 1.390s
[Thu Sep 30 13:40:04 2010].122000 msDrawMap(): Layer 3 (vinedos_disolve_bn), 
0.516s
[Thu Sep 30 13:40:04 2010].513000 msDrawMap(): Layer 2 (vinedos_disolve), 0.391s
[Thu Sep 30 13:40:05 2010].919000 msDrawMap(): Layer 1 (vinedos), 1.406s
[Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Layer 7 (vinedos_parcelas), 
1.187s
[Thu Sep 30 13:40:07 2010].106000 msDrawLabelCache(): 
labelcache_map_edge_buffer = -10
[Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Sep 30 13:40:07 2010].106000 msDrawMap() total time: 13.343s
[Thu Sep 30 13:40:08 2010].606000 msSaveImage() total time: 1.500s
[Thu Sep 30 13:40:08 2010].606000 mapserv request processing time (msLoadMap 
not incl.): 15.093s
[Thu Sep 30 13:40:08 2010].637000 msFreeMap(): freeing map at 015C6820.

Thanks.



De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca]
Enviado el: jueves, 30 de septiembre de 2010 13:24
Para: David Alda Fernandez de Lezea
CC: mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] Problems labelling using Halo option


Hi there,

  Is the sld xml you are using valid?  Grabbing it from this e-mail, It seems to not 
validate (several   tags). It might just a copy paste but make 
sure of that.
You can aslo set your map in debug mode ( DEBUG 5 for example) and check your 
logs to see if the xml was parsed properly and if that is the case you should 
also be able a tmp file of your map file after SLD was applied

regards,


On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote:

Hi list,

I'm developing a program that generates some images from a WMS with a 
dynamic generated SLD. The problem is that I'm telling MapServer to generate 
some labels with Halo, to make them easy to read, using the following code:


vinedos






provincia1

municipio43

poligono4

parcela880

recinto1




#00
2
5 5 5 5





poligono-parcela-recinto


times
18
bold




0.50.5





2


#FF
0.85



#00
0.65







But when I receive the image the Halo is not applied (see attached 
file). My mapfile is as follows:

NAME "WMSSERVER"

STATUS ON
EXTENT 46 471 61 482 # Euskadi  
SHAPEPATH "extra/shapes/"
FONTSET "extra/fonts/fonts.txt"
SYMBOLSET "extra/symbols/symbols.sym"


IMAGETYPE "image/png; mode=24bit"

OUTPUTFORMAT
   NAME png
   DRIVER "AGG/PNG"
   MIMETYPE "image/png"
  

RE: [mapserver-users] Problems labelling using Halo option

2010-09-30 Thread David Alda Fernandez de Lezea
Assefa, 
 
Yes, it's valid. It works, but not with desired behaviour. It draws the 
polygons with the labels but without the Halo effect.

I forgot to put xml headers in the previous email.


http://www.opengis.net/sld 
StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld";
xmlns:ogc="http://www.opengis.net/ogc";  
xmlns:xlink="http://www.w3.org/1999/xlink";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 
I also forgot to mention that if I put Verdana for example, and Verdana does not 
exist in my fontset, it does the labelling properly (including Halo), but it's 
like if mapserver gets some default values, because the size has changed and 
even though I change it in th e SLD, the size keeps the same.



WMS Log

[Thu Sep 30 13:39:53 2010].513000 CGI Request 1 on process 256
[Thu Sep 30 13:39:53 2010].685000 msApplySLD(): Map file after SLD was applied 
C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map[Thu Sep 30 
13:39:53 2010].826000 msDrawRasterLayerLow(orto0): entering.
[Thu Sep 30 13:40:02 2010].216000 msDrawMap(): Layer 4 (orto0), 8.390s
[Thu Sep 30 13:40:03 2010].606000 msDrawMap(): Layer 0 (vinedos_sigpac), 1.390s
[Thu Sep 30 13:40:04 2010].122000 msDrawMap(): Layer 3 (vinedos_disolve_bn), 
0.516s
[Thu Sep 30 13:40:04 2010].513000 msDrawMap(): Layer 2 (vinedos_disolve), 0.391s
[Thu Sep 30 13:40:05 2010].919000 msDrawMap(): Layer 1 (vinedos), 1.406s
[Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Layer 7 (vinedos_parcelas), 
1.187s
[Thu Sep 30 13:40:07 2010].106000 msDrawLabelCache(): 
labelcache_map_edge_buffer = -10
[Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Sep 30 13:40:07 2010].106000 msDrawMap() total time: 13.343s
[Thu Sep 30 13:40:08 2010].606000 msSaveImage() total time: 1.500s
[Thu Sep 30 13:40:08 2010].606000 mapserv request processing time (msLoadMap 
not incl.): 15.093s
[Thu Sep 30 13:40:08 2010].637000 msFreeMap(): freeing map at 015C6820.

Thanks.



De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] 
Enviado el: jueves, 30 de septiembre de 2010 13:24
Para: David Alda Fernandez de Lezea
CC: mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] Problems labelling using Halo option


Hi there,

 Is the sld xml you are using valid?  Grabbing it from this e-mail, It seems to 
not validate (severaltags). It might just a copy paste but 
make sure of that.  
You can aslo set your map in debug mode ( DEBUG 5 for example) and check your 
logs to see if the xml was parsed properly and if that is the case you should 
also be able a tmp file of your map file after SLD was applied

regards,


On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote: 

Hi list,

I'm developing a program that generates some images from a WMS with a 
dynamic generated SLD. The problem is that I'm telling MapServer to generate 
some labels with Halo, to make them easy to read, using the following code:


vinedos






provincia1

municipio43

poligono4

parcela880

recinto1




#00
2
5 5 5 5





poligono-parcela-recinto


times
18
bold




0.50.5





2


#FF
0.85



#00
0.65







But when I receive the image the Halo is not applied (see attached 
file). My mapfile is as follows:

NAME "WMSSERVER"

STATUS ON
EXTENT 46 471 61 482 # Euskadi  
SHAPEPATH "extra/shapes/"
FONTSET "extra/fonts/fonts.txt"
SYMBOLSET "extra/symbols/symbols.sym"


IMAGETYPE "image/png; mode=24bit"

OUTPUTFORMAT
   NAME png
   DRIVER "AGG/PNG"
   MIMETYPE "image/png"
   IMAGEMODE RGBA
   EXTENSION "png"
   FORMATOPTION "TRANSPARENT=ON"
   FORMATOPTION "INTERLACE=OFF"
END
OUTPUTFORMAT
  NAME jpeg
  DRIVER "GD/JPEG"
  

Re: [mapserver-users] Problems labelling using Halo option

2010-09-30 Thread Yewondwossen Assefa

 Hi there,

 Is the sld xml you are using valid?  Grabbing it from this e-mail, It 
seems to not validate (several   tags). It might just a 
copy paste but make sure of that.
You can aslo set your map in debug mode ( DEBUG 5 for example) and check 
your logs to see if the xml was parsed properly and if that is the case 
you should also be able a tmp file of your map file after SLD was applied


regards,


On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote:

Hi list,

I'm developing a program that generates some images from a WMS with a dynamic 
generated SLD. The problem is that I'm telling MapServer to generate some 
labels with Halo, to make them easy to read, using the following code:


vinedos





provincia1
municipio43
poligono4
parcela880
recinto1




#00
2
5 5 5 5




poligono-parcela-recinto


times
18
bold



0.50.5





2


#FF
0.85



#00
0.65







But when I receive the image the Halo is not applied (see attached file). My 
mapfile is as follows:

NAME "WMSSERVER"

STATUS ON
EXTENT 46 471 61 482 # Euskadi  
SHAPEPATH "extra/shapes/"
FONTSET "extra/fonts/fonts.txt"
SYMBOLSET "extra/symbols/symbols.sym"


IMAGETYPE "image/png; mode=24bit"

OUTPUTFORMAT
   NAME png
   DRIVER "AGG/PNG"
   MIMETYPE "image/png"
   IMAGEMODE RGBA
   EXTENSION "png"
   FORMATOPTION "TRANSPARENT=ON"
   FORMATOPTION "INTERLACE=OFF"
END
OUTPUTFORMAT
  NAME jpeg
  DRIVER "GD/JPEG"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
END
IMAGECOLOR 255 255 255
UNITS METERS

DEBUG ON
CONFIG "MS_ERRORFILE" 
"C:/ms4w/Apache/htdocs/ogcservices/logs/wms_impresiones_lotes_log.log"
DEBUG 5


WEB
IMAGEPATH "C:/ms4w/Apache/htdocs/ogcservices/tmp/"
IMAGEURL "tmp/"
METADATA
"wms_name""IKT WMS Server"
"wms_title"   "Servidor WMS IKT - 
Impresiones Lotes"
"wms_onlineresource"  
"http://192.168.1.161/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/impresiones_lotes_wms.map&";
"wms_srs" "EPSG:23030 EPSG:4326"
"wms_transparent"   "true"
"wms_abstract""Servicio de mapas WMS de IKT 
Nekazal Teknologia. Powered by Apache and UMN MapServer. Servicio WMS para las impresiones por 
lotes."
"wms_keywordlist" "IKT,Euskadi,Mapas 
Euskadi"
"wms_feature_info_mime_type"   "application/vnd.ogc.gml"
"labelcache_map_edge_buffer" "-10"
END
END

PROJECTION
"init=epsg:23030"
END

LAYER
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=postgres password= dbname=VITICOLA_IMPRESIONES 
host=192.168.1.161 port=5432"
NAME "vinedos"

PROJECTION
"init=epsg:23030"
END
DUMP TRUE
TYPE POLYGON
METADATA
"wms_title" "vinedos"
"wms_srs" "EPSG:23030"
"wms_name""vinedos"
"wms_server_version"  "1.1.1"
"wms_format"  "image/gif"
"wms_transparent" "true"
"wms_extent""47 470 61 482"
"gml_include_items" "all"
END 
#Sentencia SQL para obtener los datos
DATA "the_geom FROM vinedos using unique gid using SRID=23030"

CLASS
NAME "Vinedos"
STYLE
SYMBOL 'dashed1'
OUTLINECOLOR 0 0 0
END
TEMPLATE "ttt_query.html"
END

PROCESSING "LABEL_NO_CLIP=ON"
END

END

And my font file:

sansVera.ttf
esri-130esri_130.ttf
times   times.ttf
times-bold  timesbd.ttf
arial   arial.ttf

No error messages are received.

Any ideas??

Thanks.

Un saludo,

···

[mapserver-users] Problems labelling using Halo option

2010-09-30 Thread David Alda Fernandez de Lezea
Hi list,

I'm developing a program that generates some images from a WMS with a dynamic 
generated SLD. The problem is that I'm telling MapServer to generate some 
labels with Halo, to make them easy to read, using the following code:


vinedos





provincia1
municipio43
poligono4
parcela880
recinto1




#00
2
5 5 5 5




poligono-parcela-recinto


times
18
bold



0.50.5





2


#FF
0.85



#00
0.65







But when I receive the image the Halo is not applied (see attached file). My 
mapfile is as follows:

NAME "WMSSERVER"

STATUS ON
EXTENT 46 471 61 482 # Euskadi  
SHAPEPATH "extra/shapes/"
FONTSET "extra/fonts/fonts.txt"
SYMBOLSET "extra/symbols/symbols.sym"


IMAGETYPE "image/png; mode=24bit"

OUTPUTFORMAT
   NAME png
   DRIVER "AGG/PNG"
   MIMETYPE "image/png"
   IMAGEMODE RGBA
   EXTENSION "png"
   FORMATOPTION "TRANSPARENT=ON"
   FORMATOPTION "INTERLACE=OFF"
END
OUTPUTFORMAT
  NAME jpeg
  DRIVER "GD/JPEG"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
END
IMAGECOLOR 255 255 255
UNITS METERS

DEBUG ON
CONFIG "MS_ERRORFILE" 
"C:/ms4w/Apache/htdocs/ogcservices/logs/wms_impresiones_lotes_log.log"
DEBUG 5


WEB
IMAGEPATH "C:/ms4w/Apache/htdocs/ogcservices/tmp/"
IMAGEURL "tmp/"
METADATA  
"wms_name"  "IKT WMS Server"
"wms_title" "Servidor WMS IKT - Impresiones 
Lotes"
"wms_onlineresource"
"http://192.168.1.161/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/impresiones_lotes_wms.map&";
"wms_srs"   "EPSG:23030 EPSG:4326"
"wms_transparent"   "true"
"wms_abstract"  "Servicio de mapas WMS de IKT 
Nekazal Teknologia. Powered by Apache and UMN MapServer. Servicio WMS para las 
impresiones por lotes."
"wms_keywordlist"   "IKT,Euskadi,Mapas 
Euskadi"
"wms_feature_info_mime_type"   "application/vnd.ogc.gml"
"labelcache_map_edge_buffer" "-10" 
END
END

PROJECTION
"init=epsg:23030"
END

LAYER
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=postgres password= 
dbname=VITICOLA_IMPRESIONES host=192.168.1.161 port=5432"
NAME "vinedos"

PROJECTION
"init=epsg:23030"
END
DUMP TRUE
TYPE POLYGON
METADATA
"wms_title"   "vinedos"
"wms_srs" "EPSG:23030"
"wms_name""vinedos"
"wms_server_version"  "1.1.1"
"wms_format"  "image/gif"
"wms_transparent" "true"
"wms_extent"  "47 470 61 
482"
"gml_include_items"   "all"
END 
#Sentencia SQL para obtener los datos
DATA "the_geom FROM vinedos using unique gid using SRID=23030"

CLASS
NAME "Vinedos"
STYLE
SYMBOL 'dashed1'
OUTLINECOLOR 0 0 0
END
TEMPLATE "ttt_query.html"
END

PROCESSING "LABEL_NO_CLIP=ON"
END

END

And my font file:

sansVera.ttf
esri-130esri_130.ttf
times   times.ttf
times-bold  timesbd.ttf
arial   arial.ttf

No error messages are received.
 
Any ideas??

Thanks.
 
Un saludo,
 
··

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··
email: da...@ikt.esweb: www.ikt.es
··