Hi, The structured produced by App-Schema is dictated by the target GML schema, the pattern you see: > <lge:descriptions> > <lge:serviceDescription is defined by your target GML schema, which is probably based on this GML specification rule, check section 9.9 Feature collections of [1]. Regarding: > I understand that it is a valid xsd file, but it is possible to include > some > better description of elements? Describe feature type for complex features will reference whatever XSD schema you declared on the App-Schema mappings file. That say, those declared schema should use a valid URL, for example: > http://www.w3.org/2001/XMLSchema" > xmlns:lge="http://test/lge" > xmlns:ptv="http://palvelutietovaranto.suomi.fi/ptv" > elementFormDefault="qualified" targetNamespace="http://test/lge"> > > schemaLocation="file:/D:/geoServer/2.15.2/data_dir/workspaces/lge/xsd/s > chema.xsd"/> > ... unless the invoker has the schema in file:/D:/geoServer/2.15.2/data _dir/workspaces/lge/xsd/schema.xsd that's not a valid XSD schema :) Regarding:
> GetFeature has problem with geometry type, the element is empty: You probably need to define the default geometry explicitly [2], check the defaultGeometry option. Hope it helps, Nuno Oliveira [1] http://portal.opengeospatial.org/files/?artifact_id=20509 [2] https://docs.geoserver.org/stable/en/user/data/app-schema/mapping-f ile.html#typemappings-and-featuretypemapping On Sun, 2019-10-06 at 13:12 -0700, lge.geo wrote: > Hi, I'm trying to create a "app-schema" layer, but have some unclear issues. > > As a data source I'm using Postgre, where I have defined three tables: > "Service" ("Id" uuid, "Code" text); > "ServiceAddress" ("Id" uuid, "ServiceId" uuid, "streetAddress" text, > "Location" geometry(POINT, 4326)); > "ServiceDescription" ("Id" uuid, "ServiceId" uuid, "languageCode" text, > "Description" text); > > I have a data source "serviceDescription", mapping is defined: > > > datastore > ServiceDescription > lge:serviceDescription > true > > > lge:serviceDescription > Id > > > lge:description > > Description > > > languageCode > LanguageCode > > true > > > FEATURE_LINK > > ServiceId > > > > > > Then i have data source "service", where is defined chaining to > "serviceDescription": > > > datastore > viewService > lge:service > true > > > lge:service > ServiceId > > > lge:code > > Code > > true > > > lge:address > > StreetAddress > > true > > > > lge:descriptions/lge:description > > ServiceId > lge:serviceDescription > FEATURE_LINK > > true > > > lge:location4326 > > Location4326 > > true > > > > > Test call of GetFeature works fine, result is like: > > > service2 > s2 - street address > > > gml:id="479d6a3d-1e9f-4eaf-bb44-ea08bb770998"> > service 2 - description > in cz > > > > gml:id="dd914bb0-007e-4fea-a337-ff23d078d793"> > service 2 - description > in de > > > > gml:id="e6294093-b140-4d42-a800-6eda02b7db8a"> > service 2 - description > in en > > > > > srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"> > "> > 50.0413 14.4275 > > > > ... > > BUT .. Is it possible to simplify the result somehow, eg. to reduce element > , so nesting of description would be "easier": > > > > service 2 - description in > cz > > > > service 2 - description in > de > > ... > > Or even better (since glm:ids are not important for me, but i do understand > that it will not work without a linking field): > > > service 2 - description in > cz > service 2 - description in > de > ... > > Another question is related to DescribeFeatureType. The request returns > just: > > http://www.w3.org/2001/XMLSchema" > " > xmlns:lge="http://test/lge" > " > xmlns:ptv="http://palvelutietovaranto.suomi.fi/ptv" > " > elementFormDefault="qualified" targetNamespace="http://test/lge"> > "> > > schemaLocation="file:/D:/geoServer/2.15.2/data_dir/workspaces/lge/xsd/schema.xsd"/> > > > I understand that it is a valid xsd file, but it is possible to include some > better description of elements? > > I found some Schema customization approach, but I do not know if it is > possible to use it for app-schema. > When I add the schema.xsd file to layer folder, the DescribeFeatureType > returns better "explanation" of type, but there is used some substitution, > and gml mapping does not work correctly: > > DescribeFeatureType header: > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > " > xmlns:Q1="http://www.opengis.net/gml" <--------------- WHY Q1, not gml > " <--------------- WHY Q1, not gml > ?? > xmlns:lge="http://test/lge" > " > elementFormDefault="qualified" > targetNamespace="http://test/lge"> > "> > > GetFeature has problem with geometry type, the element is empty: > > > <--------------------- Q1 instead of gml namespace ?? > service2 > s2 - street address > .... > <--------------------------- this element is empty > > > > Since I have no real experiences with GeoServer and app-schema I really > appreciate each advice, how to work with it. > > I'm trying to upload all needed files, so i hope it will work. > lge.zip <http://osgeo-org.1560.x6.nabble.com/file/t385531/lge.zip> > > > > Thanks a lot, > Lange > > > > -- > Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html > > > > _______________________________________________ > 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> -- 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
