Re: [Gvsig_usuarios] Problemas con Map Server

2012-04-18 Por tema jyanez
Hola

Yo tube el mismo problema, pero con JPEG. El MapFile lo generé con gvSIG y
la configuración del mapserv es la siguiente:

MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=KML SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Para resolver el problema tienes debes cambiar el DRIVER en el mapfile de la
siguiente manera:

OUTPUTFORMAT
NAME png
DRIVER AGG/PNG
MIMETYPE image/png
IMAGEMODE RGB
EXTENSION png
FORMATOPTION GAMMA=0.75
END

Respecto al problema getSymbol(): Symbol definition error. Parsing error
near (cartoline):(line 26) en la versión 6 de mapserv ya no está soportado
por eso me marcaba error y por ende te recomienda usar AGG.

Por ejemplo yo comente en mi archivo .sym todo lo referente a cartoline, por
ejemplo:

#SYMBOL
#   NAME line_dash_3
#   TYPE cartoline
#   LINECAP round
#   LINEJOIN miter
#   LINEJOINMAXSIZE 3
#   STYLE 3 3 END
#END

y con ello ya puedo visualizar mis mapas con OpenLayer-2.11. Todo ello en
linux

Espero lo comentado sea de ayuda.
Saludos






--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Problemas-con-Map-Server-tp4340457p4896060.html
Sent from the gvSIG usuarios mailing list archive at Nabble.com.
___
gvSIG_usuarios mailing list
gvSIG_usuarios@listserv.gva.es

Para ver histórico de mensajes, editar sus preferencias de usuario o darse de 
baja en esta lista, acuda a la siguiente dirección:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios


Re: [Gvsig_usuarios] Problemas con Map Server

2012-01-26 Por tema Sergio Acosta y Lara
Hola. ¿No deberías hacer esta consulta a una lista de Mapserver u 
Openlayers? Aunque haya quien pueda ayudarte, esta lista es de usuarios 
de gvSIG. No es que no puedas, pero me parece que vas a tener más suerte 
si te dirigís a quienes están más en el tema (incluso decís que el .map 
fue generado con Qgis...). Saludos,

Sergio

El 26/01/2012 07:45 a.m., Francesc Cañas escribió:
Hola, quiero publicar una capa de Mapserver con Openlayers pero me 
genera el siguiente error al abrirla con 
http://localhost/cgi-bin/mapserv.exe


EL error es:

getSymbol(): Symbol definition error. Parsing error near 
(cartoline):(line 26) msOutputFormatValidate(): General error message. 
OUTPUTFORMAT png has IMAGEMODE RGB/RGBA, which is not supported for GD 
drivers.


Efectivamente leyendo en el web de mapserver encontré que GD solo 
acepta PC256 asi que lo cambio:


OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/PNG'
IMAGEMODE PC256
EXTENSION 'PNG'
END

Y ahora el error solo es: getSymbol(): Symbol definition error. 
Parsing error near (cartoline):(line 26)


Y aqui si que ya soy incapaz de saber porque. La linea 26 es esa: 
DRIVER 'GD/PNG'


Lo mas curioso es que con la version de ms4w 3.0.1 beta (la tiene un 
compañero) la capa si que se puede visualizar, pero con la 3.0.3, que 
es la que tengo, me salen estos errores.


El .map esta generado con el Qgis 1.7.3. Siguiendo los pasos de todos 
los tutoriales. El codigo entero es este:


# Map file created from QGIS project file 
U:/Matthias/00_AUMA_projectes/SIG/Projectes_CAT_wgs.qgs

# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
NAME Projectes Cat
# Map image size
SIZE 12 12
UNITS dd

EXTENT -9.569062 32.926808 6.763360 44.857479
FONTSET './font/fonts.txt'
SYMBOLSET './symbols/symbols.sym'
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END

# Background color for the map canvas -- change as desired
IMAGECOLOR 255 255 255
IMAGEQUALITY 95
IMAGETYPE png

OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/PNG'
IMAGEMODE PC256
EXTENSION 'PNG'
END
# Legend
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END

# Web interface definition. Only the template parameter
# is required to display a map. See MapServer documentation
WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'

# WMS server settings
METADATA
'ows_title' 'Projectes Cat'
'ows_onlineresource' 
'http://localhost/cgi-bin/mapserv.exe?map=C:/Users/Francesc/Documents/Projectes_wgs84_v6.map' 
http://localhost/cgi-bin/mapserv.exe?map=C:/Users/Francesc/Documents/Projectes_wgs84_v6.map%27

'ows_srs' 'EPSG:4326'
END

#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See 
MapServer documentation

TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
END

LAYER
NAME 'Provincias_wgs84'
TYPE POLYGON
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT -9.569062 32.926808 6.763360 44.857479
DATA 'C:/Users/Francesc/Documents/SHP/Provincias_wgs84.shp'
METADATA
'ows_title' 'Provincias_wgs84'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'Provincias_wgs84'
STYLE
WIDTH 0.35
OUTLINECOLOR 0 0 0
END
END
END

LAYER
NAME 'Projectes_UTM31_wgs84'
TYPE POINT
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT -9.569062 32.926808 6.763360 44.857479
DATA 'C:/Users/Francesc/Documents/SHP/Projectes_UTM31_wgs84.shp'
METADATA
'ows_title' 'Projectes_UTM31_wgs84'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'Projectes_UTM31_wgs84'
STYLE
SYMBOL circle
SIZE 7.0
OUTLINECOLOR 0 0 0
COLOR 103 132 169
END
END
END

END


gracias!

--
http://kikocanas.blogspot.com


___
gvSIG_usuarios mailing list
gvSIG_usuarios@listserv.gva.es

Para ver histórico de mensajes, editar sus preferencias de usuario o darse de 
baja en esta lista, acuda a la siguiente dirección:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios


___
gvSIG_usuarios mailing list
gvSIG_usuarios@listserv.gva.es

Para ver histórico de mensajes, editar sus preferencias de usuario o darse de 
baja en esta lista, acuda a la siguiente dirección:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios


Re: [Gvsig_usuarios] Problemas con Map Server

2012-01-26 Por tema Francesc Cañas
Hola, he descubierto la lista de mapserver cuando ya habia publicado el post, 
gracias igualmente!

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Problemas-con-Map-Server-tp4340457p4340542.html
Sent from the gvSIG usuarios mailing list archive at Nabble.com.
___
gvSIG_usuarios mailing list
gvSIG_usuarios@listserv.gva.es

Para ver histórico de mensajes, editar sus preferencias de usuario o darse de 
baja en esta lista, acuda a la siguiente dirección:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios