[Xastir] Using GeoPDF maps experience

Kurt ksaves2 at sbcglobal.net
Mon Dec 21 20:20:01 EST 2015


Floyd,
  Lee posted this just a few posts back last week:

> 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

 

      From: Floyd Rodgers <kc5qbc at swbell.net>
 To: Xastir - APRS client software discussion <xastir at lists.xastir.org> 
 Sent: Monday, December 21, 2015 5:04 PM
 Subject: Re: [Xastir] Using GeoPDF maps experience
   
Could you post the details of what you are doing and exactly how. I 
would like to pull down and convert a state or two.

On 12/20/2015 3:31 PM, ZPO wrote:
> Answered my own question..
>
> All the files are zipped. Once unzipped they will have names of the form
> "OR_Arlington_20140731_TM_geo.pdf".
>
> Now to let it work through a download of a few states.
>
> 73-KY9K/Brian
>
> On Sun, Dec 20, 2015 at 12:48 PM, ZPO <geekdownrange at gmail.com> wrote:
>
>> I've figured out how to pull down a list of all the maps in a given state
>> as a CSV file. I've trimmed the CSV file down to just the download link and
>> have wget using it as an input file to download all the 7.5 minute maps for
>> my state.
>>
>> The only issue is that the filenames are "download?item_id=5992569"
>> (example) based on actual download link rather than the more friendly name
>> of the map. While I could redo things a bit to run an individual wget for
>> each file using the friendlier map name as the output filename, has anyone
>> else gone down this road before and found a clean and elegant way to work
>> around this?
>>
>> 73-KY9K/Brian
>>
>>
>> On Sun, Dec 20, 2015 at 8:03 AM, Jason KG4WSV <kg4wsv at gmail.com> wrote:
>>
>>>
>>>> On Dec 19, 2015, at 2:52 PM, Kurt <ksaves2 at sbcglobal.net> wrote:
>>>>
>>>> labels gets "too busy" and hard to read when zoomed down in a town for
>>> instance, just drop out the mapset you don't want to use at the moment.
>>>
>>>
>>>
>>> Xastir has a couple of tools to help with this.
>>>
>>> First are the display levels, so you don't display busy/detailed maps at
>>> higher levels. That's pretty easy, although you may need to play around a
>>> bit to get it just the way you like it.
>>>
>>> The other thing is editing the dbfawk if you're using a shapefile. You
>>> can cause labels to not display even though features are still there, and
>>> depending on the data available in the shapefile cause smaller features to
>>> drop out at higher zoom levels.  This requires a bit more work, but if you
>>> have a dbfawk to start with its certainly doable.
>>>
>>> -Jason
>>>
>>>
>>> _______________________________________________
>>> Xastir mailing list
>>> Xastir at lists.xastir.org
>>> http://xastir.org/mailman/listinfo/xastir
>>>
>>
>>
>> --
>> ----------
>> Society is, always has been, and always will be a structure for the
>> exploitation and oppression of the majority through systems of political
>> force dictated by an elite, enforced by thugs, uniformed or not, and upheld
>> by a willful ignorance and stupidity on the part of the very majority whom
>> the system oppresses.
>> - Richard K. Morgan
>> ----------
>>
>
>

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


  


More information about the Xastir mailing list