[Xastir] Using GeoPDF maps

Kurt ksaves2 at sbcglobal.net
Tue Dec 15 17:35:20 EST 2015


So,
To make sure I got this right.  I see from help that GDAL is in place on Xastir 2.06 on Ubuntu 14.04 but I might have to usethe Synaptic package manager to make sure python-dev is in there (it is) and the poppler packages are in there and accessible.I just got poppler in place.  So, I suspect I need to recompile and build GDAL 2.0.1 like below and then rebuild Xastir?
Help also showed Geotiff was supported but I see I need to go back to Synaptic and see if libgeotiff-devwas previously in there when I built Xastir the first time.
When I built Xastir the first time, I made sure the messages I saw after I did ./configure said basically thatall the options were supported.  If it said a package was missing, whether I knew what it did or not, I downloadedit, built it, installed it and then did a make clean on Xastir and did a ./configure again.  Once I saw everything wassupported, I did the make and make install.
Another thing.  When a new version of Xastir came out in the past, I simply unpacked it, rebuilt it and re-installed.It always came up with the new version when I fired it up the first time.  Never had any trouble upgrading.
Incidentally, I was a Slacker but Ubuntu is rapidly becoming my best "friend" now.  With Slackware, I sometimes couldnever find a package to get an application to work.  Ubuntu with Synaptic I can many times see what I need and if I want to build something, I can.
This is going to be fun.  I like a challenge and your instructions sound good.
Kurt KC9LDH
      From: Lee Bengston <lee.bengston at gmail.com>
 To: Xastir - APRS client software discussion <xastir at lists.xastir.org> 
 Sent: Monday, December 14, 2015 4:31 PM
 Subject: Re: [Xastir] Using GeoPDF maps
   
On Mon, Dec 14, 2015 at 3:20 PM, Lee Bengston <lee.bengston at gmail.com>
wrote:

> For those who want to try converting GeoPDF maps to GeoTif format f/u/w
> Xastir using a high level guide, here goes:
>
> 1) Install the development packages for Python and Poppler.
>    In Debian/Ubuntu that's python-dev for Python.  Poppler has
>    libpoppler-dev and libpoppler-private-dev.  You may only need
>    the second one, but at this time all I know is installing both
>    worked for me.  Package names above for Poppler apply to
>    Ubuntu 15.04 - they may or may not very with Ubuntu version.
>
> 2) Dowload GDAL 2.0.1 and compile it.
>      http://download.osgeo.org/gdal/2.0.1/gdal-2.0.1.tar.gz.
>      Commands are as follows:
>        ./configure --with-poppler --with-python
>        make
>        sudo make install
>        sudo ldconfig
>
> 3) Modify the geopdf2gtiff.pl script that comes with Xastir
>    Comment out (or delete) line #214 that reads as follows:
>
>    $theGdalWarp="gdalwarp -cutline $inputPDF.vrt -crop_to_cutline -t_srs
> EPSG:4326  $inputPDF $outputTif";
>
>    Then add a new line in it's place that reads as follows:
>
>    $theGdalWarp="gdalwarp -cutline $inputPDF.vrt -crop_to_cutline -t_srs
> EPSG:4326  -oo 'LAYERS_OFF=Images,Images.Orthoimage' -oo 'DPI=250.0'
> $inputPDF $outputTif";
>
> 4) Run the script on each geoPDF map file that you have downloaded.
>      I used this syntax (my Ubuntu didn't like the shebang for some
> reason.)
>      perl geopdf2gtiff.pl -f MAPFILENAMEgeo.pdf.
>
> The resulting MAPFILENAMEgeo.tif file is in a format Xastir supports and
> can be used pretty much like any supported offline map.
>
> Note: if you don't modify the script as stated above, conversion will take
> much longer, and you will end up with a larger map that doesn't look as
> good.
>


​Fyi, the text above applies specifically to converting the USGS topo maps
from GeoPDF format to GeoTiff.  ​

​I recomm​end doing the above on a computer running Linux with "reasonable"
processing power.  If the ultimate destination for the maps is, for
example, a Raspberry Pi, it would be better to convert the maps on a more
powerful platform and copy them to the Pi.

In order for Xastir to be able to display GeoTiff maps, it needs to be
built with GeoTiff support.  Clicking "Help/About" in Xastir displays a
list of "Libraries Used".  If 'Geotiff' is not in the list, GeoTiff maps
are not supported.  In Ubuntu and Debian, the 'libgeotiff-dev' package
needs to be installed prior to compiling Xastir, and that will enable
GeoTiff support.  The installation notes for Ubuntu 14.04 (and several
previous versions) include building Xastir with GeoTiff support.  When
running configure, be sure to use the following line if you have installed
the libgeotiff-dev package:

configure CPPFLAGS="-I/usr/include/geotiff"

The installation notes for Ubuntu 14.04 are at
http://xastir.org/index.php/HowTo:Ubuntu_14.04




Lee - K5DAT
_______________________________________________
Xastir mailing list
Xastir at lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


 


More information about the Xastir mailing list