Jukka,

Thanks for your response. It is something odd. This geometry is really tricky 
an complex, but I tried with other geometries and they were treated correctly 
by desktop gis applications and mapserver. I tested them with ogrinfo and they 
were ok. So I've tried what you told me, an it worked. Now I can retrieve the 
geometry correctly. Thanks for your help.

Best regards.
 
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: [email protected]                                web: www.ikt.es
··················································································

-----Mensaje original-----
De: [email protected] 
[mailto:[email protected]] En nombre de Rahkonen Jukka
Enviado el: miércoles, 30 de junio de 2010 12:27
Para: [email protected]
Asunto: Re: [mapserver-users] Problems loading gml file in desktopgisretrieved 
from wfs


Hi,

I captured your gml, saved in on disk and checked it with ogrinfo. The result 
is odd, it tells that the geometry is MULTIPOLYGON EMPTY. That makes me think 
that Mapserver has perhaps created invalid GML.

d:\FWTools2.4.6>ogrinfo -al testgml.gml
Had to open data source read-only.
INFO: Open of `testgml.gml'
      using driver `GML' successful.

Layer name: RecintosSigpac
Geometry: Unknown (any)
Feature Count: 1
Extent: (0.000000, 0.000000) - (0.000000, 0.000000) Layer SRS WKT:
(unknown)
GID: Integer (0.0)
PROVINCIA: Integer (0.0)
MUNICIPIO: Integer (0.0)
POLIGONO: Integer (0.0)
PARCELA: Integer (0.0)
RECINTO: Integer (0.0)
DN_SURFACE: String (12.0)
DN_PERIMET: String (11.0)
PENDIENTE: Integer (0.0)
ELEGIBILIDAD: Integer (0.0)
COEF_REGAD: Integer (0.0)
COEF_PASTO: Integer (0.0)
USO_SIGPAC: Integer (0.0)
USO_2003: Integer (0.0)
PARCELA_AG: String (0.0)
DN_OID: Integer (0.0)
FECHA: String (8.0)
OGRFeature(RecintosSigpac):0
  GID (Integer) = 318187
  PROVINCIA (Integer) = 1
  MUNICIPIO (Integer) = 18
  POLIGONO (Integer) = 5
  PARCELA (Integer) = 1047
  RECINTO (Integer) = 41
  DN_SURFACE (String) = 887277,80103
  DN_PERIMET (String) = 13888,79633
  PENDIENTE (Integer) = 18
  ELEGIBILIDAD (Integer) = 0
  COEF_REGAD (Integer) = 0
  COEF_PASTO (Integer) = 0
  USO_SIGPAC (Integer) = 11
  USO_2003 (Integer) = 11
  PARCELA_AG (String) =
  DN_OID (Integer) = 1183712842
  FECHA (String) = 01/01/10
  MULTIPOLYGON EMPTY

I also tried to convert the gml into shapefile with d:\FWTools2.4.6>ogr2ogr -f 
"ESRI Shapefile" testgml.shp testgml.gml

The resulting shapefile contains all the attributes but no geometry.

What I have experienced with WFS clients it that very often they cannot get 
features from WFS services on a map, or they success only with a certain WFS 
server mark, for example Geoserver of deegree, but not both.
Reason may be in a slightly different ways used by clients for building WFS 
requests, especially with filters. Differences can be bugs, or then both ways 
are correct but the WFS server has been made to support only one way because 
developers have been busy with taking care of their own babies and they have 
not had time or interest to try other client/server combinations for checking 
the interoperability. It is not uncommon either that WFS server is sending the 
GML but client fails in parsing it. Sometimes saving the GML on disk and 
converting it to some other format with ogr2ogr helps because it is not trying 
to compare GML with all the schemas which are referred. More troubles comes 
from the big differences between WFS versions 1.0.0 and 1.1.0 like GML2 vs. 
GML3 and the famous axis order thing. For example, it look like WFS client 
developers working with deegree jumped into building 1.1.0 and left version 
1.0.0 more of less unmaintained, even for many users WFS 1.0.0 would suit 
better.

I saw your were using WFS 1.1.0. Try version 1.0.0 instead, it can be better 
supported by the clients.

-Jukka Rahkonen-

David Alda Fernandez de Lezea wrote:

> Hi list,
> 
> I'm having some problems loading a getFeature gml file retrieved from 
> a WFS served by MapServer. I can't load it in gvSIG, nor in uDig and 
> in Qgis. How many different ways are there to retrieve information 
> from a WFS server?
> 
> MapServer Version:
> 5.6.1 (the on included in ms4w package)
> 
> My WFS Server
> 
> MAP
>               NAME "wfs_server"
>               STATUS ON
>               
>               EXTENT 460000 4710000 610000 4820000 # Euskadi
>               
>               PROJECTION
>                       "init=epsg:23030"
>               END
>               
>               SHAPEPATH "shapes/"
>               FONTSET "misc/fonts/fonts.txt"
>               
>               IMAGETYPE "image/png; mode=24bit"
>               IMAGECOLOR 255 255 255
>               UNITS METERS
>               
>               DEBUG ON
>               CONFIG "MS_ERRORFILE" 
> "C:/ms4w/Apache/htdocs/MFD/tmp/ms_wfs.log"
>               DEBUG 5
>               
>               WEB
>                       IMAGEPATH "MFD/tmp/"
>                       IMAGEURL "tmp/"
>                       METADATA
>                               "wfs_title" "IKT WFS Server" ## REQUIRED
>                               "wfs_abstract" "Servicio de
> mapas WFS de IKT Nekazal Teknologia. Powered by Apache and UMN 
> MapServer" ## REQUIRED
>                               "wfs_onlineresource" 
> "http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/eje
mplo_wfs.map&" ## Recommended
>                               "wfs_srs" "EPSG:23030" ## Recommended
>                               "wfs_keywordlist"               
> "IKT,Euskadi,Mapas Euskadi"
>                               "wfs_fees"              "none"
>                               "wfs_accessconstraints"         
> "Ninguna"
>                               "ows_contactorganization"   
> "http://www.ikt.es";
>                               "wfs_geometry_element_name" 
> "MS_GEOMETRY"
>                       END
>               END
>       
>               LAYER
>                       DEBUG 5
>                       NAME "RecintosSigpac"
>                       PROJECTION
>                               "init=epsg:23030"
>                       END
>                       METADATA
>                               "wfs_title" "Recintos Sigpac
> 2009" ## REQUIRED
>                               "wfs_abstract" "Recintos"
>                               "wfs_name" "RecintosSigpac"
>                               "wfs_geometry_element_name" 
> "MS_GEOMETRY"
>                               "wfs_srs" "EPSG:23030" ## Recommended
>                               "wfs_extent"          
> "463506.9978541628 4702558.185239193 603185.4988525142 
> 4811754.780732273"
>                               "gml_featureid" "gid" ## REQUIRED
>                               "gml_include_items"     "all"
>                       END
>                       TYPE POLYGON
>                       
>                       CONNECTIONTYPE oraclespatial
>                       CONNECTION "admcarto/admca...@ora10gex"
>                       
>                       DATA "GEOMETRY FROM (SELECT * FROM
> GT_SIGPAC_REC_2010_ED50) USING UNIQUE gid SRID 82337" #todo el sigpac
>                       
>                       DUMP TRUE ## REQUIRED
>                       
>                       CLASS
>                               NAME "Municipios_Gipuzkoa"
>                               STYLE
>                                       OUTLINECOLOR 255 255 255
>                               END
>                               TEMPLATE "ms_template.html"
>                       END
>                       
>                       
>                       STATUS ON
>               END # Layer
>                       
> END # Map File
> 
> 
...

GML part from the previous mail removed.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to