Hi,
ouch, looks like that use case is currently ignored by the complex
GeoJSON encoder, for reference:
https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/jav
a/org/geoserver/wfs/json/ComplexGeoJsonWriter.java#L388-L430
That say, since in JSON we cannot have multiple properties with the
same name I guess we could encode all the names and codes as an array
of objects, other suggestions are welcome :)
A pull request with this enhancement is welcome, otherwise you may want
to check the commercial support page.
Kind regards,
Nuno Oliveira
On Wed, 2020-01-08 at 05:51 +0000, Michael, Ursula (DEM) wrote:
> Hi,
>  
> Apologies if this one has already been identified.
> Where multiple properties of the same type have been encoded using
> the app-schema syntax below, only the last property is included in
> the GeoJSON output regardless of the number of times an attribute is
> mapped. GML outputs return all properties as expected.
>  
> https://docs.geoserver.org/latest/en/user/data/app-schema/feature-cha
> ining.html#configure-nesting-on-the-nested-feature-type
>  
> GeologicUnit has 3 gml:name properties in the mapping file, so each
> has a code space to clarify them:
> <AttributeMapping>
>   <targetAttribute>gml:name[1]</targetAttribute>
>   <sourceExpression>
>     <OCQL>ABBREVIATION</OCQL>
>   </sourceExpression>
>   <ClientProperty>
>     <name>codeSpace</name>
>     <value>'urn:cgi:classifierScheme:GSV:GeologicalUnitCode'</value>
>   </ClientProperty>
> </AttributeMapping>
> <AttributeMapping>
>   <targetAttribute>gml:name[2]</targetAttribute>
>   <sourceExpression>
>     <OCQL>NAME</OCQL>
>   </sourceExpression>
>   <ClientProperty>
>     <name>codeSpace</name>
>     <value>'urn:cgi:classifierScheme:GSV:GeologicalUnitName'</value>
>   </ClientProperty>
> </AttributeMapping>
> <AttributeMapping>
>   <targetAttribute>gml:name[3]</targetAttribute>
>   <sourceExpression>
>     <OCQL>id</OCQL>
>   </sourceExpression>
>   <ClientProperty>
>     <name>codeSpace</name>
>    
> 'urn:cgi:classifierScheme:GSV:MappedFeatureReference'
>   </ClientProperty>
> </AttributeMapping>
>  
>  
> I am currently using Geoserver 2.16.1, however this also occurred in
> versions 2.14 and 2.15.
> Is this a known limitation, or plans to handle this syntax for
> GeoJSON outputs in the future?
> I’d love to get this working correctly, if anyone has some advice or
> can shed some light on why it’s not working for json outputs only it
> would be greatly appreciated.
>  
> Kind Regards,
> Ursula
>  
>  _______________________________________________
> Geoserver-users mailing list
> 
> Please make sure you read the following two resources before posting
> to this list:
> - Earning your support instead of buying it, but Ian Turton: http://w
> ww.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/co
> mm/userlist-guidelines.html
> 
> If you want to request a feature or an improvement, also see this: ht
> tps://github.com/geoserver/geoserver/wiki/Successfully-requesting-
> and-integrating-new-features-and-improvements-in-GeoServer
> 
> 
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
-- 
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the
experts! 
Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
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.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to