iwfm.gisΒΆ
Classes, methods and functions to read, write and modify gis files for IWFM and IGSM files.
Modules
|
Return the bearing between two (lat,lon) points p1 = [lat1,lon1], p2 = [lat2,lon2] in degrees Description of algorithm at https://www.mathsisfun.com/sine-cosine-tangent.html. |
|
Read a shapefile and write a choropleth image. |
|
Draw an entire contour shapefile to a PNG image. |
|
Convert lat-lon point from decimal degrees to degree-minute-second. |
|
Read a shapefile and write it as an image. |
|
Use the Vincenty formula to calculate the distance between two (lat,lon) points on an ellipsoid Earth. |
|
Use the Haversine formula to calculate the distance between two (lat,lon) points on a sphere. |
|
Convert from degree-minute-second to decimal degrees. |
|
Create a shapely Polygon of the boundary of an IWFM model. |
|
Create an IWFM element shapefile. |
Read IWFM Elemental Z-Budget output file and place the sum of each column into a copy of the elemental hapefile. |
|
|
Create a shapefile of the elements with the element ids and node ids. |
|
Return the lat-lon of a street address. |
|
Example: Find the lat-lon of a street address and then reverse to use the lat-lon to get the address information. |
|
Return the lat-lon of a street address as a GeoJSON FeatureCollection. |
|
Use multiprocessing to find and return multiple geocodes. |
|
Return the lat-lon of a street address in WKT format. |
|
Create a point shape from a geojson object. |
|
Open a file with geopandas and return geopandas object. |
|
Create and dislay a plot from a geopandas dataframe. |
|
Create and save plot from geopandas dataframe. |
|
Create a geopdf canvas that can be drawn on. |
|
Example - draw a rectangle on the geopdf canvas. |
|
Return a WKT string containing PRJ info for <epsg_code>. |
|
Get (x,y) list for the nodes on the bounding polygon. |
|
Get the UTM zone for longitude. |
Typer subapp for IWFM GIS utilities. |
|
|
Convert an ASCII DEM to an image. |
|
Convert an ASCII DEM to an image and colorize using a heat-map color ramp. |
|
Use GDAL and OGR to create a contour shapefile. |
|
Read an ASCII Grid file. |
|
Create a shaded relief ASCII grid from an ASCII DEM. |
|
Write an ASCII Grid file. |
|
Read (x,y) points from a CSV file and create a heatmap overlaid on a web map. |
|
Convert array to hillshade for a city Source: http://geoexamples.blogspot.com.br/2014/03/shaded-relief-images-using-gdal-python.html. |
|
Generate and display the color histogram of an image. |
|
Determine the histogram function for multi-dimensional array <arr>. |
|
Create an image from a histogram array. |
|
Read the names of the preprocessor component input files, read the contents of these files, and create node, element, stream node and stream reach shapefiles. |
|
Create an elements shapefile for an IGSM model. |
|
Convert a Python Imaging Library array to a gdal_array. |
|
Convert a Python Imaging Library array to a gdal_array image. |
|
Classify a remotely sensed image. |
|
Clip a raster file to a shapefile clipping mask. |
|
Perform a simple difference image change detection on matched 'before' and 'after' images. |
|
Automatically extract features of a threshold image to a shapefile. |
|
Stretch the color bands of an image. |
|
Read a TIFF file, swaps two bands, and saves it. |
|
Threshold an image to black and white. |
|
Determine if given latitude is a northern for UTM. |
|
Take the IWFM model main preprocessor file name and a base name for output files, and create node, element, stream node and stream reach shapefiles. |
|
Read a json file. |
|
Get point coordinates from a KML file. |
|
Convert a LIDAR LAS file to an ASCII DEM. |
|
Convert an LAS LIDAR file to a shapefile by creating a 3D triangle mesh using Delaunay Triangulation. |
|
Reproject from geographic coordinates to UTM. |
|
Make projection file <filename>.prj for epsg code <epsg_code>. |
|
Add diversion areas to shapefile of IWFM model elements. |
|
Add diversion areas to shapefile of IWFM model elements. |
|
Add diversion areas to shapefile of IWFM model elements. |
|
Copy IWFM model elements shapefile, and create one shapefile of total area for each year and element, and another shapefile with percent element area for each year and element. |
|
Read a shapefile of IWFM model elements and map an IWFM parameter to the elements. |
|
Read a shapefile of IWFM model nodes and map an IWFM parameter to the nodes. |
|
Read a shapefile of IWFM model elements and map IWFM Rootzone Crop parameters to the elements. |
Read a shapefile of IWFM model elements and map IWFM Rootzone Native and Riparian parameters to the elements. |
|
|
Read a shapefile of IWFM model elements and map IWFM Non-Ponded Crop parameters to the elements. |
|
Read a shapefile of IWFM model elements and map IWFM Ponded Crop parameters to the elements. |
|
Read a shapefile of IWFM model elements and map IWFM Rootzone Urban parameters to the elements. |
|
Add diversion recharge areas to shapefile of IWFM model elements. |
|
Return the functions associated with the shpfile library. |
|
Commit changes to a mysql database. |
|
Connect to a mysql database. |
|
Create a mysql database DEMO - how to do it. |
|
Insert a record into a mysql database. |
|
Add a new table to a mysql database. |
|
Read a mysql database. |
|
Read a GIS waypoint file and write lat-lon values. |
|
Create node shapefile for an IWFM model with multiple values for each node. |
|
Create node shapefile for an IWFM model with a value for each node. |
|
Create an IWFM nodes shapefile. |
|
Create a shapefile of the nodes with the node ids. |
|
Return streen network data for city <place>. |
|
Use OSMNX to calculate average street length for a city. |
|
Convert a point to geojson format. |
|
Is the point inside the polygon? |
|
Create projection files for shapefiles. |
|
Initialize the QGIS application. |
|
Initialize QGIS paths. |
|
Get a list of QGIS project layer names and paths. |
|
Open a QGIS project. |
|
Print QGIS geometry informatio to screen. |
|
Save a QGIS project. |
|
Extract a raster band to a file. |
|
Open a raster file. |
|
Create an IWFM stream reaches shapefile from IWFM Preprocessor stream specification information. |
|
Convert a shapefile to a raster and save as a png file - including white fill. |
|
Convert a shapefile to a raster and saves as a png file - just the outline with no fills. |
|
Convert a shapefile to a raster and save as a PNG file, filling in polygon holes. |
|
Translate shapefile geometry info to WKT format. |
|
Add a field to a shapefile with PyShp. |
|
Return the geodesic area of a polygon in geographic (lon-lat) coordinates. |
|
Return bounding box for PyShp shapefile. |
|
Return the shapefile coordinate reference system from the sidecar .prj file. |
|
Return the driver. |
|
Read the projection file and returns the EPSG value. |
Return the field names for PyShp shapefile. |
|
|
Return the field property strings for PyShp shapefile. |
Print the field property strings for a PyShp shapefile. |
|
|
Return shape geometry for PyShp shapefile. |
|
Read a shapefile with PyShp. |
|
Open a shapefile with OGR. |
|
Read a shapefile with PyShp. |
|
Get a writer for a shapefile of the same type as the input shapefile. |
|
Return one column from the shapefile table. |
|
Return one column from the shapefile table. |
|
Return a shapefile record as a string. |
|
Return the item in the column specified by field_name for record i for a PyShp shapefile. |
|
Return a record as a string. |
|
Return one row or record for a shapefile opened with PyShp. |
|
Return one row or record for a shapefile opened with PyShp, works better for large DBF files. |
|
Return the number of records in a shapefile. |
|
Project a shapefile to another shapefile in <spatRef> coordinate system. |
|
Reproject a point shapefile to UTM. |
|
Return integer shape type for a PyShp shapefile. |
|
Return a standard text string of the shape type for a PyShp shapefile. |
|
Create an IWFM stream nodes shapefile. |
|
Perform a histogram stretch on a gdal_array array image. |
|
Reproject from UTM to geographic coordinates. |
|
Reproject from UTM to geographic coordinates. |
|
Reproject a WGS84 shapefile to UTM. |
|
Get WKT object bounding box. |
|
Read an Excel workbook and create a POINT shapefile. |
|
Turn WKT text description into object. |
|
Use a GDAL geomatrix to calculate the pixel location of a geospatial coordinate. |
|
Convert geospatial coordinates to screen pixels. |
|
Read a broken XML file and write repaired file. |
|
Reproject from UTM to geographic coordinates. |