I have tested against some downstream apps, and

Using a table with a point and an XML element, I have done some downstream
testing. I have made some improvements to better support them (notably GML2
support for XML), and will be updating my PR with these changes shortly.
Overall, downstream applications have very poor support for the XML type
(important comments/observations in red):

GeoServer WFS: Gives xml output for both GML2 and GML3:

GML2:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs"; xmlns:wfs="
http://www.opengis.net/wfs"; xmlns:it.geosolutions="
http://www.geo-solutions.it"; xmlns:gml="http://www.opengis.net/gml";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd
http://www.geo-solutions.it
http://localhost:8080/geoserver/it.geosolutions/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=it.geosolutions%3Aa_geoxml
">
<gml:boundedBy>
  <gml:null>unknown</gml:null>
</gml:boundedBy>
<gml:featureMember>
  <it.geosolutions:a_geoxml fid="a_geoxml.1">
    <it.geosolutions:geom>
      <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
        <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; decimal="."
cs="," ts=" ">0,0</gml:coordinates>
      </gml:Point>
    </it.geosolutions:geom>
    <it.geosolutions:xml>
      <root>
        docroot
        <foo>bar</foo>
        <bar>foo</bar>
      </root>
    </it.geosolutions:xml>
  </it.geosolutions:a_geoxml>
</gml:featureMember>
<gml:featureMember>
  <it.geosolutions:a_geoxml fid="a_geoxml.2">
    <it.geosolutions:geom>
      <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
        <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; decimal="."
cs="," ts=" ">1,1</gml:coordinates>
      </gml:Point>
    </it.geosolutions:geom>
    <it.geosolutions:xml>
      <root>
        docroot
        <bar>foo</bar>
        <foo>bar</foo>
      </root>
    </it.geosolutions:xml>
  </it.geosolutions:a_geoxml>
</gml:featureMember></wfs:FeatureCollection>

GML3:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:it.geosolutions="http://www.geo-solutions.it"; xmlns:ogc="
http://www.opengis.net/ogc"; xmlns:wfs="http://www.opengis.net/wfs";
xmlns:ows="http://www.opengis.net/ows"; xmlns:xlink="
http://www.w3.org/1999/xlink"; xmlns:gml="http://www.opengis.net/gml";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; numberOfFeatures="0"
timeStamp="2015-03-03T23:42:33.255Z" xsi:schemaLocation="
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd
http://www.geo-solutions.it
http://localhost:8080/geoserver/it.geosolutions/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=it.geosolutions%3Aa_geoxml
">
  <gml:featureMembers>
    <it.geosolutions:a_geoxml gml:id="a_geoxml.1">
      <it.geosolutions:geom/>
      <it.geosolutions:xml>
        <it.geosolutions:root>
          docroot
          <it.geosolutions:foo>bar</it.geosolutions:foo>
          <it.geosolutions:bar>foo</it.geosolutions:bar>
        </it.geosolutions:root>
      </it.geosolutions:xml>
    </it.geosolutions:a_geoxml>
    <it.geosolutions:a_geoxml gml:id="a_geoxml.2">
      <it.geosolutions:geom/>
      <it.geosolutions:xml>
        <it.geosolutions:root>
          docroot
          <it.geosolutions:bar>foo</it.geosolutions:bar>
          <it.geosolutions:foo>bar</it.geosolutions:foo>
        </it.geosolutions:root>
      </it.geosolutions:xml>
    </it.geosolutions:a_geoxml>
  </gml:featureMembers>
</wfs:FeatureCollection>

Note that for GML 3 the elements inherit the namespaces of the parent XML.
I am not sure if this is desired?
Also note that the XML element looks like:

      <root>
        docroot
        <foo>bar</foo>
        <bar>foo</bar>
      </root>

For all other WFS formats (GeoJSON, CSV, ...), the XML is interpreted as a
string: "[#document-fragment: null]"
For WMS getFeatureInfo, the XML attribute is also interpreted as a string:
"[#document-fragment: null]"

QGIS: The XML root element is not recognized. The child nodes "foo" and
"bar" register as seperate attributes:

[image: Inline image 1]

Gaia: The root element registers as a child of the XML attribute. The bar
element registers as its own attribute. The foo element does not appear:

[image: Inline image 3]

UDig: The XML type is not parsed, leading to a blank element:

[image: Inline image 2]

Overall, downstream applications have very poor compatability with XML.
I also notice that getFeatureInfo, as well as GeoJSON, CSV, etc. all seem
to do a toString on the WC3 Document that is storing the XML? I guess I
will need to modify the encoders for all of these as well. I am somewhat
surprised that they are not using something like Converters?

Torben

On Tue, Feb 24, 2015 at 10:47 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> On Tue, Feb 24, 2015 at 4:31 PM, Torben Barsballe <
> tbarsba...@boundlessgeo.com> wrote:
>
>> With respect to client testing, are all of these projects downstream of
>> GeoTools? I know Udig is, but QGIS looks like it only depends on the C++
>> port of JTS? Then to properly test these changes, I would need to build
>> each of these projects locally correct?
>>
>
> Hum no, I really meant, serving these extended GML from GeoServer WFS, and
> connect the clients to it, see how that works.
> So no building, just installing binaries and checking if all works fine,
> and if not, if there is some reasonable approach to make it better.
>
>
>>
>> I hadn't heard of Gaia before, is this the right project:
>> http://gcmd.nasa.gov/records/CARBONTOOLS_GAIA.html
>>
>
> I normally use this one:
> http://thecarbonproject.azurewebsites.net/Products/Gaia
>
>>
>>
>> For the oracle API, implementation is further complicated by the fact
>> that all the XML functions use a seperate set of JARs from the Oracle
>> XML Developers Kit. (This is actually where I am running into most of the
>> trouble).
>>
>
> I see... yeah, Oracle takes pleasure in inflicting pain to open source
> developers it seems...
>
> Cheers
> Andrea
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
>
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
> -------------------------------------------------------
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to