Dear GDAL dev team,

I am not sure if I am following a wrong approach, if there is an issue with the 
osm driver, the distributed OSM file or if the error message is just ambiguous 
and could be improved.

I used ogr2ogr to select 12 keys to be extracted as polygons along with 
something around 40 conditions. The algorithm had worked well on a tiny OSM 
file with the city of Munich so tested it I on a small sample area of 1°x1° on 
the global planet OSM file:

ogr2ogr -spat 10 45 11 46 -f gpkg c:\daten\osm_planet\1x1.gpkg 
c:\daten\osm_planet\planet-220502.osm.pbf multipolygons -select 
"name,aeroway,amenity,building,historic,landuse,leisure,military,office,tourism,shop,landuse
 " -where @ogr2ogr_condition.txt

The first 70% were reached after one hour but then the process slowed down and 
after 19 hours I got an error message:
0...10...20...30...40...50...60...70...80...90.ERROR 1: Too many different keys 
in file

If this is because one or more features exceed the maximum amount of doable 
keys, is the officially by OSM distributed file wrong or too large to be 
processed by ogr2ogr or what's the matter? I tried to read the relevant source 
code file where the error message occurs but it's too cryptic to me.


Content of ogr2ogr_condition.txt for the sake of completeness:
historic is null and
(
                office is not null or
                building='hotel' or
                building='hospital' or
                building='apartments' or
                building='barracks' or
                building='dormitory' or
                building='warehouse' or
                building='monastery' or
                building='public' or
                building='hangar' or

                tourism='guest_house' or
                tourism='apartment' or
                tourism='hostel' or
                tourism='museum' or
                tourism='gallery' or
                tourism='motel' or
                tourism='hotel' or

                amenity='university' or
                amenity='research_institute' or
                amenity='social_facility' or
                amenity='school' or
                amenity='kindergarten' or
                amenity='kindergarden' or
                amenity='exhibition centre' or
                amenity='student_accommodation' or
                amenity='library' or
                amenity='clinic' or
                amenity='hospital' or
                amenity='public_building' or
                amenity='concert_hall' or
                amenity='prison' or
                amenity='theatre' or
                amenity='courthouse' or

                aeroway='terminal' or

                shop='mall' or
                military='base' or
                military='barracks' or
                military='office' or

                landuse='education' or
                landuse='commercial' or
                landuse='industrial'
)

I'd be grateful for any hints and glad to contribute to any error message 
improval if indicated.

Kind regards, Tobias Schmetzer

ZAE Bayern
Tobias Schmetzer, Dipl. Ing.
Wissenschaftlicher Mitarbeiter Systementwicklung | Scientific Staff Member 
Systems Engineering
Bereich Energiespeicherung| Division Energy Storage

Walther-Meißner-Str. 6
85748 Garching

Tel.: +49 89 329442-65
Fax: +49 89 329442-12
tobias.schmet...@zae-bayern.de<mailto:tobias.schmet...@zae-bayern.de>
http://www.zae-bayern.de<http://www.zae-bayern.de/>


ZAE Bayern - Bayerisches Zentrum für Angewandte Energieforschung e. V.
Vorstand/Board:
Prof. Dr. Hartmut Spliethoff (Vorsitzender/Chairman),
Prof. Dr. Vladimir Dyakonov
Sitz/Registered Office: Würzburg
Registergericht/Register Court: Amtsgericht Würzburg
Registernummer/Register Number: VR 1386

Sämtliche Willenserklärungen, z. B. Angebote, Aufträge, Anträge und Verträge, 
sind für das ZAE Bayern nur in schriftlicher und ordnungsgemäß unterschriebener 
Form rechtsverbindlich. Diese E-Mail ist ausschließlich zur Nutzung durch 
den/die vorgenannten Empfänger bestimmt. Jegliche unbefugte Offenbarung, 
Nutzung oder Verbreitung, sei es insgesamt oder teilweise, ist untersagt. 
Sollten Sie diese E-Mail irrtümlich erhalten haben, benachrichtigen Sie bitte 
unverzüglich den Absender und löschen Sie diese E-Mail.

Any declarations of intent, such as quotations, orders, applications and 
contracts, are legally binding for ZAE Bayern only if expressed in a written 
and duly signed form. This e-mail is intended solely for use by the 
recipient(s) named above. Any unauthorised disclosure, use or dissemination, 
whether in whole or in part, is prohibited. If you have received this e-mail in 
error, please notify the sender immediately and delete this e-mail.

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to