Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catching-up On Source Code Changes #3

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

brettpalmberg
Copy link
Collaborator

Catching up on source code changes.
Changes made via feature branches in separable commits in an attempt to provide clear history on why changes were made. Thanks and let me know if you have questions.

Brett Palmberg and others added 30 commits August 24, 2018 13:59
…rict-nesting

Flatten "division-district" structure to office
change ftp URL to http
…ariable

use environment variable CWMSGRID
change ftp URL to http
Remove config_local.py.example; Add config_local.py
…rint

Updated print statements to be Python 3 compliant
Begin to use hecgridloaders.flt2dss python wrapper for Java grid loading utility

Change Function and Variable Names:
  WriteZeroDStoAsc() --> WriteZeroGrid()
  Remove format references from variable names (ex. ascbasename, ref to ASCII)

Code simplifications:
  Convert some string concat operations (i.e. " " +) to format statements
  Eliminated some code duplication between WriteZeroGrid() and WriteGrid()
Fix non-existent variable projgrid used in flt2dss.Task() call
Misc refactoring changes
  * Remove from osgeo.gdalconst import *
  * Prefix gdalconst variables (i.e. GDT_Float32 --> gdal.GDT_Float32)
  * from hecgridloaders import (flt2dss2 --> flt2dss)
…ith config_local.py

Simplified creating directories
Eliminated variable dstr
…TORY_STRUCTURE

Removed LEGACY_DIRECTORY_STRUCTURE. Same result can be accomplished w…
Brett Palmberg and others added 7 commits September 5, 2018 15:36
- Eliminate file copy from tmpdir to projfltdir
- Convert string concatenations to .format() syntax
- Eliminate use of "easiername" and "enameDict"
- Eliminate variables "snodaslist" and "zerolist"
- Eliminate variables "p" and "dtype"
- Change SetProps(): remove incremental dictionary build
- Change SetProps(): add data units property for all variables
…-eliminate-file-copy

Simplifications. Admittedly too many changes for a single commit:
…-tmpdir

Change scratch file writes from projfltdir to tmpdir
…ng-tarfile-extract

Add exception handling in function prepare_source_data_for_date()
"to_srs"
Corrected to exact definition of "Standard Hydrologic Grid" (SHG) (EPSG:5070)
EPSG:5070 (SHG) uses spheroid "GRS 1980" (correct spheroid for SHG)
Previous PROJ.4 string used spheroid "WGS 84"

"s_srs"
No change to projection definition. See equivalence tests below.

Checked equivalence with gdalsrsinfo - results below.

test: t_srs
-----------

gdalsrsinfo '+proj=aea +lat_1=29.5n +lat_2=45.5n +lat_0=23.0n +lon_0=96.0w +x_0=0.0 +y_0=0.0 +units=m +datum=WGS84'

PROJ.4 : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs

OGC WKT :
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["standard_parallel_1",29.5],
    PARAMETER["standard_parallel_2",45.5],
    PARAMETER["latitude_of_center",23],
    PARAMETER["longitude_of_center",-96],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
----

----
gdalsrsinfo "EPSG:5070"

PROJ.4 : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

OGC WKT :
PROJCS["NAD83 / Conus Albers",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["standard_parallel_1",29.5],
    PARAMETER["standard_parallel_2",45.5],
    PARAMETER["latitude_of_center",23],
    PARAMETER["longitude_of_center",-96],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    AUTHORITY["EPSG","5070"]]
----

test: s_srs
-----------
gdalsrsinfo "+proj=longlat +datum=WGS84"

PROJ.4 : +proj=longlat +datum=WGS84 +no_defs

OGC WKT :
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]
----
----
gdalsrsinfo EPSG:4326

PROJ.4 : +proj=longlat +datum=WGS84 +no_defs

OGC WKT :
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]
----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant