Wednesday, January 11, 2017

Imagery from US Topo Maps

With a couple command lines, you can convert US Topo Map pdfs into layers that can be used in GIS or to form a basemap that can be used offline.

US Topo 2 Tif  - This PDF is a good resource to have in an offline GIS.

Download the areas of interest from the US GeoPDF Topo Maps.  These are good to have on hand for printing or for loading to mobile apps like Avenza PDF.

The following examples will assume the pdf is called "MN_Grand_Marais_20160511_TM_geo.pdf"

Run the GDAL command:

gdalinfo MN_Grand_Marais_20160511_TM_geo.pdf –mdd LAYERS

This will allow you to see all the layer names.

Then run the GDAL command:


gdal_translate MN_Grand_Marais_20160511_TM_geo.pdf marais_contours.tif \
--config GDAL_PDF_LAYERS "Map_Frame.Terrain.Contours" --config GDAL_PDF_BANDS 3 \
--config GDAL_PDF_DPI 400

You will now have a TIF file that can can be loaded into the open source GIS

There are additional command line options to do compression and other stuff to the outputs.  Check the pdf for more info.

Tuesday, January 3, 2017

Stack Preview



Here is a preview of the ODroid C2 stack.  Currently the brass standoffs are mounted to a piece of acryllic I got from Menards.  Still need to come up with a with a good case design.  You can imagine how easy this would fit into a Pelican case to provide a temporary mobile GIS server,















Ideas for cases?  Let me know in the comments.

Sunday, January 1, 2017

GeoNode and /tmp

I noticed that when you use the web browser to load layers into GeoNode, the data gets stored and uncompressed in /tmp.   This is a problem, since the ODroid C2 has 16GB eMMC.   Fortunately, the C2 can run both eMMC and SD Card storage simultaneous.

I added a 32 GB SD Card to the ODroid C2 that was hosting GeoNode.  Here are the steps to do this:

su root

Use fdisk to list the devices:

fdisk -l

Create new partition with the device id that belongs to the SD Card:

fdisk /dev/mmcblk1

Create new primary partition, use default settings

Format the new partition:

mkfs.ext4 /dev/mmcblk1p1

Automount the new partition by editing  /etc/fstab

Add line:

/dev/mmcblk1p1 /tmp ext4 defaults 0 0

Allow read/write access

chmod 777 /tmp

Reboot and you should see GeoNode start using the new /tmp directory.  You can check by running this command:


df -h

This will also need to be done to accommodate the geonode data directories.  This will be done in a further blog post.