Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHP driver open_options does not seem to work with ENCODING option #356

Open
ttomasz opened this issue Jun 30, 2024 · 2 comments
Open

SHP driver open_options does not seem to work with ENCODING option #356

ttomasz opened this issue Jun 30, 2024 · 2 comments

Comments

@ttomasz
Copy link

ttomasz commented Jun 30, 2024

Example files:

SQL example:

select *
from st_read('/vsizip/./Downloads/020101.zip/PRG_PunktyAdresowe_020101.shp', open_options=['ENCODING=WINDOWS-1250']) 
limit 5;

Result:

┌─────────┬─────────┬─────────┬─────────────┬─────────┬─────────────────────┬─────────┬───────────────────────────────────────────────┐
│  TERYT  │   PNA   │ SIMC_id │ SIMC_nazwa  │ ULIC_id │     ULIC_nazwa      │  Numer  │                     geom                      │
│ varchar │ varchar │ varchar │   varchar   │ varchar │       varchar       │ varchar │                   geometry                    │
├─────────┼─────────┼─────────┼─────────────┼─────────┼─────────────────────┼─────────┼───────────────────────────────────────────────┤
│ 020101  │ 59-700  │ 0935989 │ ????INVAL…  │ 18648   │ ????INVALID VALUE…  │ 34      │ POINT (260060.88199839657 382544.5259835962)  │
│ 020101  │ 59-700  │ 0935989 │ ????INVAL…  │ 09421   │ ????INVALID VALUE…  │ 82      │ POINT (262141.78239842618 381462.537184705)   │
│ 020101  │ 59-700  │ 0935989 │ ????INVAL…  │ 02058   │ ????INVALID VALUE…  │ 13      │ POINT (258755.64489838033 383519.40798285604) │
│ 020101  │ 59-700  │ 0935989 │ ????INVAL…  │ 07026   │ ????INVALID VALUE…  │ 27C     │ POINT (261791.14839842354 382338.35378450714) │
│ 020101  │ 59-700  │ 0935989 │ ????INVAL…  │ 07026   │ ????INVALID VALUE…  │ 27B     │ POINT (261788.7517984234 382329.84118450433)  │
└─────────┴─────────┴─────────┴─────────────┴─────────┴─────────────────────┴─────────┴───────────────────────────────────────────────┘

Using that encoding in open options works with ogrinfo.

@rouault
Copy link

rouault commented Jul 20, 2024

Using that encoding in open options works with ogrinfo.

I suspect the GDAL build of duckdb_spatial isn't built against libiconv

@Maxxen
Copy link
Member

Maxxen commented Jul 22, 2024

Using that encoding in open options works with ogrinfo.

I suspect the GDAL build of duckdb_spatial isn't built against libiconv

Thanks for having a look at this! But yes, it's not built against libiconv. IIRC it was somewhat difficult to build it statically cross platform but we could have another attempt at doing so in the future, ideally after we rework the current build setup, although I don't have a timeline for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants