Hi,
Quick answer: you can achieve what you want with GeoServer App-Schema:
 * 
https://docs.geoserver.org/latest/en/user/data/app-schema/mapping-file.html#attributes-with-cardinality-1-n
 * 
https://docs.geoserver.org/latest/en/user/data/app-schema/feature-chaining.html#multi-valued-properties-by-reference-xlink-href
... but I don't think you can do it with HALE integration. I will
double check what is going on ... not sure when I will have time to do
it.
Hope it helps,
Nuno Oliveira
On Tue, 2018-11-13 at 15:24 +0000, Jonas Nygaard Pedersen wrote:
> Hi list,
>  
> I’m trying to do a transformation of two tables from Postgres (see
> below) to a target XML schema (http://inspire.ec.europa.eu/schemas/pl
> u/4.0/PlannedLandUse.xsd).
> Most of my data is in one table (plu_spatialplan) where the columns
> can be directly renamed in an one-to-one relationship.

> 
> But I have a few targets in the XML schema (e.g. SpatialPlan.member.href) 
> which have a 0-to-many relationship. To handle this situation I create a join 
> in hale studio between my main table (plu_spatialplan) and the table
>  plu_zoningelement_member, which has the values that should be mapped to the 
> SpatialPlan.member.href target.
> 
>  
> 
> This all seems to work just fine in Hale Studio. And if I output the 
> transformed data as GML, everything again seems fine.
> 
> But when I export the alignment to Geoserver (as an Application Schema) via 
> the Direct Upload option, I get a new dialogue, which requires me to chain 
> the two tables (they are already joined in Hale Studio context).
> 

> 
> In this dialogue the plu_spatialplan table has the CONTAINER role and the 
> plu_zoningelement_member table has the NESTED role, which seems right, as I 
> want each row in plu_spatialplan data to hold more than one element
>  from plu_zoningelement_member.
> 
>  
> 
> But when choosing the Target Type I do not have the option to choose 
> SpatialPlan.member.href as the Target Type. In fact I can’t choose anything 
> but SpatialPlan.ordinance.OrdinanceValue, which doesn’t seem to have any
>  relation at all to the join I’m performing.
> 
>  
> 
> So I’m stuck and would love to hear from anyone having experience mapping 
> INSPIRE data in Hale Studio, using two or more tables with a join and 
> uploading the alignment to Geoserver/Application-Schema
> 
>  
> 
>  
> 
> CREATE TABLE plu_spatialplan
> 
> (
> 
>   gmlid character varying(4000),
> 
>   inspireid_localid character varying(4000) NOT NULL,
> 
>   inspireid_namespace character(61),
> 
>   extent1 geometry,
> 
>   officialtitle character varying(51),
> 
>   levelofspatialplan character(69),
> 
>   plantypename character(64),
> 
>   beginlifespanversion timestamp(6) with time zone,
> 
>   endlifespanversion character(17),
> 
>   validfrom timestamp(0) without time zone,
> 
>   validto character(17),
> 
>   alternativetitle character varying(37),
> 
>   processstepgeneral character(71),
> 
>   backgroundmap character(17),
> 
>   ordinancedate timestamp(0) without time zone,
> 
>   ordinancereference character(16),
> 
>   CONSTRAINT plu_spatialplan_pkey PRIMARY KEY (inspireid_localid)
> 
> )
> 
>  
> 
> CREATE TABLE plu_zoningelement_member
> 
> (
> 
>   plan_inspireid_localid character(36),
> 
>   member_href character varying(4000),
> 
>   CONSTRAINT plu_zoningelement_member_plan_inspireid_localid_fkey FOREIGN KEY 
> (plan_inspireid_localid)
> 
>       REFERENCES plu_spatialplan (inspireid_localid)
> 

> 
> )
> 
>  
> 
> Regards,
> 
> Jonas
> 
>  
> 
>  
> 
>  
> 




> _______________________________________________
> 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
> 
> 
> 
> 
Geoserver-users@lists.sourceforge.net> 
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


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to