Behavior of WFS GetFeature with outputFormat="SHAPE-ZIP" changed from geoserver 2.22.0 to 2.25.2

I’ve a featureType based on an Oracle View, with 3 geometry columns:

When exporting to Shapefile by using a WFS GetFeature POST:

<wfs:GetFeature service="WFS" version="1.1.0"
                xmlns:wfs="http://www.opengis.net/wfs"
                xmlns:ogc="http://www.opengis.net/ogc"
                xmlns:gml="http://www.opengis.net/gml"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
                outputFormat="SHAPE-ZIP">
  <wfs:Query typeName="OSP:INFRANODE" srsName="EPSG:4326">
    <ogc:Filter>
      <ogc:And>
        <ogc:BBOX>
          <gml:Envelope srsName="
                                 http://www.opengis.net/gml/srs/epsg.xml#4326">
            <gml:lowerCorner>-8.68313995989799 40.60415176603855</gml:lowerCorner>
            <gml:upperCorner>-8.671016375150227 40.60593562675562</gml:upperCorner>
          </gml:Envelope>
        </ogc:BBOX>
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>CAT_TYPE_ID</ogc:PropertyName>
          <ogc:Literal>46</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:And>
    </ogc:Filter>
  </wfs:Query>

In the geoserver version 2.22.0 it brings only 1 shapefile, only with the first geometry:

  • INFRANODE.shp

With the geoserver version 2.25.2 it brings 3 shapefiles with all geometries of the feature type:

  • INFRANODEGEOM.shp
  • INFRANODEBOX_GEOM.shp
  • INFRANODELABEL_GEOM.shp

Was it an intentional upgrade?
Can I send a geometry column on the GetFeature to export only the “GEOM” column? Or do I need to limit the feature type with only 1 geometry column?

Cheers,
Tiago

1 Like

Hi,

I consider that getting all three geometries with plain GetFeature is natural, and because shapefile can only have one geometry, then you’ll get three shapefiles.

To avoid that I guess you should edit the feature type schema so that either all geometries can be nullable, or so that the first geometry is not nullable but the two other geometries are. Then you can make a GetFeature request with the &propertyName=[list_of_properties] WFS reference — GeoServer 2.26.x User Manual.

-Jukka Rahkonen-

With “<ogc:PropertyName>GEOM</ogc:PropertyName>” in the XML POST Body it works.

But the behavior changed between versions, and I just like to check if it was expected.

Thanks Jukka

I confirm it is intended and expected:
https://osgeo-org.atlassian.net/browse/GEOS-10857

In your case it was likely working by accident, and was actually returning
the label geometry (unless it was null).

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit GeoSolutions Enterprise Support Services for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail

On Wed, Aug 21, 2024 at 10:25 AM Tiago V via OSGeo Discourse <
noreply@discourse.osgeo.org> wrote:

tixvieira https://discourse.osgeo.org/u/tixvieira
August 21

With “ogc:PropertyNameGEOM</ogc:PropertyName>” in the XML POST Body it
works.

But the behavior changed between versions, and I just like to check if it
was expected.

Thanks Jukka

Visit Topic
https://discourse.osgeo.org/t/behavior-of-wfs-getfeature-with-outputformat-shape-zip-changed-from-geoserver-2-22-0-to-2-25-2/49767/3
or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here
https://discourse.osgeo.org/email/unsubscribe/cde256681c7cc4d80a1d7b79b79b498ca35e3fbe0900927406303e903c2898ea
.

2 Likes

Great.

Thanks Andrea :slight_smile: