1

We have the GeoPackage Output extension on our GeoServer. However, a WFS GetFeature request with outputformat=gpkg returns a geopackage with invalid text fields.

An attempt to read the geopackage using FME gives these warnings: "Field format 'VARCHAR(255)' not supported." "GPKG: unrecognized user_version=0x00000000 (0)"

Both FME and QGIS read the geopackage, but drop the invalid fields.

I can't find any suggestions on how to configure the extension to give a valid output. The correct data type in geopackages would be TEXT, but how can I achieve that?

The version of the extension matches the GeoServer version 2.22.2

Edit: I included all FME warnings here. Also other incompatible datatypes are found, but at least the integer fields are not dropped. I just noticed that for some reason FME mentions geometry columns here, but the actual geometry column is none of these and was read correctly.

OGCGEOPACKAGE reader: Field format 'VARCHAR(255)' not supported
OGCGEOPACKAGE reader: geometry column 'id' of type 'VARCHAR(255)' ignored
OGCGEOPACKAGE reader: Field format 'INT4' not supported. Interpreted as INT
OGCGEOPACKAGE reader: Field format 'INT4' not supported. Interpreted as INT
OGCGEOPACKAGE reader: Field format 'VARCHAR(255)' not supported
OGCGEOPACKAGE reader: geometry column 'muokkauspv' of type 'VARCHAR(255)' ignored
OGCGEOPACKAGE reader: Field format 'VARCHAR(255)' not supported
OGCGEOPACKAGE reader: geometry column 'link_id' of type 'VARCHAR(255)' ignored
OGCGEOPACKAGE reader: Field format 'INT4' not supported. Interpreted as INT
OGCGEOPACKAGE reader: Field format 'TIMESTAMP' not supported
OGCGEOPACKAGE reader: geometry column 'hakupv' of type 'TIMESTAMP' ignored
OGCGEOPACKAGE reader: Field format 'INT4' not supported. Interpreted as INT

The layer source is a PostGIS table.
DescribeFeatureType output:

  <xsd:complexType name="dr_nopeusrajoitusType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="id" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="alku_m" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="loppu_m" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="vaik_suunt" nillable="true" type="xsd:int"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="arvo" nillable="true" type="xsd:int"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="muokkauspv" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="link_id" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="kuntakoodi" nillable="true" type="xsd:int"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="hakupv" nillable="true" type="xsd:dateTime"/>
          <xsd:element maxOccurs="1" minOccurs="1" name="id_pk" nillable="false" type="xsd:int"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="geom" nillable="true" type="gml:GeometryPropertyType"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
7
  • does the geopackage open in other programs (e.g. QGis)?
    – Ian Turton
    Oct 19, 2023 at 11:09
  • You write that FME gives warnings. Warnings should not prevent reading the data. Do you actually get errors instead?
    – user30184
    Oct 19, 2023 at 12:29
  • I edited my question: Both FME and QGIS read the geopackage, but drop the invalid fields. FME gives warnings, not errors.
    – eshepherd
    Oct 19, 2023 at 12:38
  • what is the source of the GeoServer layer? can you add the describeFeature output for that layer too.
    – Ian Turton
    Oct 20, 2023 at 8:35
  • @IanTurton sure, added it
    – eshepherd
    Oct 23, 2023 at 6:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.