ogr based wfs output parsing error X
--------------------------------------------------
Key: GEOS-4649
URL: https://jira.codehaus.org/browse/GEOS-4649
Project: GeoServer
Issue Type: Bug
Components: OGR output format
Affects Versions: 2.1.1
Environment: GDAL 1.7.3, released 2010/11/10
Fedora release 14 (Laughlin)
Reporter: Brian Youngblood
Assignee: Andrea Aime
Using the OGR plugin and ogr2ogr conversion utility, a parse error is causing a exception due to the lack of a proper namespace URL.
#It's only when it's writing to the file system for ogr that it seems to loose the namespace.
/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_cities&maxFeatures=50&outputFormat=OGR-CSV
# cat /tmp/ogrtmpin0.8728093109083671/tasmania_cities.gml
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection><gml:boundedBy><gml:Box><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">147.2910004483,-42.851001816890005 147.2910004483,-42.851001816890005</gml:coordinates></gml:Box></gml:boundedBy><gml:featureMember><topp:tasmania_cities fid="tasmania_cities.1"><topp:the_geom><gml:MultiPoint><gml:pointMember><gml:Point><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">147.2910004483,-42.851001816890005</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></topp:the_geom><topp:CITY_NAME>Hobart</topp:CITY_NAME><topp:ADMIN_NAME>Tasmania</topp:ADMIN_NAME><topp:CNTRY_NAME>Australia</topp:CNTRY_NAME><topp:STATUS>Provincial capital</topp:STATUS><topp:POP_CLASS>100,000 to 250,000</topp:POP_CLASS></topp:tasmania_cities></gml:featureMember></wfs:FeatureCollection>
#Error generated by ogr2ogr
<?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
Exception occurred during output generation
ogr2ogr did not terminate successfully, exit code 1. Was trying to run: [ogr2ogr, -f, CSV, -a_srs, /tmp/ogrtmpin0.2402847924288226/gdal_srs2377866380270641662wkt, /tmp/ogrtmpout0.4940614489538815/tasmania_cities.csv, /tmp/ogrtmpin0.2402847924288226/tasmania_cities.gml]
Resulted in:
ERROR 1: XML Parsing Error: prefix 'wfs' can not be resolved to namespace URI
...
#Getting the gml without the ogr plugin seems to work fine.
/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_cities&maxFeatures=1
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openplans.org/topp http://50.56.33.43/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp%3Atasmania_cities http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember><topp:tasmania\_cities fid="tasmania_cities.1"><topp:the_geom><gml:MultiPoint srsName="http://www.opengis.net/gml/srs/epsg\.xml\#4326"><gml:pointMember><gml:Point><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">147.29100045,-42.85100182</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></topp:the_geom><topp:CITY_NAME>Hobart</topp:CITY_NAME><topp:ADMIN_NAME>Tasmania</topp:ADMIN_NAME><topp:CNTRY_NAME>Australia</topp:CNTRY_NAME><topp:STATUS>Provincial capital</topp:STATUS><topp:POP_CLASS>100,000 to 250,000</topp:POP_CLASS></topp:tasmania_cities></gml:featureMember></wfs:FeatureCollection>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira