Feature request #8912

Better support for georeferenced pdf

Added by Yannick Portier about 11 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Unknown
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:17588

Description

ability to import / load maps in pdf format such as USGS maps

20.png (551 KB) Giovanni Manghi, 2013-10-19 03:25 AM

History

#1 Updated by Giovanni Manghi about 11 years ago

  • File 20.png added
  • Status changed from Open to Closed

If you have a copy of QGIS compiled against GDAL 1.10 (and you should, if you use Linux, OsX or QGIS 64bit for Win) then you already have support for geopdf.

I can successfully load vectors layers out of

http://www.terragotech.com/images/pdf/rumney_farmforest_geopdf.pdf

and load it as raster too. See attached image.

#2 Updated by Yannick Portier about 11 years ago

Thanks for the info.
It seems I'm out of luck though, because I use QGIS (the latest update from OSGeo4W) on Win32 and cannot load a pdf in either vector or raster format...

#3 Updated by Giovanni Manghi about 11 years ago

Yannick Portier wrote:

Thanks for the info.
It seems I'm out of luck though, because I use QGIS (the latest update from OSGeo4W) on Win32 and cannot load a pdf in either vector or raster format...

win 32 installers should be updated soon (also with gdal 1.10).

#4 Updated by Yannick Portier about 11 years ago

How did you do manage to get it loaded ? I still cannot load this pdf either on win32 or win64 (both have the latest and greatest updates from OSGeo4W) and I have tried both as vector or raster, it says it is "not a supported raster data source" or "not a recognized or valid data source".
Am I missing something ?

#5 Updated by Giovanni Manghi about 11 years ago

you are right, despite the fact that qgis/windows now comes with gdal 1.10 and that this has geopdf support active the geopdf files are not loaded.

You should file a new ticket then, specifying that on Linux is ok.

C:\\>gdalinfo --formats
Supported Formats:
VRT (rw+v): Virtual Raster
GTiff (rw+vs): GeoTIFF
NITF (rw+vs): National Imagery Transmission Format
RPFTOC (rovs): Raster Product Format TOC format
ECRGTOC (rovs): ECRG TOC format
HFA (rw+v): Erdas Imagine Images (.img)
SAR_CEOS (rov): CEOS SAR Image
CEOS (rov): CEOS Image
JAXAPALSAR (rov): JAXA PALSAR Product Reader (Level 1.1/1.5)
GFF (rov): Ground-based SAR Applications Testbed File Format (.gff)
ELAS (rw+v): ELAS
AIG (rov): Arc/Info Binary Grid
AAIGrid (rwv): Arc/Info ASCII Grid
GRASSASCIIGrid (rov): GRASS ASCII Grid
SDTS (rov): SDTS Raster
OGDI (ros): OGDI Bridge
DTED (rwv): DTED Elevation Raster
PNG (rwv): Portable Network Graphics
JPEG (rwv): JPEG JFIF
MEM (rw+): In Memory Raster
JDEM (rov): Japanese DEM (.mem)
GIF (rwv): Graphics Interchange Format (.gif)
BIGGIF (rov): Graphics Interchange Format (.gif)
ESAT (rov): Envisat Image Format
BSB (rov): Maptech BSB Nautical Charts
XPM (rwv): X11 PixMap Format
BMP (rw+v): MS Windows Device Independent Bitmap
DIMAP (rov): SPOT DIMAP
AirSAR (ro): AirSAR Polarimetric Image
RS2 (ros): RadarSat 2 XML Product
PCIDSK (rw+v): PCIDSK Database File
PCRaster (rw): PCRaster Raster File
ILWIS (rw+v): ILWIS Raster Map
SGI (rw+): SGI Image File Format 1.0
SRTMHGT (rwv): SRTMHGT File Format
Leveller (rw+): Leveller heightfield
Terragen (rw+): Terragen heightfield
GMT (rw): GMT NetCDF Grid Format
netCDF (rw+s): Network Common Data Format
HDF4 (ros): Hierarchical Data Format Release 4
HDF4Image (rw+): HDF4 Dataset
ISIS3 (rov): USGS Astrogeology ISIS cube (Version 3)
ISIS2 (rw+v): USGS Astrogeology ISIS cube (Version 2)
PDS (rov): NASA Planetary Data System
TIL (rov): EarthWatch .TIL
ERS (rw+v): ERMapper .ers Labelled
JP2OpenJPEG (rwv): JPEG-2000 driver based on OpenJPEG library
L1B (rov): NOAA Polar Orbiter Level 1b Data Set
FIT (rwv): FIT Image
GRIB (rov): GRIdded Binary (.grb)
RMF (rw+v): Raster Matrix Format
WCS (rovs): OGC Web Coverage Service
WMS (rwvs): OGC Web Map Service
MSGN (ro): EUMETSAT Archive native (.nat)
RST (rw+v): Idrisi Raster A.1
INGR (rw+v): Intergraph Raster
GSAG (rwv): Golden Software ASCII Grid (.grd)
GSBG (rw+v): Golden Software Binary Grid (.grd)
GS7BG (rw+v): Golden Software 7 Binary Grid (.grd)
COSAR (ro): COSAR Annotated Binary Matrix (TerraSAR-X)
TSX (rov): TerraSAR-X Product
COASP (ro): DRDC COASP SAR Processor Raster
R (rwv): R Object Data Store
MAP (rov): OziExplorer .MAP
PNM (rw+v): Portable Pixmap Format (netpbm)
DOQ1 (rov): USGS DOQ (Old Style)
DOQ2 (rov): USGS DOQ (New Style)
ENVI (rw+v): ENVI .hdr Labelled
EHdr (rw+v): ESRI .hdr Labelled
GenBin (rov): Generic Binary (.hdr Labelled)
PAux (rw+): PCI .aux Labelled
MFF (rw+): Vexcel MFF Raster
MFF2 (rw+): Vexcel MFF2 (HKV) Raster
FujiBAS (ro): Fuji BAS Scanner Image
GSC (rov): GSC Geogrid
FAST (rov): EOSAT FAST Format
BT (rw+v): VTP .bt (Binary Terrain) 1.3 Format
LAN (rw+v): Erdas .LAN/.GIS
CPG (ro): Convair PolGASP
IDA (rw+): Image Data and Analysis
NDF (rov): NLAPS Data Format
EIR (rov): Erdas Imagine Raw
DIPEx (rov): DIPEx
LCP (rov): FARSITE v.4 Landscape File (.lcp)
GTX (rw+v): NOAA Vertical Datum .GTX
LOSLAS (rov): NADCON .los/.las Datum Grid Shift
NTv2 (rw+vs): NTv2 Datum Grid Shift
CTable2 (rw+v): CTable2 Datum Grid Shift
ACE2 (rov): ACE2
SNODAS (rov): Snow Data Assimilation System
ARG (rwv): Azavea Raster Grid format
RIK (ro): Swedish Grid RIK (.rik)
USGSDEM (rwv): USGS Optional ASCII DEM (and CDED)
GXF (ro): GeoSoft Grid Exchange Format
HTTP (ro): HTTP Fetching Wrapper
BAG (ro): Bathymetry Attributed Grid
HDF5 (ros): Hierarchical Data Format Release 5
HDF5Image (ro): HDF5 Dataset
NWT_GRD (rov): Northwood Numeric Grid Format .grd/.tab
NWT_GRC (rov): Northwood Classified Grid Format .grc/.tab
ADRG (rw+vs): ARC Digitized Raster Graphics
SRP (rov): Standard Raster Product (ASRP/USRP)
BLX (rw): Magellan topo (.blx)
Rasterlite (rws): Rasterlite
PostGISRaster (rws): PostGIS Raster driver
SAGA (rw+v): SAGA GIS Binary Grid (.sdat)
KMLSUPEROVERLAY (rwv): Kml Super Overlay
XYZ (rwv): ASCII Gridded XYZ
HF2 (rwv): HF2/HFZ heightfield raster
PDF (rws): Geospatial PDF
OZI (rov): OziExplorer Image File
CTG (rov): USGS LULC Composite Theme Grid
E00GRID (rov): Arc/Info Export E00 GRID
ZMap (rwv): ZMap Plus Grid
NGSGEOID (rov): NOAA NGS Geoid Height Grids
MBTiles (rov): MBTiles
IRIS (rov): IRIS data (.PPI, .CAPPi etc)

#6 Updated by Andre Joost over 10 years ago

Georeferenced PDF are still not loading properly. Take http://pub.data.gov.bc.ca/datasets/177864/pdf/092f/092F088.pdf as reference from http://gis.stackexchange.com/questions/93705/how-to-add-georeferenced-pdf-as-layer-to-qgis-2-0

With GDAL 1.11.0, I can translate it to Geotiff (even inside QGIS), and load that into QGIS. But directly loading never ends, on Windows 2.5.0 and Ubuntu 2.4.0. So it is not a Windows issue.

The Rumney Farmforest GeoPDF linked above works for me (after quite some time of waiting) on both systems.

#7 Updated by Andre Joost about 10 years ago

The new USGS Topo geospatial PDF files have some pitfalls, that can be handled with GDAL, but not yet inside QGIS. Please refer also to http://nationalmap.gov/ustopo/documents/ustopo2gtif_current.pdf for further details.

They are a compound of vector and raster data in several layers. These may contain sublayers, and vector layers may have mixed geometries of linestrings and polygons.

You can run ogrinfo on the file to get a list of the non-empty vector layers, and ogr2ogr -f sqlite can store them separated by layer and geometry type. You can use Add Vector Layer in QGIS as well to select the layers you want, but it might fail on the mixed geometries.

gdalinfo -mdd LAYERS will report all (about 28) layers, with slightly different naming of sublayers than ogrinfo. But it does not tell you if the layers are vector, raster or empty. In fact, only Orthoimage and Shaded_Relief are raster layers. GDAL will rasterize vector layers, which may take some time.

If you convert the file with gdal_translate, it will take hours and result in a tif file of nearly 1GB. This is not useful for QGIS. Changing the resolution from the default of 600dpi will decrease file size and time. Furthermore, you may want only single layers, either Map_Collar, Map_Frame, or Images. If you utilize the vector export, you may want only the Shaded_Relief sublayer. Extracting sublayers is possible with GDAL.

So what is necessary for QGIS, is to make sublayers and resolution selectable, and make sure that the vector import can handle mixed geometries.

Note that TerraGo GeoPDF (like the one linked by Giovanni), historical USGS Topo (raster-only) and Canadian Geopdf like the one I linked above behave different, and more QGIS-friendly.

#8 Updated by Giovanni Manghi about 10 years ago

  • Subject changed from support for georeferenced pdf to Better support for georeferenced pdf
  • Status changed from Closed to Open

#9 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

#10 Updated by Jürgen Fischer over 7 years ago

  • Category set to Unknown

Also available in: Atom PDF