Hi,
We have a multipolygon layer in postgis exposed as wfs-t layer in geoserver.

We are trying to edit it with QGis 2.12.1, and we can update and delete 
feature, but we have some problems inserting new feature

If we create a feature with a single polygon, on saving we always have an error:

Could not commit changes to layer piove_di_sacco:d3cp_fabbricati

Errors: ERROR: 1 feature(s) not added.
Provider errors:
unsuccessful service response: Error performing insert: java.lang.String cannot 
be cast to com.vividsolutions.jts.geom.Geometry

But if we create two polygon and merge them as a single feature, then insert 
works.

It seems QGis send a gml multypoligon feature if there is more than a polygon, 
a polygon feature otherwise, while geoserver needs a strictly corresponding 
feature type with that defined on the layer.

I think the correct behavior was to create a multypoligon feature with a single 
ring if the wfs layer is a multipolygon.

Is there a workaround? Force QGis to always send multypoligon feature type?

We have the same behavior with a multilinestring layer inserting single 
linestring.

Thanks

Antonio Calzavara
------------------------------------
U.O. Sistema Informativo Territoriale
Settore Sistemi Informativi
Provincia di Padova
Piazza Antenore, 3 - 35121 PADOVA
*tel: 0498201313 - 6fax: 0498201303
*email: 
[email protected]<mailto:[email protected]>
Skype:  tony.kaltz




----



Questo messaggio potrebbe contenere opinioni personali le quali non 
costituiscono impegni o posizioni ufficiali, salvo sia diversamente indicato. 
Il presente messaggio, corredato degli eventuali relativi allegati, contiene 
informazioni da considerarsi strettamente riservate ai sensi della vigente 
normativa in materia di protezione dei dati personali, ed e' destinato 
esclusivamente al/ai destinatario/i sopra indicato/i.

"Nota di riservatezza (D.lgs 196/03) - Chiunque ricevesse questo messaggio 
erroneamente, o comunque lo leggesse senza esserne legittimato, e' informato 
che trattenerlo, copiarlo, divulgarlo, distribuirlo a persone diverse dal 
destinatario e' severamente vietato, ed e' pregato di rinviarlo immediatamente 
al mittente distruggendone l'originale. Grazie."



Questa mail e' stata assoggettata a monitoraggio antivirus. Parte del contenuto 
e/o degli allegati potrebbero essere stati memorizzati e la loro gestione 
avviene in coformita' a quanto previsto dal D.lgs 196/03 e successive modifiche.



_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to