[gdal-dev] Removing layers from GeoSpatial PDF with ogr2ogr?

Even Rouault even.rouault at spatialys.com
Wed Apr 25 12:02:58 PDT 2018


On mercredi 25 avril 2018 12:06:17 CEST David Strip wrote:
> I'm trying to remove a layer from a geospatial pdf (specifically the
> orthoimage layer in USGS topos). ogrinfo reports 26 layers in the meta-data
> report, but only 12 layers with vector features. When I try to remove the
> image layer with this command
> ogr2ogr -f "PDF" map.pdf NM_Canada_Ojitos_20110201_TM_geo_enabled.pdf
> --config GDAL_PDF_LAYERS_OFF "Images.Orthoimage"
> 
> the output file is missing the layers with the text labels. In addition, the
> styling of at least some of the layers is different. For example, the
> contours in the input have two different line weights, but the output is a
> single line weight. Are these differences a limitation of the driver, or do
> I need to add more parameters/options?

This is expected. When doing ogr2ogr you run into limitations of the read side and write side 
of the PDF driver, and running through OGR abstraction in the middle, so loss is expected in 
the case of PDF.


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180425/16b9b0d0/attachment.html>


More information about the gdal-dev mailing list