Skip to content

Commit

Permalink
PDF: avoid 'Non closed ring detected' warning when reading neatlines …
Browse files Browse the repository at this point in the history
…from OGC Best Practice encoding
  • Loading branch information
rouault committed Sep 20, 2024
1 parent 927be3f commit d5ed936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autotest/gdrivers/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,14 @@ def test_pdf_ogcbp(poppler_or_pdfium_or_podofo):
tst = gdaltest.GDALTest(
"PDF", "byte.tif", 1, None, options=["GEO_ENCODING=OGC_BP"]
)
gdal.ErrorReset()
tst.testCreateCopy(
check_minmax=0,
check_gt=1,
check_srs=True,
check_checksum_not_null=pdf_checksum_available(),
)
assert gdal.GetLastErrorMsg() == ""


###############################################################################
Expand Down
1 change: 1 addition & 0 deletions frmts/pdf/pdfdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5951,6 +5951,7 @@ int PDFDataset::ParseLGIDictDictFirstPass(GDALPDFDictionary *poLGIDict,
poRing->addPoint(dfX, dfY);
}
}
poRing->closeRings();
m_poNeatLine->addRingDirectly(poRing);
}

Expand Down

0 comments on commit d5ed936

Please sign in to comment.