Hi Ben,

I think I'm missing something or just a lack of knowledge...

I went through great INSPIRE specs and examples and generally, this is how
the country code is coded.
So we have a link to list and eventually URI to codename in the list.
I want to know where is the mistake - is this something wrong with
GeoServer or maybe latest HALE Studio which was creating this app schema.

The "funny" thing is that the same ap schemas work fine in GeoServer 2.12.0
- I think those should not as well. But I can download GML3 files with all
details.
And the same error is not presented. So I totally do not know what is going
on there and why this country code is an issue or I'm getting Null pointer
error.

Could you please let me know what I should check and what maybe should be
modified?

I'm really stuck...

Looking forward to any direction to go... I think it could be my lack of
knowledge... I'm still learning...

Thanks in advance...

Michal


2018-03-14 23:03 GMT+01:00 M.A. Borkowski <m...@borkowski.nl>:

> Thanks, Ben,
>
> I have to digest this. And review the schema.
>
> I think the codeListValue should include just NL and nothing more. If I
> understand correctly...
>
>
> Thanks again - have to dig deeper and review those transformations. It
> could be I have some mistakes which block some operations.
>
> Michal
>
>
> 2018-03-14 22:00 GMT+01:00 Ben Caradoc-Davies <b...@transient.nz>:
>
>> On 15/03/18 04:57, M.A. Borkowski wrote:
>>
>>> java.lang.RuntimeException: java.lang.RuntimeException: Error applying
>>> mapping w                                   ith targetAttribute
>>> mu:country/gmd:Country
>>>
>> [...]
>>
>>> Caused by: java.lang.ClassCastException:
>>> org.geotools.feature.type.AttributeType
>>>                                   Impl cannot be cast to
>>> org.opengis.feature.type.ComplexType
>>>
>> [...]> Transformed data in HALE looks like this:
>> [...]
>>
>>>        <mu:country>
>>>          <gmd:Country codeList="https://www.iso.org/obp/ui/#search/code/
>>> "
>>> codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
>>> ">NL</gmd:Country>
>>>        </mu:country>
>>>
>>
>> gmd:Country is a gco:CodeListValue_Type, which is a complex type with
>> simple content (like gml:CodeType, of which gml:name is an instance).
>> Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to
>> violate the GML object/property encoding rule (section 7.1 of OGC 07-036,
>> the GML 3.2.1 standard). I do not think you can have a property type
>> enclosing a type with a simple content model. If gmd:Country had a complex
>> information model, it would not be permitted to have bare simple content
>> like "NL" above. If mu:country was defined by ref gmd:Country (not
>> gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type
>> like this with a targetAttribute of mu:country and two ClientProperty
>> elements:
>>
>> <mu:country
>> codeList="https://www.iso.org/obp/ui/#search/code/";
>> codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL>
>> NL</mu:country>
>>
>> But it is not.
>>
>> I think gmd:CountryPropertyType is broken because it violates the GML
>> 3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the
>> MU schema.
>>
>> Here are the schemas involved:
>> http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
>> http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
>> http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd
>>
>> Kind regards,
>>
>>
>> --
>> Ben Caradoc-Davies <b...@transient.nz>
>> Director
>> Transient Software Limited <https://transient.nz/>
>> New Zealand
>>
>
>
>
> --
> With best regards
>
> Michal Borkowski
>
> -----------------------------------
>
>


-- 
With best regards

Michal Borkowski

-----------------------------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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