[gdal-dev] gml: array data type size

Even Rouault even.rouault at spatialys.com
Thu Dec 17 04:57:10 PST 2015


Le jeudi 17 décembre 2015 13:27:12, Martin Landa a écrit :
> Hi,
> 
> currently I am trying to solve problem with inconsistent number of
> items in IntergerList data type. Let's say that we have:
> 
> <soi:DetailniTEA>
>    <soi:DetailniTEA>
>       <soi:Kod>52129</soi:Kod>
>       <soi:PlatiOd>2015-03-24T00:00:00</soi:PlatiOd>
>       <soi:GlobalniIdNavrhuZmeny>480333</soi:GlobalniIdNavrhuZmeny>
>       <soi:PocetBytu>16</soi:PocetBytu>
>       <soi:PocetPodlazi>7</soi:PocetPodlazi>
>      
> <soi:AdresniMistoKod><base:Kod>159140</base:Kod></soi:AdresniMistoKod>
> </soi:DetailniTEA>
>    <soi:DetailniTEA>
>       <soi:Kod>52142</soi:Kod>
>       <soi:PlatiOd>2015-03-24T00:00:00</soi:PlatiOd>
>       <soi:GlobalniIdNavrhuZmeny>480333</soi:GlobalniIdNavrhuZmeny>
>       <soi:DruhKonstrukceKod>4</soi:DruhKonstrukceKod>
>       <soi:PocetBytu>16</soi:PocetBytu>
>       <soi:PocetPodlazi>7</soi:PocetPodlazi>
>       <soi:PripojeniKanalizaceKod>1</soi:PripojeniKanalizaceKod>
>       <soi:PripojeniPlynKod>1</soi:PripojeniPlynKod>
>       <soi:PripojeniVodovodKod>1</soi:PripojeniVodovodKod>
>       <soi:ZpusobVytapeniKod>2</soi:ZpusobVytapeniKod>
>      
> <soi:AdresniMistoKod><base:Kod>159131</base:Kod></soi:AdresniMistoKod>
> </soi:DetailniTEA>
>  </soi:DetailniTEA>
> 
> Some attributes are optional, eg. DruhKonstrukceKod,
> PripojeniKanalizaceKod and others. GDAL currently reports attributes
> with inconsistent number of items:
> 
>  DetailniTEAKod (IntegerList) = (2:52129,52142)
>   DetailniTEAPlatiOd (StringList) =
> (2:2015-03-24T00:00:00,2015-03-24T00:00:00)
> DetailniTEAGlobalniIdNavrhuZmeny (Integer64List) = (2:480333,480333)
> DetailniTEADruhKonstrukceKod (IntegerList) = (1:4)
>   DetailniTEAPocetBytu (IntegerList) = (2:16,16)
>   DetailniTEAPocetPodlazi (IntegerList) = (2:7,7)
>   DetailniTEAPripojeniKanalizaceKod (IntegerList) = (1:1)
>   DetailniTEAPripojeniPlynKod (IntegerList) = (1:1)
>   DetailniTEAPripojeniVodovodKod (IntegerList) = (1:1)
>   DetailniTEAZpusobVytapeniKod (IntegerList) = (1:2)
>   DetailniTEAAdresniMistoKod (IntegerList) = (2:159140,159131)
> 
> Is there any way how to change GML driver behaviour to report
> consistent number of items in array, in this case '2', eg:
> 
>   DetailniTEADruhKonstrukceKod (IntegerList) = (1:NULL,4)

Martin,

... no. This is one of the limits when trying to "flattening" complex features 
as simple features. It would mean the driver would have to understand that 
there's some "consistency" (not sure what word to use to describe this complex 
behaviour...) among DetailniTEA elements.

But you could potentially also have schemas allowing even more weird stuff :

<foo>
	<bar>
		<baz>1</baz>
		<baz>2</baz>
		<bla>bla1</bla>
	</bar>
	<bar>
		<baz>3</baz>
		<bla>bla2</bla>
	</bar>
</foo>

Difficult to see an obvious/natural way of representing that with a list.

The proper solution would be to have the GML driver consider each 
<soi:DetailniTEA> as a separate layer/table and add cross feature links 
between "top" features and "sub" features.


Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list