Hi GeoServer-Developers,

Andrea Aime asked me to involve this mailing list regarding the
following issue & pull request:
https://osgeo-org.atlassian.net/browse/GEOS-7349
https://github.com/geoserver/geoserver/pull/1370

Context:
- GeoServer WFS-Response with outputFormat=JSON
- FeatureType with multiple geometries
- any of the geometries might be null
- the JSON contains one "geometry" attribute, which might be null,
according to the spec
- the JSON contains one "geometry_name" attribute, which defines the
name of the attribute providing the value for the above
- GeoTools FeatureTypes have a "default geometry"

Question:
- What is the desired behaviour if the default geometry of the feature is null?

Solutions:
1) write "null" to the JSON "geometry" field and write the name of the
default geometry attribute to "geometry_name"
Pro: The value of the "geometry_name" field will be the name of the
GeoTools default geometry attribute, consistently across all features
of a feature type.

2) Serialize the first not-null geometry of the feature to the JSON
"geometry" field and write the corresponding field name to
"geometry_name"
Pro: The JSON default geometry will be populated more often than in
1). This makes it more likely for the feature to be displayed
out-of-the-box, like in OpenLayers.

Currently, in this case the "geometry_name" does not correspond to the
value of "geometry".

I can offer to fix this issue. Please given me a feedback which way you prefer.

Best regards,
Andreas


-- 
Andreas
----------------------------------------------------------------
ITS Telco Services GmbH
GIS Services & Solutions
Telecommunications Division
Dillenburger Str. 77
D-51105 Köln
Tel.: +49 (0)221 820 07 00
Fax : +49 (0)221 820 07 22
Mail: i...@its-telco.de
Web : http://www.its-telco.de
----------------------------------------------------------------
Sitz der Gesellschaft: Köln
Amtsgericht Köln, HRB 59310
Geschäftsführer: Gunnar Haack, Ralf Petersilka, Michael Schnepf, Kai
Schriewer, Ludger Schulte
----------------------------------------------------------------

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese
E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the
intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.

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

Reply via email to