Hi,

When using this plugin 
https://github.com/geoserver/geoserver/commits/main/src/community/schemaless-features
 on a MongoDB collection where values to be used by a GeoServer layer are 
declared as Object, the plugin builds a series of features where the feature 
type is based on the type of the 1st feature.

When layer expects values of type Double and the 1st feature found has type 
Double, everything goes fine: other values in collection with type Integer are 
casted to Double (e.g. value "29" is retrieved in the layer as "29.0").

But, when 1st feature found has type Integer, everything goes bad: if other 
values have type Double in collection, they are casted to Integer (e.g. value 
"29.45" is retrieved in the layer as "29").

This is a blocking issue for a layer based on such a collection...

Any idea how to fix this?

A simple workaround would be to systematically add something like "0.000000001" 
to every value in each document (this would force the object to have type 
Double). But this is decidedly ugly, cannot call it a solution...

Many thanks, Victor

Victor.Sinceac   |
Software Developer
victor.sinc...@corobor.com<mailto:victor.sinc...@corobor.com>
[cid:image351019.png@8CE27F4D.FA06EA71]
Tel: +33 1 45 73 60 60<tel:+33%201%2045%2073%2060%2060>
Corobor Systems  |      41 Rue Périer   ,       92120 MONTROUGE ,       France
[Corobor Systems on LinkedIn]<https://www.linkedin.com/company/corobor-systems>
[@corobor_systems]<https://twitter.com/corobor_systems>






________________________________
This message is subject to and does not create or vary any contractual 
relationship between Campbell Scientific Limited, its subsidiaries or 
affiliates ("CSL") and you. Internet communications are not secure and 
therefore CSL does not accept legal responsibility for the contents of this 
message. The message is intended for the addressee only and its contents and 
any attached files are strictly confidential. If you have received it in error, 
please telephone +44 (0)1509 601141 or email postmas...@campbellsci.co.uk. 
Thank you.
Campbell Scientific Ltd.
Company Registration Number: 1933935 (England and Wales) Registered Address: 
Campbell Park, 80 Hathern Road, Shepshed, Loughborough, Leicestershire LE12 
9GX, UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 601091
Web: www.campbellsci.co.uk

________________________________

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

Reply via email to