[Gvsig_usuarios] WMS imagen en blanco

Valenty Gonzalez gvalenty en creativa-consultores.com
Mie Jul 27 21:55:04 CEST 2011


Hola,

La respuesta al GetCapabilities es correcta!. Olvidé decirte que si el
mapfile tiene un error te devolverá un mensaje con la inconsistencia o
error y indicandote en ocasiones con precisión el error y la línea donde
se encuentra.

Si te devuelve un fichero que en realidad verás es un XML con la
información  del mapfile, entonces el mapfile o configuración de
mapserver está bueno y el servicio está funcionando.


Luego, sigue habiendo problemas con gvSIG :-S
Tengo un caso en 'localhost' similar al tuyo y la manera de verlo en
gvSIG es agregando la versión en el URL.
Le agregué a mi mapfile dos cosas que difieren del tuyo:

El & al final del wms_onlineresource en el mapfile
Y la sentencia wms_server_version en el mapfile

Pero si logro conectarme, usando gvSIG-1.10 sobre Ubuntu-10.04

Saludos,



El 27/07/2011 12:01 p.m., jyanez escribió:
> Valenty
> 
> He realizado lo que me has dicho. Cuando ingreso el url:
> http://localhost/cgi-bin/mapserv?MAP=/opt/datos/gismap/zacatecas.map&Request=GetCapabilities&Service=WMS&Version=1.1.1
> 
> La respuesta es guardar o visualizar un archivo, el cual anexo a
> continuación.
> ####
> <?xml version='1.0' encoding="UTF-8" standalone="no" ?>
> &lt;!DOCTYPE WMT_MS_Capabilities SYSTEM
> &quot;http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd&quot;
>  [ &lt;!ELEMENT VendorSpecificCapabilities EMPTY&gt; ]>  
> <WMT_MS_Capabilities version="1.1.1">
> < MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG 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=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE 
> 
> <Service>
>   <Name>OGC:WMS</Name>
>   <Title>Cambio de uso de suelo, Zacatecas</Title>
>   <Abstract></Abstract>
>   <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/>
>   <ContactInformation>
>   </ContactInformation>
> </Service>
> 
> <Capability>
>   <Request>
>     <GetCapabilities>
>       <Format>application/vnd.ogc.wms_xml</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </GetCapabilities>
>     <GetMap>
>       <Format>image/png; mode=24bit</Format>
>       <Format>image/gif</Format>
>       <Format>image/png</Format>
>       <Format>image/jpeg</Format>
>       <Format>image/vnd.wap.wbmp</Format>
>       <Format>image/tiff</Format>
>       <Format>image/svg+xml</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </GetMap>
>     <GetFeatureInfo>
>       <Format>text/plain</Format>
>       <Format>application/vnd.ogc.gml</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </GetFeatureInfo>
>     <DescribeLayer>
>       <Format>text/xml</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </DescribeLayer>
>     <GetLegendGraphic>
>       <Format>image/png; mode=24bit</Format>
>       <Format>image/gif</Format>
>       <Format>image/png</Format>
>       <Format>image/jpeg</Format>
>       <Format>image/vnd.wap.wbmp</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </GetLegendGraphic>
>     <GetStyles>
>       <Format>text/xml</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Get>
>           <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:href="http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&amp;"/></Post>
>         </HTTP>
>       </DCPType>
>     </GetStyles>
>   </Request>
>   <Exception>
>     <Format>application/vnd.ogc.se_xml</Format>
>     <Format>application/vnd.ogc.se_inimage</Format>
>     <Format>application/vnd.ogc.se_blank</Format>
>   </Exception>
>   <VendorSpecificCapabilities />
>   <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1"
> RemoteWFS="0"/>
>   <Layer>
>     <Name>map_generated_by_gvsig</Name>
>     <Title>Cambio de uso de suelo, Zacatecas</Title>
>     <Abstract></Abstract>
>     <SRS>epsg:4326</SRS>
>     <LatLonBoundingBox minx="1.76157e+06" miny="2.38873e+06"
> maxx="2.12683e+06" maxy="2.83663e+06" />
>     <Layer queryable="1" opaque="0" cascaded="0">
>         <Name>cambio</Name>
>         <Title>cambio_32.shp</Title>
>         <Abstract>generated by gvSIG</Abstract>
>         <SRS>EPSG:4326</SRS>
>         <LatLonBoundingBox minx="1.76157e+06" miny="2.38873e+06"
> maxx="2.12683e+06" maxy="2.83663e+06" />
>     </Layer>
>   </Layer>
> </Capability>
> </WMT_MS_Capabilities>
> ####
> 
> 
> Al ingresar el segundo url:
> http://localhost/cgi-bin/mapserv?MAP=/opt/datos/gismap/zacatecas.map&Version=1.1.1 
> 
> También la respuesta es abrir o guardar un archivo el cual contiene un
> error. anexo contenido.
> 
> ####
> <ServiceExceptionReport version="1.1.1">
> <ServiceException>
> msWMSDispatch(): WMS server error. Incomplete WMS request: REQUEST parameter
> missing
> </ServiceException>
> </ServiceExceptionReport>
> #####
> 
> Anexo el mapfile, que generé con gvSIG
> 
> ######
> MAP
>    NAME map_generated_by_gvsig
>    EXTENT 1761565.3019929668 2388725.249999892 2126830.7689999924
> 2836630.275155539
>    SYMBOLSET "symbols/zacatecas.sym"
>    FONTSET "fonts/fonts.txt"
>    SIZE 640 480
>    UNITS meters
>    CONFIG  "MS_ERRORFILE" "/opt/datos/log/mapserver.log"
>    LEGEND
>       IMAGECOLOR -1 -1 -1
>       LABEL
>          FONT "vera"
>          ANGLE FOLLOW
>          COLOR 0 0 0
>          ENCODING "UTF-8"
>          TYPE truetype
>          SIZE 8
>       END
>       STATUS ON
>       TRANSPARENT ON
>    END
>    WEB
>       IMAGEPATH "/opt/datos/tmp"
>       IMAGEURL "/opt/datos/tmp"
>       METADATA
>          "wms_encoding" "UTF-8"
>          "wms_title" "Cambio de uso de suelo, Zacatecas"
>          "wms_srs" "epsg:4326"
>          "wms_onlineresource"
> "http://localhost/cgi-bin/mapserv?map=/opt/datos/gismap/zacatecas.map&"
>          "wms_server_version"  "1.1.1"
>          "wms_format" "image/png"   
>        
>       END
>    END
>    PROJECTION
>     "proj=longlat"
>     "ellps=WGS84"
>     "datum=WGS84"
>     "no_defs"
>    END
>  END
>    IMAGETYPE agg
>    OUTPUTFORMAT
>     NAME agg
>     DRIVER AGG/PNG
>     IMAGEMODE RGB
>    END
> 
>    LAYER
>       NAME "cambio"
>       STATUS ON
>       TYPE POLYGON
>       DATA "/opt/shape/cus_32/cambio_32.shp"
>       MAXSCALE -1.0
>       MINSCALE -1.0
>       TRANSPARENCY 100
>       DUMP TRUE
>       TEMPLATE "."
>       CLASSITEM "FORMA_T3"
>       
>       PROJECTION
>          "proj=longlat"
>          "ellps=WGS84"
>          "datum=WGS84"
>          "no_defs"
>       END
>    CLASS
>          STYLE 
>             COLOR 11 221 94
>             OUTLINECOLOR 7 154 65
>             WIDTH 1
>          END
>          EXPRESSION "Asentamiento humano"
>          NAME "Asentamiento humano"
>       END
>       CLASS
>          STYLE 
>             COLOR 194 197 88
>             OUTLINECOLOR 135 137 61
>             WIDTH 1
>          END
>          EXPRESSION "Bosques"
>          NAME "Bosques"
>       END
>       CLASS
>          STYLE 
>             COLOR 185 185 85
>             OUTLINECOLOR 129 129 59
>             WIDTH 1
>          END
>          EXPRESSION "Cuerpo de agua"
>          NAME "Cuerpo de agua"
>       END
>       CLASS
>          STYLE 
>             COLOR 221 209 91
>             OUTLINECOLOR 154 146 63
>             WIDTH 1
>          END
>          EXPRESSION "Cultivos"
>          NAME "Cultivos"
>       END
>       CLASS
>          STYLE 
>             COLOR 206 41 49
>             OUTLINECOLOR 144 28 34
>             WIDTH 1
>          END
>          EXPRESSION "Matorral"
>          NAME "Matorral"
>       END
>       CLASS
>          STYLE 
>             COLOR 121 109 66
>             OUTLINECOLOR 84 76 46
>             WIDTH 1
>          END
>          EXPRESSION "Otros tipos de vegetacion"
>          NAME "Otros tipos de vegetacion"
>       END
>       CLASS
>          STYLE 
>             COLOR 74 137 73
>             OUTLINECOLOR 51 95 51
>             WIDTH 1
>          END
>          EXPRESSION "Pastizales inducidos y cultivados"
>          NAME "Pastizales inducidos y cultivados"
>       END
>       CLASS
>          STYLE 
>             COLOR 251 89 61
>             OUTLINECOLOR 175 62 42
>             WIDTH 1
>          END
>          EXPRESSION "Pastizales naturales"
>          NAME "Pastizales naturales"
>       END
>       CLASS
>          STYLE 
>             COLOR 41 224 31
>             OUTLINECOLOR 28 156 21
>             WIDTH 1
>          END
>          EXPRESSION "Selvas"
>          NAME "Selvas"
>       END
>       METADATA
>          "wms_title" "cambio_32.shp"
>          "wms_extent" "1761565.3019929668 2388725.249999892
> 2126830.7689999924 2836630.275155539"
>          "gml_include_items" "all"
>          "wms_server_version"  "1.1.1"
>          "wms_srs"  "EPSG:4326"
>          "wms_format" "image/png"
>       END
>    END # Layer
> END # Map File
> ########
> 
> 
> Espero y me puedan ayudar.
> Saludos
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-imagen-en-blanco-tp6624227p6626828.html
> Sent from the gvSIG usuarios mailing list archive at Nabble.com.
> _______________________________________________
> gvSIG_usuarios mailing list
> gvSIG_usuarios en 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
------------ próxima parte ------------
Se ha borrado un mensaje que no está en formato texto plano...
Nombre     : gvalenty.vcf
Tipo       : text/x-vcard
Tamaño     : 327 bytes
Descripción: no disponible
Url        : http://listserv.gva.es/pipermail/gvsig_usuarios/attachments/20110727/f6f2dd46/attachment.vcf 


Más información sobre la lista de distribución gvSIG_usuarios