Andrea, sorry I wasn't trying to suggest a change to a bogus namespace. Like
you said further down in your message, I seem to be missing the namespace,
and for some reason it's not making it to the ogr version. Here is what I'm
seeing..
#This seems correct on my test server
/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>
#It's only when it's writing to the file system for ogr that it seems to
loose the namespace. (Encode canonical WFS schema location is checked and I
see it in wfs.xml)
/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>
I'll try another install of geoserver. It's got to be a configuration.
Weird. Thanks for the help. I'll let you know.
Brian
On Thu, Jun 23, 2011 at 3:50 PM, Andrea Aime <[email protected]>
wrote:
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&version=1.0.0&request=DescribeFeatureType&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
-------------------------------------------------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense..
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users