Wednesday, February 8, 2017

GIS Data Sources

Finding sources of GIS data can be frustrating for several reasons:

  • Many formats and coordinate systems
  • Lack of metadata
  • Data has not been updated
  • Restrictions that prevent sharing

Here are some useful links and the types of layers that can be found.

State of Michigan
http://gis.michigan.opendata.arcgis.com/
  • All Roads
  • Boundaries
  • Rivers and Lakes
  • Imagery
  • Elevation Data
  • Hospitals
  • FEMA Regions
  • Communication Towers
  • Topo Maps
https://earthexplorer.usgs.gov/

  • Imagery
  • Historical Imagery
  • Elevation
http://www.census.gov/data/data-tools.html

  • Population

City or County
Check with the County or City websites for GIS data. 
  • Parcel data
  • Basemap
Global Administrative Areas
http://gadm.org/
  • Basemap:   Lots of data.  May be better off using Natural Earth Data sets instead
Natural Earth Data
  • Basemaps
US National Grid (USNG)
http://usngcenter.org/fema-region-5/

What other types of data should be included in an offline GIS?  Let me know in the comments section.


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.

Saturday, December 24, 2016

APRS and Laptop Power Cord Interference

One of the great things about the Kenwood TH-D74A is how easy APRS is to use. However I was puzzled for a few days because I could not make it work with my rtl-sdr receiver within my apartment.  It turns out my Lenovo W520 Laptop power cord was causing just enough interference to make the TH-D74 think it was receiving a message all the time preventing the HT from transmitting.

At the time, I was developing a python script to extract location data from APRS packets.  I had my cheap RTL2832 tv tuner plugged into an Odroid C2 on a different monitor and was watching the waterfall with GQRX.  After turning off all other electronics in the house, the spike near 144.390 MHz went away.   Trial and error revealed the problem to be with the laptop power supply.

Hooray!

Thursday, December 22, 2016

DStar Repeaters and QGIS

I recently purchased a Kenwood TH-D74A and downloaded the Repeater List by region from dstarinfo.com.   The data comes as a tab separated file (TSV) and has columns for Lat DD, Lat MM.mm, and N/S as well as Lon DD, Lon MM.mm, and E/W.

To import into QGIS, the file needs latitude/longitude in Decimal Degrees so we need to convert formats.

According to Directions Magazine:

Degrees Minutes Seconds to Degrees Minutes.m
Degrees = Degrees
Minutes.m = Minutes + (Seconds / 60)

Degrees Minutes.m to Decimal Degrees
.d = M.m / 60
Decimal Degrees = Degrees + .d

It's also worth noting that N and E are both positive numbers while S and W are both negative numbers.

Open Excel

On my repeater list, the columns were as follows:

  • U2 is Lat DD
  • S2 is Lat MM.mm
  • T2 is N/S
  • Y2 is Lon DDD
  • Y2 is Lon MM.mm
  • X2 is E/W


Add a new column for Lat

Use this formula: =IF(U2="N",(S2+(T2/60))*1,(S2+(T2/60))*-1)

Add a new column for Lng

Use this formula:  =IF(Y2="E",(W2+(X2/60))*1,(W2+(X2/60))*-1)

Copy and Paste into remaining cells.

Save as CSV

In QGIS, click the import delimited file button


Use the new columns created by the Excel formulas


Click Ok and you should see your repeater list as points on the map.



On further inspection, it appears the coordinates may have a lack of precision that puts the points not quite where they should be.   More research is needed.

Monday, December 12, 2016

Tips for installing GeoNode on Ubuntu 16.04.1


I followed the GeoNode install instructions for Ubuntu 14.04

I installed Postgresql 9.5/postgis and Geoserver as specified and then later changed them to other servers. I install Tomcat 8.


Tip One:
sudo pip uninstall celery
sudo pip install celery=3.1.18
sudo pip freeze > requirements
sudo pip install -e .


Tip Two
Edit /var/www/geonode/geonode.wsgi

#Comment out these lines and replace with:
#from django.core.handlers.wsgi import WSGIHandler
#application = WSGIHandler()

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()