I have GDAL/OGR 1.10 installed on a 64bit Windows 7 machine. I have some Geospatial PDFs that I want to crop to the outline of the map and convert to Rasters. However I cannot clip to the neatline. They have been created using Esri Production Mapping, so the neatline is offset from the actual edge of the map, and clipping by the neatline includes the Axis labels and a lot of whitespace.
I can interrogate the Layers of the PDF by using gdalinfo -mdd LAYERS and I know which layer represents the actual neatline/the edge of the map.
What I need to know is how to use GDAL or OGR to convert this layer to a shapefile.
Best Answer
Clipping to the neatline and selecting layers are two separate operations.
To crop to the neatline it is easiest to write it to a file as csv, something like:
Then you can tell gdalwarp to crop to the neatline
To include a specific layer you can use GDAL_PDF_LAYERS config option
or combine the two together and convert to tiff
The third part of your question, converting to a shapefile, is not possible with GDAL as far as I know, as gdalwarp deals exclusively with rasters, and shapefiles are used for vector data.