Opened 7 years ago

Closed 2 years ago

#1586 closed defect (worksforme)

v.in.wfs complains about xerces-c support in GDAL

Reported by: alf Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Vector Version: svn-releasebranch64
Keywords: wingrass, v.in.wfs Cc:
CPU: Unspecified Platform: MSWindows Vista

Description

Hi,

in a win-vista OS, v.in.wfs (in GRASS installed via OSGeo installer) complains about xerces-c:

ERROR: Unable to open data source <C:PATH_TO_LOCATION/PERMANENT/.tmp/5460.0.xml> ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library.

Best,

Alessandro

Attachments (1)

8822.0.xml.gz (44.6 KB) - added by neteler 6 years ago.
WFS downloaded file which crashes v.in.ogr

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by hamish

Component: DefaultPackaging
Keywords: wingrass added
Type: defectenhancement

can you run "ogrinfo --formats" from the GRASS terminal prompt? (mmph, only know how to really check for support using ldd on linux, see comments about it in the script)

the message to check for xerces-c is just a good guess as to the reason why v.in.ogr failed, not necessarily the definitive reason. but presumably it's because the version of GDAL/OGR shipped with osgeo4w wasn't built to support that.

Hamish

comment:2 Changed 7 years ago by hamish

Keywords: v.in.wfs added

comment:3 Changed 7 years ago by alf

Hey Hamish,

the osgeo4w was shipped with GDAL 1.8.1, and the WFS is reported in the supported formats list:

ogrinfo --formats Supported Formats:

-> "ESRI Shapefile" (read/write) -> "MapInfo? File" (read/write) -> "UK .NTF" (readonly) -> "SDTS" (readonly) -> "TIGER" (read/write) -> "S57" (read/write) -> "DGN" (read/write) -> "VRT" (readonly) -> "REC" (readonly) -> "Memory" (read/write) -> "BNA" (read/write) -> "CSV" (read/write) -> "NAS" (readonly) -> "GML" (read/write) -> "GPX" (read/write) -> "KML" (read/write) -> "GeoJSON" (read/write) -> "Interlis 1" (read/write) -> "Interlis 2" (read/write) -> "GMT" (read/write) -> "SQLite" (read/write) -> "ODBC" (read/write) -> "PGeo" (readonly) -> "MSSQLSpatial" (read/write) -> "OGDI" (readonly) -> "PostgreSQL" (read/write) -> "MySQL" (read/write) -> "PCIDSK" (read/write) -> "XPlane" (readonly) -> "AVCBin" (readonly) -> "AVCE00" (readonly) -> "DXF" (read/write) -> "Geoconcept" (read/write) -> "GeoRSS" (read/write) -> "GPSTrackMaker" (read/write) -> "VFK" (readonly) -> "PGDump" (read/write) -> "GPSBabel" (read/write) -> "SUA" (readonly) -> "OpenAir?" (readonly) -> "PDS" (readonly) -> "WFS" (readonly) -> "HTF" (readonly) -> "AeronavFAA" (readonly)

comment:4 Changed 7 years ago by hamish

hmm, I think you are going to have to look inside of gdal(.exe and or .dll) with Dependency Walker,

http://www.dependencywalker.com

Probably we know xerces-c will be missing, but just to 100% confirm before taking the request to the osgeo4w packagers.

thanks, Hamish

comment:5 in reply to:  3 Changed 7 years ago by hamish

Replying to alf:

the osgeo4w was shipped with GDAL 1.8.1, and the WFS is reported in the supported formats list:

ogrinfo --formats Supported Formats:

...

-> "WFS" (readonly)

can you run "ogrinfo" on the WFS server using that driver?

the way the v.in.wfs script works is to download the xml file at the URL (GetFeature? URL starting with 'http'), and then run

v.in.ogr -o dsn=features.xml out=output_map_name

can you do that manually? does the xml file you download look ok inside?

Hamish

comment:6 Changed 6 years ago by neteler

Milestone: 6.4.3

Does the problem persist with the currently shipped GDAL 1.9 version?

http://trac.osgeo.org/osgeo4w/wiki/PackageListing#GDAL

comment:7 Changed 6 years ago by neteler

Version: 6.4.2 RCssvn-releasebranch64

Current winGRASS standalone:

g.version -g                                                                    
version=6.4.3svn
revision=55719
date=2013

v.in.wfs wfs=http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap output=parks         
Retrieving data ...
  % Total    % Received % Xferd  Average Speed   Time
Time     Time  Current
                                 Dload  Upload   Total
Spent    Left  Speed
  0    64    0    64    0     0    175      0 --:--:--
--:--:-- --:--:--   175
  0    64    0    64    0     0    174      0 --:--:--
--:--:-- --:--:--     0
ERROR: Kann die Datenquelle <C:\Users\neteler\Documents\GIS DataBase/North-Carolina/user1/.tmp/5872.0.xml> nicht öffnen.
ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library.

(Un)related: the v.in.wfs manual page needs a working example.

comment:8 Changed 6 years ago by neteler

Component: PackagingVector
Type: enhancementdefect

I have enabled the previously suppressed error messages from the WFS server in r55754 (6.4) and r55754 (6.5).

New debugging: As a start on Linux:

# Geonames - Cities with > 1 million population:

ogrinfo -ro WFS:"http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&typename=geonam_gt1M" 
INFO: Open of `WFS:http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&typename=geonam_gt1M'
      using driver `WFS' successful.
1: geonam_gt1M

but next fails with segfaulting OGR:

v.in.wfs wfs="http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typename=geonam_gt1M" output=geonam_gt1M

Test on downloaded XML file (attached to this ticket for inspection):

GRASS 6.4.3svn (latlong):/tmp > v.in.ogr 8822.0.xml out=cities_1m
Projection of input dataset and current location appear to match
Layer: geonam_gt1M
WARNING: Width for column gml_id set to 255 (was not specified by OGR),
         some strings may be truncated!
WARNING: DBMI-DBF driver: column name 'alternatenames' truncated to
         'alternaten'
WARNING: DBMI-DBF driver: column name 'featureclass' truncated to
         'featurecla'
WARNING: DBMI-DBF driver: column name 'featurecode' truncated to
         'featurecod'
WARNING: DBMI-DBF driver: column name 'countrycode' truncated to
         'countrycod'
WARNING: DBMI-DBF driver: column name 'modificationdate' truncated to
         'modificati'
Counting polygons for 206 features...
Importing map 206 features...
Segmentation fault (core dumped)

ogrinfo --version
GDAL 1.9.1, released 2012/05/15

# OGR itself does not have problems:
ogrinfo -ro 8822.0.xml  
INFO: Open of `8822.0.xml'
      using driver `GML' successful.
1: geonam_gt1M (Point)

uname -a
Linux oboe.localdomain 3.8.4-202.fc18.x86_64 #1 SMP Thu Mar 21 17:02:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Changed 6 years ago by neteler

Attachment: 8822.0.xml.gz added

WFS downloaded file which crashes v.in.ogr

comment:9 in reply to:  8 ; Changed 6 years ago by mmetz

Replying to neteler:

New debugging: As a start on Linux:

Test on downloaded XML file (attached to this ticket for inspection):

GRASS 6.4.3svn (latlong):/tmp > v.in.ogr 8822.0.xml out=cities_1m
Projection of input dataset and current location appear to match
Layer: geonam_gt1M
WARNING: Width for column gml_id set to 255 (was not specified by OGR),
         some strings may be truncated!
WARNING: DBMI-DBF driver: column name 'alternatenames' truncated to
         'alternaten'
WARNING: DBMI-DBF driver: column name 'featureclass' truncated to
         'featurecla'
WARNING: DBMI-DBF driver: column name 'featurecode' truncated to
         'featurecod'
WARNING: DBMI-DBF driver: column name 'countrycode' truncated to
         'countrycod'
WARNING: DBMI-DBF driver: column name 'modificationdate' truncated to
         'modificati'
Counting polygons for 206 features...
Importing map 206 features...
Segmentation fault (core dumped)

ogrinfo --version
GDAL 1.9.1, released 2012/05/15

Works for me on Linux with GRASS 6.4.3svn and GDAL 1.9.2, released 2012/10/08.

Markus M

comment:10 in reply to:  9 Changed 6 years ago by mmetz

Replying to mmetz:

Works for me on Linux with GRASS 6.4.3svn and GDAL 1.9.2, released 2012/10/08.

Works for me also on Windows with GRASS 6.4.3svn and GDAL 1.8.1 (my osgeo4w is a bit old, but stable).

comment:11 in reply to:  7 Changed 6 years ago by hellik

Replying to neteler:

Current winGRASS standalone:

[...]

ERROR: Kann die Datenquelle <C:\Users\neteler\Documents\GIS DataBase/North-Carolina/user1/.tmp/5872.0.xml> nicht öffnen. ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library. }}}

the same with osgeo4w (DEBUG=3 on)

v.in.wfs output=parks wfs=http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap         
D2/3: filename =
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
D2/3: g.parser: set GIS_OPT_WFS=http://www2.dmsolutions.ca
/cgi-bin/mswfs_gmap
D2/3: g.parser: set GIS_OPT_OUTPUT=parks
D3/3: win_spawn: args = C:\windows\system32\cmd.exe /c
"C:\OSGeo4W\apps\msys\bin\sh.exe
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
@ARGS_PARSED@"
Retrieving data ...
  % Total    % Received % Xferd  Average Speed   Time
Time     Time  Current
                                 Dload  Upload   Total
Spent    Left  Speed
  0    64    0    64    0     0     56      0 --:--:--
0:00:01 --:--:--    56
  0    64    0    64    0     0     55      0 --:--:--
0:00:01 --:--:--     0
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       3
D3/3: region item: zone:       0
D3/3: region item: north:      50N
D3/3: region item: south:      40N
D3/3: region item: east:       20E
D3/3: region item: west:       0
D3/3: region item: cols:       24000
D3/3: region item: rows:       12000
D3/3: region item: e-w resol:  0:00:03
D3/3: region item: n-s resol:  0:00:03
D3/3: region item: top:        1.000000000000000
D3/3: region item: bottom:     0.000000000000000
D3/3: region item: cols3:      24000
D3/3: region item: rows3:      12000
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 0:00:03
D3/3: region item: n-s resol3: 0:00:03
D3/3: region item: t-b resol:  1
D3/3: G_adjust_Cell_head: epsilon_ns: 8.33333e-008,
epsilon_ew: 1e-006
ERROR: Unable to open data source <C:\grassdata/srtm41gar/test/.tmp/7320.0.xml>
ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library.
D1/3: g.parser: ret = 1
System Info                                                                     
GRASS version: 6.4.3svn                                                         
GRASS SVN Revision: 55719                                                       
GIS Library Revision: 50937 (2012-02-25)                                        
GDAL/OGR: 1.9.2                                                                 
PROJ4: Rel. 4.8.0, 6 March 2012                                                 
Python: 2.7.2                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)  

comment:12 in reply to:  8 ; Changed 6 years ago by hellik

Replying to neteler:

I have enabled the previously suppressed error messages from the WFS server in r55754 (6.4) and r55754 (6.5).

New debugging: As a start on Linux:

osgeo4w (DEBUG=3 on)

# Geonames - Cities with > 1 million population:

ogrinfo -ro WFS:"http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&typename=geonam_gt1M" 
INFO: Open of `WFS:http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&typename=geonam_gt1M'
      using driver `WFS' successful.
1: geonam_gt1M
C:\tmp\wfs>ogr2ogr --version
GDAL 1.9.2, released 2012/10/08

C:\tmp\wfs>ogrinfo -ro WFS:"http://mapserver.flightgear.org/ms?Service=WFS&reque
st=GetFeature&typename=geonam_gt1M"
INFO: Open of `WFS:http://mapserver.flightgear.org/ms?Service=WFS&request=GetFea
ture&typename=geonam_gt1M'
      using driver `WFS' successful.
1: geonam_gt1M

but next fails with segfaulting OGR:

v.in.wfs wfs="http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typename=geonam_gt1M" output=geonam_gt1M
v.in.wfs output=geonam_gt1M wfs="http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typename=geonam_gt1M"
D2/3: filename =
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
D2/3: g.parser: set GIS_OPT_WFS=\http://mapserver.flightgear
.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typenam
e=geonam_gt1M"
D2/3: g.parser: set GIS_OPT_OUTPUT=geonam_gt1M
D3/3: win_spawn: args = C:\windows\system32\cmd.exe /c
"C:\OSGeo4W\apps\msys\bin\sh.exe
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
@ARGS_PARSED@"
Retrieving data ...
curl: (1) Unsupported protocol: \http
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       3
D3/3: region item: zone:       0
D3/3: region item: north:      50N
D3/3: region item: south:      40N
D3/3: region item: east:       20E
D3/3: region item: west:       0
D3/3: region item: cols:       24000
D3/3: region item: rows:       12000
D3/3: region item: e-w resol:  0:00:03
D3/3: region item: n-s resol:  0:00:03
D3/3: region item: top:        1.000000000000000
D3/3: region item: bottom:     0.000000000000000
D3/3: region item: cols3:      24000
D3/3: region item: rows3:      12000
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 0:00:03
D3/3: region item: n-s resol3: 0:00:03
D3/3: region item: t-b resol:  1
D3/3: G_adjust_Cell_head: epsilon_ns: 8.33333e-008,
epsilon_ew: 1e-006
ERROR: Unable to open data source <C:\grassdata/srtm41gar/test/.tmp/7464.0.xml>
ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library.
D1/3: g.parser: ret = 1

comment:13 in reply to:  12 Changed 6 years ago by hellik

Replying to hellik:

v.in.wfs output=geonam_gt1M wfs="http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typename=geonam_gt1M"

wfs-input without quotes

v.in.wfs output=geonam_gt1M wfs=http://mapserver.flightgear.org/ms?Service=WFS&request=GetFeature&version=1.0.0&typename=geonam_gt1M
D2/3: filename =
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
D2/3: g.parser: set
GIS_OPT_WFS=http://mapserver.flightgear.org/ms?Service=WFS
D2/3: g.parser: set GIS_OPT_OUTPUT=geonam_gt1M
D3/3: win_spawn: args = C:\windows\system32\cmd.exe /c
"C:\OSGeo4W\apps\msys\bin\sh.exe
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/v.in.wfs
@ARGS_PARSED@"
Retrieving data ...
  % Total    % Received % Xferd  Average Speed   Time
Time     Time  Current
                                 Dload  Upload   Total
Spent    Left  Speed
100   544    0   544    0     0    447      0 --:--:--
0:00:01 --:--:--   447
100   544    0   544    0     0    447      0 --:--:--
0:00:01 --:--:--     0
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       3
D3/3: region item: zone:       0
D3/3: region item: north:      50N
D3/3: region item: south:      40N
D3/3: region item: east:       20E
D3/3: region item: west:       0
D3/3: region item: cols:       24000
D3/3: region item: rows:       12000
D3/3: region item: e-w resol:  0:00:03
D3/3: region item: n-s resol:  0:00:03
D3/3: region item: top:        1.000000000000000
D3/3: region item: bottom:     0.000000000000000
D3/3: region item: cols3:      24000
D3/3: region item: rows3:      12000
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 0:00:03
D3/3: region item: n-s resol3: 0:00:03
D3/3: region item: t-b resol:  1
D3/3: G_adjust_Cell_head: epsilon_ns: 8.33333e-008,
epsilon_ew: 1e-006
ERROR: Unable to open data source <C:\grassdata/srtm41gar/test/.tmp/2484.0.xml>
ERROR: WFS-XML file not readable. Check if xerces-c support is compiled into GDAL/OGR library.
D1/3: g.parser: ret = 1
Der Befehl "request" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl "version" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl "typename" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

comment:14 Changed 3 years ago by neteler

Milestone: 6.4.36.4.6

comment:15 Changed 2 years ago by marisn

Resolution: worksforme
Status: newclosed

All of provided examples are invalid as those WFS services are not operational any more. Tested v.in.wfs with a MapServer? WFS service and it works without problems. Closing as has been fixed at some point. Reopen only if a new working example of crash is provided.

GRASS versija: 7.3.svn                                                          
GRASS SVN revīzija: r70508                                                      
Būvējuma datums: 2017-01-09                                                     
Būvēšanas platforma: x86_64-w64-mingw32                                         
GDAL: 2.1.2                                                                     
PROJ.4: 4.9.3                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.14.1                                                                  
Python: 2.7.5                                                                   
wxPython: 2.8.12.1                                                              
Platforma: Windows-8-6.2.9200 (OSGeo4W)  
Note: See TracTickets for help on using tickets.