[Xastir] GeoPDF

Lee Bengston lee.bengston at gmail.com
Mon Sep 5 14:13:35 EDT 2011


On Mon, Sep 5, 2011 at 1:42 PM, Tom Russo <russo at bogodyn.org> wrote:
> On Mon, Sep 05, 2011 at 09:08:10AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
>>
>> I'm not going to hack Xastir to handle 24-bit, but I've been working on a
>> script to deal with this process (and an extension of it) and hope to release
>> it this afternoon.
>
> Or this morning.  Please do a cvs update and look for the "geopdf2gtiff.pl"
> script in the scripts directory.  It installs to /usr/local/lib/xastir, too.
>
> geopdf2gtiff.pl foobar.pdf
>
> will collar strip, warp, format change to Geotiff and dither to 8-bit color.
> The output will be foobar.tif.
>
> Unfortunately, I've found that some geopdfs contain INCORRECT specifications
> of their own neatlines --- these GeoPDFs say that the neatline is the same
> as the entire image, rather than the boundary of the map data itself.  There's
> nothing to be done about that other than to hand-craft an FGD file with the
> lat/lon of the north, south, east, and west neatlines.  But many GeoPDFs
> have correct specifiers, and the output of geopdf2gtiff.pl will be precisely
> a geotiff that can be used in Xastir with a minimum of fuss.
>
> It seems that the most recent GeoPDFs downloadable from USGS are the ones
> with the bad neatlines --- the "US Topo" product that has contour lines
> and street maps overlaid on aerial photos.  The older topo products in
> GeoPDF form (i.e. those that used to be distributed in GeoTIFF format)
> all seem to have good neatlines in the small sample I've checked.

Great - thanks for the new creation!  I've got to check and see if my
gdal was built with python support, and it figures the maps I
downloaded are mostly the ones that most likely don't have the correct
neatline specifiers.  I'll have to give things a try later - too tied
up in other stuff now.

Lee



More information about the Xastir mailing list