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

GeoPDF handling texts with doughnots wrong. #1932

Closed
olhansen opened this issue Oct 15, 2019 · 10 comments
Closed

GeoPDF handling texts with doughnots wrong. #1932

olhansen opened this issue Oct 15, 2019 · 10 comments

Comments

@olhansen
Copy link

olhansen commented Oct 15, 2019

I have a problem with the GeoPdf reading.
I am working in C#, and installed GDAL 2.4.2 as a nuget package.

I try to import a georeferenced PDF into PostGIS.

The problem is related to texts (see picture)
Unavngivet

It looks like doughnuts are handle wrong. The text we look is really 136933
'6' and '9' has interior parts when drawn as polygons.

Please help. Any hint or assistance will be greatly appreciated.

I connect to PDF like this:

var dsInput = Ogr.Open(txtPdf.Text, 0);

@rouault rouault added the awaiting_feedback Awaiting feedback from reporter label Oct 15, 2019
@rouault
Copy link
Member

rouault commented Oct 15, 2019

I'm a bit confused. How did you generate this PNG file ? With gdal_translate ?
Please attach a PDF file that reproduces the issue

@olhansen
Copy link
Author

Sorry, I tried using ogr2ogr and make a sqlite database,

ogr2ogr -f sqlite out.sqlite 20150203_Afvanding_revP.pdf

20150203_Afvanding_revP.pdf
I attach the pdf

@rouault
Copy link
Member

rouault commented Oct 15, 2019

ok, I reproduce the problem (levels_nsf___tekst layer). It is more general that the single instance pointed in the above description. It is likely related to the parsing of drawing instructions of polygons with holes such as a stroked 6 or 9

@rouault rouault removed the awaiting_feedback Awaiting feedback from reporter label Oct 15, 2019
@olhansen
Copy link
Author

olhansen commented Oct 15, 2019 via email

@rouault
Copy link
Member

rouault commented Oct 15, 2019

Can anything be done to it?

Perhaps. Would require deeper investigation in GDAL source code.

@olhansen
Copy link
Author

olhansen commented Oct 15, 2019 via email

@rouault
Copy link
Member

rouault commented Oct 15, 2019

Can it be related this:

No, this is purely in GDAL code. Switching PDF backend will have no effect for this

@olhansen
Copy link
Author

olhansen commented Oct 15, 2019 via email

@rouault
Copy link
Member

rouault commented Oct 15, 2019

@olhansen
Copy link
Author

olhansen commented Oct 15, 2019 via email

rouault added a commit that referenced this issue Oct 16, 2019
PDF: fix reading polygon with holes and Bezier curves (fixes #1932)
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

2 participants