Hi all,
got confirmation from the spec lead that the GeoPackage is indeed invalid,
quoting my question about mixing POLYGON and MULTIPOLYGON in the same table:

Andrea,
Your instincts are correct here. We're using the simple features rules for
geometries and those do not provide a way to classify geometries with a
single dimension and unknown multiplicity. In the case you are describing,
GEOMETRY should be used. Not doing so violates Requirement 31
<http://www.geopackage.org/spec121/#r31>. Perhaps we can update the text to
be more explicit about this.


Cheers
Andrea


On Wed, May 13, 2020 at 7:25 PM Jody Garnett <jody.garn...@geocat.net>
wrote:

> Noted, full table scans on those would not be fun!
>
> So a warning (or exception?) and a parameter: "force_multi" accepting a
> list of tables to multi, or "*" for all of them may be a good combo.
>
> aside: I wish we had an extra "tab" for the datastores to perform
> maintenance activities and checks (and in this case fix the geopackage
> definition).
> --
> Jody Garnett
> GeoCat - Government Geographic Data Publishing
>
>
> On Wed, May 13, 2020 at 10:16 AM Andrea Aime <andrea.a...@geo-solutions.it>
> wrote:
>
>> On Wed, May 13, 2020 at 6:57 PM Jody Garnett <jody.garn...@gmail.com>
>> wrote:
>>
>>> Andrea I am personally in favour of throwing an exception if the data is
>>> inconsistent, but I respect that some data is not going to be fixed...
>>>
>>> Would a connection parameter work? Or were you thinking a system
>>> property flag ...
>>>
>>
>> Connection parameter, off by default.
>>
>>
>>> Something like "check_geometry_type": do a pass through the geometry to
>>> detect this problem and override to MultiPolygon when creating the
>>> FeatureType.
>>>
>>
>> Ouch no, this implementation would take forever to run... I'm just
>> playing with a couple of Ordnance Survey geopackages, the small one is 10GB,
>> the large one over 200GB. There are hundreds of millions of features
>> inside, you don't want to actually visit them all to find out that you did
>> not really
>> need to expand the type ;-)
>> Just to give you a reference, here is a summary table for OS mastermap
>> topography, full country, single GeoPackage... the largest table has over
>> 338 million rows...:
>>
>>  table_schema |     table_name     | row_estimate |  total  |  index  |   
>> toast    |  table  
>> --------------+--------------------+--------------+---------+---------+------------+---------
>>  translator2  | topographicline    |  338,790,112 | 183 GB  | 42 GB   | 227 
>> MB     | 140 GB translator2  | topographicarea    |  121,382,384 | 101 GB  | 
>> 14 GB   | 2138 MB    | 85 GB translator2  | cartographictext   |   
>> 21,865,014 | 10 GB   | 2695 MB | 8192 bytes | 8022 MB translator2  | 
>> topographicpoint   |    4,270,670 | 2015 MB | 453 MB  | 8192 bytes | 1562 MB 
>> translator2  | cartographicsymbol |    3,705,680 | 1755 MB | 403 MB  | 8192 
>> bytes | 1353 MB translator2  | boundaryline       |      516,863 | 563 MB  | 
>> 55 MB   | 24 MB      | 484 MB
>>
>>
>>
>>> I considered a flag to force "multi" but that would end up applying to
>>> all tables even when it is not needed.
>>>
>>
>> This seems a lot more sane to me... an alternative could be to have the
>> user list which tables to "fix", getting a comma
>> separated list. A bit more annoying to setup though, could use a
>> dedicated UI.
>>
>> Cheers
>> Andrea
>>
>> == 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
>> ------------------------------------------------------- *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.*
>>
>

-- 

Regards, Andrea Aime

== 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
------------------------------------------------------- *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.*
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to