Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Mapping and GIS Related Scripts:
--------------------------------

airlineroutes.py:
    Plot US airline routes on a background map.
    Mainly useful as an illustration of plotting from geopandas.

constituents.py:
    Given a list of addresses and a district geojson file,
    geocode each address and determine what district it's in.
    The goal is to see if a group has constituents in specific districts.

demraytrace.py:
    Raytrace a Digital Elevation Model file using povray,
    creating a 360-degree panorama.
    demproj.py is similar but pointless, making lots of smaller
    povray projections that you can stitch together.

firedata.py:
    Track progress of a wildfire. Download MODIS and VIIRS hotspot data
    plus perimeter data, and massage it into something pytopo can show.

geoipcompare.py:
    Check several different geoip services and log the varying
    answers they give.

geojsonmap.py:
    How to plot a geojson file of polygons exported from QGIS.

grassviewshed.py:
    Use GRASS r.viewshed for a viewshed analysis on a DEM input file.

greatcircle.py:
    Calculate bearings for a great circle trip between two coordinates
    on a spherical planet.

map_named_features.py:
    Map features from the USGS National Map's Geographic Names
    Information System (GNIS) on a Folium map.

map_valleys.py
    Starting from the USGS National Map's Geographic Names Information
    System (GNIS) and a Digital Elevation Map (DEM) tif file,
    trace named valleys using PySheds to analyze the DEM,
    then save the traces to a GeoJSON or GPX file
    which can be carried along on a mobile device.

pixel_photo_comparison.py:
    Compare GPS coordinates from photos to the actual coordinates where
    the photo was taken, to analyze how far off the Google Pixel 6a's
    photo coordinates are. Doesn't make any attempt to be general,
    e.g. coordinates are specified in the script.
    Discussion at https://shallowsky.com/blog/mapping/pixel_photo_gps_bad.html
    Also has a useful comparison of two different types of markers
    in folium.

plotrivers.py:
    Follow the tutorial at
    https://towardsdatascience.com/creating-beautiful-river-maps-with-python-37c9b5f5b74c
    updated to work with current data files, and showing North America.
    Try to fix some matplotlib problems that show up.
    *Very slow.*

polidistmap.py:
    Show political districts -- or any other geojson data -- on a map
    using folium to create a leaflet map.
    Also has examples for using gdal to translate shapefile to geojson.
    (But see also districtmaps in my webapps repo for a more up-to-date
    and maintained solution, which I use on the LWVNM
    https://www.lwvnm.org/districtmaps/ page.)

shapemerge.py:
    Starting from a shapefile of lots of small shapes, merge (dissolve)
    them into a smaller number of shapes. For instance, coalesce
    voting precincts into voting districts each containing several
    precincts. Uses fiona and shapely.

splitgeojson.py:
    Given a geojson that has two tags of interest, split by one of
    those tags. For instance, the NM SOS county commission district
    GIS has all counties in one file, with tags DIST_NUM and COUNTY,
    and it's useful to split by COUNTY into a file per county.

viewshed2view.py:
    Take a viewshed (like one generated by GRASS r.viewshed) and
    turn it into a 360 image showing what's visible.

waymaker.py:
    Take a file and of descriptions, multi-line and separated by blank lines,
    and turn it into a collection of GPX waypoints suitable for import into
    any mapping program (e.g. Osmand or PyTopo).