[Geoserver-users] Unable to use GML files as Datastores

Dear all,

I’ll try to use gml files as Datastores but it’s not working…
A simple file (see below) failed with a TimeOut…

<?xml version="1.0" encoding="UTF-8"?>

<gml:Null xmlns:gml=“http://www.opengis.net/gml” xmlns:sch=“http://www.ascc.net/xml/schematron” xmlns:xlink=“http://www.w3.org/1999/xlink” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation="http://www.opengis.net/gml

http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>

With a more complex file (see below), geoserver throw an null pointer exception for the method getTypeNames(FileGMLDataStore.java:104)

<?xml version="1.0" encoding="UTF-8"?>

<gml:FeatureCollection xmlns:gml=“http://www.opengis.net/gml” xmlns:sch=“http://www.ascc.net/xml/schematron” xmlns:xlink=“http://www.w3.org/1999/xlink” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation="http://www.opengis.net/gml

http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd">
gml:boundedBy
gml:Envelope
gml:lowerCorner0 0</gml:lowerCorner>
gml:upperCorner500 500</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
gml:featureMember
gml:Observation
gml:validTime/
gml:target
gml:Polygon
gml:outerBoundaryIs
gml:LinearRing
gml:coordinates0,0 100,0 100,100 0,100 0,0</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:target>
gml:resultOf/
</gml:Observation>
</gml:featureMember>
</gml:FeatureCollection>

I know that GML isn’t the best chooise with regards to the speed but I only have this kind of file as input…

What’s wrong with the GML datastore??? or with MY GML files???

WKR

Simon

Hi Simon,

Unfortunately the GML data store in GeoServer is quite poorly maintained. Saying it "works" is a stretch, which is why we don't ship with it directly.

That said, one thing to note is that it only does gml2, not gml3 which is specified below. I also notice that your polygon is specified in gml2 but the document is gml3.

-Justin

Simon Janssens wrote:

Dear all,

I'll try to use gml files as Datastores but it's not working....
A simple file (see below) failed with a TimeOut...

      <?xml version="1.0" encoding="UTF-8"?>
      <gml:Null xmlns:gml="http://www.opengis.net/gml&quot;
      xmlns:sch="http://www.ascc.net/xml/schematron&quot;
      xmlns:xlink="http://www.w3.org/1999/xlink&quot;
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation="http://www.opengis.net/gml

      http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;

With a more complex file (see below), geoserver throw an null pointer exception for the method getTypeNames(FileGMLDataStore.java:104)

      <?xml version="1.0" encoding="UTF-8"?>
      <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml&quot;
      xmlns:sch="http://www.ascc.net/xml/schematron&quot;
      xmlns:xlink="http://www.w3.org/1999/xlink&quot;
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation="http://www.opengis.net/gml

      http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;&gt;
              <gml:boundedBy>
                      <gml:Envelope>
                              <gml:lowerCorner>0 0</gml:lowerCorner>
                              <gml:upperCorner>500 500</gml:upperCorner>
                      </gml:Envelope>
              </gml:boundedBy>
              <gml:featureMember>
                      <gml:Observation>
                              <gml:validTime/>
                              <gml:target>
                                      <gml:Polygon>
                                              <gml:outerBoundaryIs>
                                                      <gml:LinearRing>
                                                                   <gml:coordinates>0,0 100,0 100,100 0,100 0,0</gml:coordinates>
                                                      </gml:LinearRing>
                                              </gml:outerBoundaryIs>
                                      </gml:Polygon>
                              </gml:target>
                              <gml:resultOf/>
                      </gml:Observation>
              </gml:featureMember>
      </gml:FeatureCollection>

I know that GML isn't the best chooise with regards to the speed but I only have this kind of file as input....

What's wrong with the GML datastore??? or with MY GML files???

WKR

Simon

------------------------------------------------------------------------

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.