This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
r""" | |
--------- | |
CondaPkgs | |
--------- | |
---- | |
Script : | |
CondaPkgs.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
r""" | |
Author : | |
Dan_Patterson@carleton.ca | |
Notes | |
----- | |
For a faster implementation see npgeom and npg_pip.py. the np_wn uses | |
numpy to speed up substantially the `pip` analysis. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
r""" | |
----------- | |
svg_npGeom.py | |
----------- | |
Author : | |
Dan_Patterson@carleton.ca | |
`<https://github.com/Dan-Patterson>`_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
""" | |
======== | |
vincenty | |
======== | |
Script : vincenty.py | |
Author : Dan.Patterson@carleton.ca |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import numpy as np | |
def e_leng(a, close=False): | |
"""Length/distance between points in an array using einsum | |
Parameters | |
---------- | |
preprocessing : | |
use `_view_`, `_new_view_` or `_reshape_` with structured/recarrays |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def e_dist(a, b, metric='euclidean'): | |
"""Distance calculation for 1D, 2D and 3D points using einsum | |
preprocessing : | |
use `_view_`, `_new_view_` or `_reshape_` with structured/recarrays | |
Parameters | |
---------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see https://community.esri.com/blogs/dan_patterson/2018/11/18/excel-arrays-tables-in-arcgis-pro for | |
# more information and descriptions | |
import numpy as np | |
def excel_np(path, sheet_num=0): | |
"""Read excel files to numpy structured/record arrays. Your spreadsheet | |
must adhere to simple rules:: | |
- first row must contain the field names for the output array | |
- no blank rows or columns, basically, no fluff or formatting | |
- if you have nodata values, put them in, since blank cells will be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def comp_info(): | |
"""Return information for the computer and python version | |
comp_info() # to use... | |
""" | |
import platform | |
winv = platform.platform() | |
py_ver = platform.python_version() | |
plat = platform.architecture() | |
proc = platform.processor() | |
p_node = platform._node() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
""" | |
:Script: crosstab.py | |
:Author: Dan.Patterson@carleton.ca | |
:Modified: 2016- - | |
:Purpose: | |
: | |
:Notes: | |
: | |
:References |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script: sparse_window_demo.py | |
Author: Dan.Patterson@carleton.ca | |
Modified: 2016_05_03 | |
Purpose: | |
- Conversion of point data to raster | |
- To produce a moving window equivalent to find the cells that are | |
surrounded by a particular value | |
References: | |
- http://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/ |