Hi Deen,
I'm not 100% sure (still a novice in app-schema) but it seems to me this
XML schema is violating
the "GML striping" rule. From the documentation:
-----
Note that the GML encoding rules require that complex types are never the
direct property of another complex type; they are always contained in a
property type to ensure that their type is encoded in a surrounding
element. Encoded GML is always type/property/type/property. This is also
known as the GML “striping” rule.
-----
http://docs.geoserver.org/latest/en/user/data/app-schema/mapping-file.html
If that's the case, app-schema might just not be able to encode it.
Hopefully someone more experienced
will follow up confirming this, or showing a way to do what you want
Cheers
Andrea
On Tue, May 10, 2016 at 5:20 PM, Deen <[email protected]> wrote:
> Hi everyone,
>
> currently I am trying to map the feature type 'Building' of CityGML with
> geoserver application schema and I came across some problems when i tried
> to map the generic attributes of the buildings. One of feature types about
> the generic attributes of the building is "stringAttribute",which is
> defined in http://schemas.opengis.net/citygml/generics/2.0/generics.xsd,
> and what i want is just chaining two feature types "buildng" and
> "stringAttribute"
>
> Here is the a piece of my mapping file "bldg_Building.xml"
>
> <typeMappings>
> <FeatureTypeMapping>
> <sourceDataStore>bldg</sourceDataStore>
> <sourceType>v1_bldg_building</sourceType>
> <targetElement>bldg:Building</targetElement>
> ......
> <AttributeMapping>
>
> <targetAttribute>core:_GenericApplicationPropertyOfCityObject</targetAttribute>
> <sourceExpression>
> <OCQL>id</OCQL>
> <linkElement>gen:stringAttribute</linkElement>
> <linkField>FEATURE_LINK</linkField>
> </sourceExpression>
>
> <targetAttributeNode>gen:StringAttributeType</targetAttributeNode>
> </AttributeMapping>
> ......
> <typeMappings>
>
> Here is the a piece of my mapping file "gen_stringAttribute.xml"
>
> <typeMappings>
> <FeatureTypeMapping>
> <sourceDataStore>bldg</sourceDataStore>
> <sourceType>v1_gen_string_attr</sourceType>
> <targetElement>gen:stringAttribute</targetElement>
> .......
> <AttributeMapping>
> <targetAttribute>FEATURE_LINK</targetAttribute>
> <sourceExpression>
> <OCQL>cityobject_id</OCQL>
> </sourceExpression>
> </AttributeMapping>
> ......
> </typeMappings>
>
>
> Here is What I got from WFS of geoserver :
>
> <gml:featureMember>
> <bldg:Building gml:id="BLDG_0003000b0009a940">
> <core:_GenericApplicationPropertyOfCityObject>
> [FeatureImpl:stringAttribute<StringAttributeType
> id=DENK_ID>=[AttributeImpl:value<string>=09030374]]
> <gen:stringAttribute>
> <gen:value>09030374</gen:value>
> </gen:stringAttribute>
> </core:_GenericApplicationPropertyOfCityObject>
> <core:_GenericApplicationPropertyOfCityObject>
> <gen:stringAttribute>
> <gen:value>09030374</gen:value>
> </gen:stringAttribute>
> </core:_GenericApplicationPropertyOfCityObject>
> .....
>
> My question is if there is any way to link two feature types without
> "container" attribute "core:_GenericApplicationPropertyOfCityObject",
> because the standard GML file is something like
>
> <bldg:Building gml:id="BLDG_0003000b0009a940">
> <gen:stringAttribute>
> <gen:value>09030374</gen:value>
> </gen:stringAttribute>
> <gen:stringAttribute>
> <gen:value>0903387</gen:value>
> </gen:stringAttribute>
> ......
>
> This problem is bugging me for a while and any help I would really
> appreciate
>
> Thanks
> Deen
>
> *gen_stringAttribute.xml* (3K) Download Attachment
> <http://osgeo-org.1560.x6.nabble.com/attachment/5265622/0/gen_stringAttribute.xml>
> *bldg_Building.xml* (6K) Download Attachment
> <http://osgeo-org.1560.x6.nabble.com/attachment/5265622/1/bldg_Building.xml>
>
> ------------------------------
> View this message in context: Problems with CityGML and application schema
> <http://osgeo-org.1560.x6.nabble.com/Problems-with-CityGML-and-application-schema-tp5265622.html>
> Sent from the GeoServer - User mailing list archive
> <http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html> at
> Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data
> untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users