On Thu, Jun 23, 2011 at 9:48 PM, brian youngbloood <[email protected]>wrote:

> I'm running version 1.7.3 with xerces support. I pinged the gdal folks.
> They questioned the gml format returned from geoserver, and mentioned a
> change that seemed to work. The question is if there is a option or
> configuration I missed that caused it to check the namespace. Would "Encode
> canonical WFS schema location" solve this problem. I have it enabled though,
> and it didn't seem to change the output.
>
> #Suggested change.
> <wfs:FeatureCollection xmlns:wfs="http://foo"; xmlns:gml="http://foo";
> xmlns:topp="http://foo";>
>
>
Pointing all the namespace prefixes at the same fictuous namespace
definitions is obviously wrong.
What exactly was their suggestion? The above is unquestionably broken.

Looking at the result of this request:


http://demo.geo-solutions.it/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=nurc:missions&maxFeatures=1


<wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs
http://demo.geo-solutions.it:80/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd
http://www.nurc.nato.int
http://demo.geo-solutions.it:80/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=nurc%3Amissions";
xmlns="http://www.opengis.net/wfs"; xmlns:wfs="http://www.opengis.net/wfs";
xmlns:nurc="http://www.nurc.nato.int"; xmlns:gml="http://www.opengis.net/gml";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<gml:boundedBy>
<gml:null>unknown</gml:null>
</gml:boundedBy>
<gml:featureMember>
<nurc:missions fid="missions.fid--2f2dea3c_1309cf33df5_-5abd">
<nurc:mission_id>352</nurc:mission_id>
<nurc:cruise_id>160</nurc:cruise_id>
<nurc:start_date>2010-08-20</nurc:start_date>
<nurc:end_date>2010-08-20</nurc:end_date>
<nurc:ext_name>REP10-2010-08-20 19:48:09.0</nurc:ext_name>
<nurc:the_geom>
<gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
<gml:coordinates decimal="." cs="," ts=" " xmlns:gml="
http://www.opengis.net/gml";>8.81153,43.79688
8.82394833,43.79257333</gml:coordinates>
</gml:LineString>
</nurc:the_geom>
</nurc:missions>
</gml:featureMember>
</wfs:FeatureCollection>

You can see above proper prefix/namespace associations. What is it that's
tripping OGR in your
case? If it's the schema location and OGR can only work if the schema
location for WFS is pointing
at http://schemas.opengis.net/wfs/1.1.0/wfs.xsd instead would fix it then
yeah, selecting "use canonical
schema locations" should fix your issues.

One thing though, if I try to translate the above in, say, kml with ogr2ogr
it works without issues:

ogr2ogr -f kml /tmp/test.kml /tmp/gml.xml

<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2";>
<Document><Folder><name>missions</name>
<Schema name="missions" id="missions">
        <SimpleField name="Name" type="string"></SimpleField>
        <SimpleField name="Description" type="string"></SimpleField>
        <SimpleField name="gml_id" type="string"></SimpleField>
        <SimpleField name="mission_id" type="int"></SimpleField>
        <SimpleField name="cruise_id" type="int"></SimpleField>
        <SimpleField name="start_date" type="string"></SimpleField>
        <SimpleField name="end_date" type="string"></SimpleField>
        <SimpleField name="ext_name" type="string"></SimpleField>
</Schema>
  <Placemark>

<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
        <ExtendedData><SchemaData schemaUrl="#missions">
                <SimpleData
name="gml_id">missions.fid--2f2dea3c_1309cf33df5_-5abd</SimpleData>
                <SimpleData name="mission_id">352</SimpleData>
                <SimpleData name="cruise_id">160</SimpleData>
                <SimpleData name="start_date">2010-08-20</SimpleData>
                <SimpleData name="end_date">2010-08-20</SimpleData>
                <SimpleData name="ext_name">REP10-2010-08-20
19:48:09.0</SimpleData>
        </SchemaData></ExtendedData>
      <LineString><coordinates>8.81153,43.79688
8.82394833,43.79257333</coordinates></LineString>
  </Placemark>
</Folder></Document></kml>

Soo... I'm not sure what is wrong on your end?

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to