Hi Daniele,
I believe you stumbled upon a bug. Possibly introduced by the fix for this
issue:
http://jira.codehaus.org/browse/GEOT-3346
I will have to dig a bit deeper. Feel free to open a jira issue for this
one.
As for the use of DoubleLIst yes this intentional even though the binding
itself declares the gml3 namespace. We work around this in order to reuse
the code.
Also to note is that surfaces are not supported in geotools yet. WHile this
is a simple polygon more or less only the simple geometry (point,
linestring, polygon, multi*) are supported. There is however a patch in the
works to support them:
http://jira.codehaus.org/browse/GEOT-3324
-Justin
2011/1/21 <[email protected]>
> Hello everyone,
>
> I try to parse following xml with
> org.geotools.gml3.v3_2.GMLConfiguration().
> The problem is with usage of org.geotools.gml3.bindings.DoubleListBinding.
> new DoubleListBinding().getTarget() return QName("
> http://www.opengis.net/gml", "doubleList").
> ParseExecutor.java cannot find corresponding XSDTypeDefinition.
> There is used XSDTypeDefinition{"http://www.opengis.net/gml/3.2",
> "doubleList"}
>
> Is it correct to use DoubleListBinding in
> org.geotools.gml3.v3_2.GMLConfiguration()?
> In .v3_2.GMLConfiguration there is used "http://www.opengis.net/gml/3.2"
> uri.
> In DoubleListBinding is used "http://www.opengis.net/gml" uri.
> I think that DoubleListBinding should by independent from GML version.
> Please advice.
>
> XML:
> <?xml version='1.0' encoding='UTF-8'?>
> <gml:patches xmlns:gml="http://www.opengis.net/gml/3.2">
> <gml:PolygonPatch>
> <gml:exterior>
> <gml:LinearRing>
> <gml:pos>-125.451 32.942</gml:pos>
> <gml:pos>-125.291 32.947</gml:pos>
> <gml:pos>-125.284 32.85</gml:pos>
> <gml:pos>-125.434 32.85</gml:pos>
> <gml:pos>-125.451 32.942</gml:pos>
> </gml:LinearRing>
> </gml:exterior>
> </gml:PolygonPatch>
> </gml:patches>
>
> Code:
> Configuration configurationG = new
> org.geotools.gml3.v3_2.GMLConfiguration();
> Parser parser = new org.geotools.xml.Parser(configurationG);
> InputStream xml = this.getClass().getResourceAsStream("gml.xml");
> Object o = parser.parse(xml);
>
> Problem:
> Exception in thread "main" java.lang.RuntimeException: Parsing failed for
> pos: java.lang.NullPointerException
> at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:158)
> at
> org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:215)
> at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:181)
> at
> org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:228)
> at
> org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:626)
> at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.geotools.xml.Parser.parse(Parser.java:236)
> at org.geotools.xml.Parser.parse(Parser.java:164)
> at com.lhsystems.testy.GML2C3_2.parser(GML2C3_2.java:31)
> at com.lhsystems.testy.GML2C3_2.main(GML2C3_2.java:16)
> Caused by: java.lang.NullPointerException
> at
> org.geotools.gml3.bindings.DoubleListBinding.parse(DoubleListBinding.java:82)
> at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:147)
> ... 16 more
> --
> Best Regards,
> Daniel Bykowski
>
>
> Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Poland
> sp. z o.o., Gdansk, Registereintragung / Registration: 0000083575
> Board of Directors: Adam Wojewodka
>
> Sad Rejonowy Gdansk-Polnoc w Gdansku, VII Wydzial Gospodarczy Krajowego
> Rejestru Sadowego, KRS 0000083575, NIP 583-24-68-348, Regon 191499280
> kapital zakladowy 200.000 zl. oplacony w calosci
>
>
>
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users