Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions RAPIDpy/gis/muskingum.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def CreateMuskingumKfacFile(in_drainage_line,
open_shapefile(in_drainage_line, file_geodatabase)

number_of_features = ogr_drainage_line_shapefile_lyr.GetFeatureCount()
river_id_list = np.zeros(number_of_features, dtype=np.int32)
river_id_list = np.zeros(number_of_features, dtype=np.int64)

length_list = \
np.zeros(number_of_features, dtype=np.float32)
Expand Down Expand Up @@ -145,7 +145,7 @@ def CreateMuskingumKfacFile(in_drainage_line,
connectivity_table = np.loadtxt(in_connectivity_file,
delimiter=",",
ndmin=2,
dtype=int)
dtype=np.int64)

length_slope_array = []
kfac2_array = []
Expand Down
12 changes: 6 additions & 6 deletions RAPIDpy/gis/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def StreamIDNextDownIDToConnectivity(stream_id_array,
np.concatenate(
[np.array([hydroid, nextDownID, count_upstream]),
list_upstreamID]
).astype(int))
).astype(np.int64))

with open_csv(out_csv_file, 'w') as csvfile:
connectwriter = csv_writer(csvfile)
Expand All @@ -54,7 +54,7 @@ def StreamIDNextDownIDToConnectivity(stream_id_array,
row_list,
np.array([0 for _ in xrange(max_count_upstream - row_list[2])])
])
connectwriter.writerow(out.astype(int))
connectwriter.writerow(out.astype(np.int64))


def CreateNetworkConnectivity(in_drainage_line,
Expand Down Expand Up @@ -105,8 +105,8 @@ def CreateNetworkConnectivity(in_drainage_line,
stream_id_array.append(drainage_line_feature.GetField(river_id))
next_down_id_array.append(drainage_line_feature.GetField(next_down_id))

stream_id_array = np.array(stream_id_array, dtype=np.int32)
next_down_id_array = np.array(next_down_id_array, dtype=np.int32)
stream_id_array = np.array(stream_id_array, dtype=np.int64)
next_down_id_array = np.array(next_down_id_array, dtype=np.int64)

StreamIDNextDownIDToConnectivity(stream_id_array,
next_down_id_array,
Expand Down Expand Up @@ -312,9 +312,9 @@ def CreateSubsetFile(in_drainage_line,

del ogr_drainage_line_shapefile

hydroid_list = np.array(hydroid_list, dtype=np.int32)
hydroid_list = np.array(hydroid_list, dtype=np.int64)
if hydroseq_list:
hydroseq_list = np.array(hydroseq_list, dtype=np.int32)
hydroseq_list = np.array(hydroseq_list, dtype=np.int64)
sort_order = hydroseq_list.argsort()[::-1]
hydroid_list = hydroid_list[sort_order]
else:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ More information about installation and the input parameters for RAPID can be fo

The source code for RAPID is located at https://github.com/c-h-david/rapid/.

[![DOI](https://zenodo.org/badge/19918/erdc-cm/RAPIDpy.svg)](https://zenodo.org/badge/latestdoi/19918/erdc-cm/RAPIDpy)
[![DOI](https://zenodo.org/badge/19918/erdc/RAPIDpy.svg)](https://zenodo.org/badge/latestdoi/19918/erdc/RAPIDpy)

[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg)](https://github.com/erdc-cm/RAPIDpy/blob/master/LICENSE)
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg)](https://github.com/erdc/RAPIDpy/blob/master/LICENSE)

[![PyPI version](https://badge.fury.io/py/RAPIDpy.svg)](https://badge.fury.io/py/RAPIDpy)

Expand Down Expand Up @@ -60,5 +60,5 @@ Ahmad A Tavakoly. (2017). RAPID input files corresponding to the Mississippi Riv
## Other tools to prepare input for RAPID

- For ESRI users: https://github.com/Esri/python-toolbox-for-rapid
- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc-cm/python-toolbox-for-rapid
- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc/python-toolbox-for-rapid
- For the NHDPlus dataset: https://github.com/c-h-david/RRR
2 changes: 1 addition & 1 deletion docs/gis_stream_network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Using ArcHydro to Generate Stream Network
See:

- https://github.com/Esri/python-toolbox-for-rapid
- https://github.com/erdc-cm/python-toolbox-for-rapid
- https://github.com/erdc/python-toolbox-for-rapid

Using TauDEM to Generate Stream Network
---------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ https://github.com/c-h-david/rapid.
.. |Coverage Status| image:: https://coveralls.io/repos/github/erdc/RAPIDpy/badge.svg?branch=master
:target: https://coveralls.io/github/erdc/RAPIDpy
.. |License (3-Clause BSD)| image:: https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg
:target: https://github.com/erdc-cm/RAPIDpy/blob/master/LICENSE
:target: https://github.com/erdc/RAPIDpy/blob/master/LICENSE

Contents:

Expand Down Expand Up @@ -90,7 +90,7 @@ Other tools to prepare input for RAPID
---------------------------------------

- For ESRI users: https://github.com/Esri/python-toolbox-for-rapid
- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc-cm/python-toolbox-for-rapid
- Modified version of the ESRI RAPID Toolbox: https://github.com/erdc/python-toolbox-for-rapid
- For the NHDPlus dataset: https://github.com/c-h-david/RRR


Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ or from https://conda.io/miniconda.html.

This is how you get the most up-to-date version of the code.

.. note:: If you don't have git, you can download the code from https://github.com/erdc-cm/RAPIDpy
.. note:: If you don't have git, you can download the code from https://github.com/erdc/RAPIDpy

::

$ git clone https://github.com/erdc-cm/RAPIDpy.git
$ git clone https://github.com/erdc/RAPIDpy.git
$ cd RAPIDpy
$ conda env create -f rapidpy_env.yml
$ conda activate rapidpy_env
Expand All @@ -93,7 +93,7 @@ To develop on the latest version:

::

$ git clone https://github.com/erdc-cm/RAPIDpy.git
$ git clone https://github.com/erdc/RAPIDpy.git
$ cd RAPIDpy
$ conda env create -f rapidpy_env.yml
$ conda activate rapidpy_env
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
'parameters for RAPID can be found at http://rapid-hub.org.'
' The source code for RAPID is located at '
'https://github.com/c-h-david/rapid/. \n\n'
'.. image:: https://zenodo.org/badge/19918/erdc-cm/RAPIDpy.svg \n'
' :target: https://zenodo.org/badge/latestdoi/19918/erdc-cm/RAPIDpy',
'.. image:: https://zenodo.org/badge/19918/erdc/RAPIDpy.svg \n'
' :target: https://zenodo.org/badge/latestdoi/19918/erdc/RAPIDpy',
keywords='RAPID',
author='Alan Dee Snow',
author_email='[email protected]',
url='https://github.com/erdc-cm/RAPIDpy',
url='https://github.com/erdc/RAPIDpy',
license='BSD 3-Clause',
packages=find_packages(),
package_data={'': ['gis/lsm_grids/*.nc']},
Expand Down