0

I have PDF created by the local geodetic authority which is kind of geospatial and contains layers of cadastre underground services (water, sewer, etc) as lines, points, and textual attributes describing elevations.

enter image description here

Here are the OGRINFO details:

INFO: Open of `report.pdf'
      using driver `PDF' successful.
Metadata:
  CREATION_DATE=D:20180607081101Z
  CREATOR=Esri ArcSOC 10.2.0.3370
  NEATLINE=POLYGON ((573296.811062859 4797735.35436032,573297.174743531 4797926.39625182,573472.311327169 4797926.0737274,573472.76331659 4797735.04056676,573296.811062859 4797735.35436032))
...
Layer SRS WKT:
PROJCS["ETRS_1989_UTM_Zone_34N",
    GEOGCS["GCS_ETRS_1989",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",500000.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",21.0],
    PARAMETER["Scale_Factor",0.9996],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]]
...

I am using OSGeo4W Shell GDAL 2.2.3, released 2017/11/20 and ogr2ogr command to convert PDF into SQLite:

ogr2ogr -a_srs EPSG:25834 -f sqlite sqlite\out.sqlite report.pdf

And the result in QGIS is OK except that textual elements are not transferred at all.

enter image description here

I even tried to use explicitly sql query with a hope that OGR - Feature Style Specification could extract those missing text as LABEL (this works with AutoCAD DXF files and textual objects in it):

-sql "select geometry, ogr_style from Layers_Points_WN_Anno"

but with no success. ogr_style is only filled with PEN definitions (even if this layer is full with text annotations).

enter image description here

Question is:

Is it possible to transform somehow those text labels in PDF into some objects with OGR2OGR tool so they will show up in converted format ?

  • Any chance of access to the file? Does the Layers_Points_WN_Anno have any more attributes? Does -sql "select * .... or maybe -sql "select geometry, * ... help? – Spacedman Jun 11 '18 at 9:57
  • yeah, I only dont know what are possible ways to share it here and not violate some rules? – sys49152 Jun 11 '18 at 9:59
  • 1
    Sharing files via Dropbox, Box, or any other cloud file sharing doesn't violate any StackOverflow rules - but that assumes you are allowed to share it publically according to who supplied you the data.... – Spacedman Jun 11 '18 at 10:01
  • 1
    Hmmmm no joy. Suspiciously if I load the PDF into Inkscape the numbers don't appear either, and I can't see them attached as attributes to the lines or points. Stuck. – Spacedman Jun 11 '18 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.