%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined\pdfpxdimen \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen \fi \sphinxpxdimen=.75bp\relax \ifdefined\pdfimageresolution \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax \fi %% let collapsible pdf bookmarks panel have high depth per default \PassOptionsToPackage{bookmarksdepth=5}{hyperref} \PassOptionsToPackage{booktabs}{sphinx} \PassOptionsToPackage{colorrows}{sphinx} \PassOptionsToPackage{warn}{textcomp} \usepackage[utf8]{inputenc} \ifdefined\DeclareUnicodeCharacter % support both utf8 and utf8x syntaxes \ifdefined\DeclareUnicodeCharacterAsOptional \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}} \else \let\sphinxDUC\DeclareUnicodeCharacter \fi \sphinxDUC{00A0}{\nobreakspace} \sphinxDUC{2500}{\sphinxunichar{2500}} \sphinxDUC{2502}{\sphinxunichar{2502}} \sphinxDUC{2514}{\sphinxunichar{2514}} \sphinxDUC{251C}{\sphinxunichar{251C}} \sphinxDUC{2572}{\textbackslash} \fi \usepackage{cmap} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb,amstext} \usepackage{babel} \usepackage{tgtermes} \usepackage{tgheros} \renewcommand{\ttdefault}{txtt} \usepackage[Bjarne]{fncychap} \usepackage[,numfigreset=2,mathnumfig,mathnumsep={.}]{sphinx} \fvset{fontsize=auto} \usepackage{geometry} % Include hyperref last. \usepackage{hyperref} % Fix anchor placement for figures with captions. \usepackage{hypcap}% it must be loaded after hyperref. % Set up styles of URL: it should be placed after hyperref. \urlstyle{same} \addto\captionsenglish{\renewcommand{\contentsname}{Contents:}} \usepackage{sphinxmessages} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{3} \title{GeoSpatialTools} \date{Feb 26, 2025} \release{0.11.0} \author{NOC Surface Processes} \newcommand{\sphinxlogo}{\vbox{}} \renewcommand{\releasename}{Release} \makeindex \begin{document} \ifdefined\shorthandoff \ifnum\catcode`\=\string=\active\shorthandoff{=}\fi \ifnum\catcode`\"=\active\shorthandoff{"}\fi \fi \pagestyle{empty} \sphinxmaketitle \pagestyle{plain} \sphinxtableofcontents \pagestyle{normal} \phantomsection\label{\detokenize{index::doc}} \sphinxstepscope \chapter{Introduction} \label{\detokenize{introduction:introduction}}\label{\detokenize{introduction::doc}} \sphinxAtStartPar Python library containing useful functions and classes for Spatial Analysis. \sphinxAtStartPar Tested on Python versions 3.9 to 3.13. \sphinxstepscope \chapter{Getting Started} \label{\detokenize{getting_started:getting-started}}\label{\detokenize{getting_started::doc}} \section{Installation} \label{\detokenize{getting_started:installation}} \subsection{Via Pip} \label{\detokenize{getting_started:via-pip}} \sphinxAtStartPar GeoSpatialTools is not available on PyPI, however it can be installed via pip with the following command: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+go}{pip install git+ssh://git@git.noc.ac.uk/nocsurfaceprocesses/geospatialtools.git} \end{sphinxVerbatim} \subsection{From Source} \label{\detokenize{getting_started:from-source}} \sphinxAtStartPar Alternatively, you can clone the repository and install using pip (or conda if preferred). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+go}{git clone git@git.noc.ac.uk/nocsurfaceprocesses/geospatialtools.git} \PYG{g+go}{cd geospatialtools} \PYG{g+go}{python \PYGZhy{}m venv venv} \PYG{g+go}{source venv/bin/activate} \PYG{g+go}{pip install \PYGZhy{}e .} \end{sphinxVerbatim} \sphinxstepscope \chapter{Credits} \label{\detokenize{authors:credits}}\label{\detokenize{authors::doc}} \section{Development Lead} \label{\detokenize{authors:development-lead}}\begin{itemize} \item {} \sphinxAtStartPar Joseph T. Siddons \textless{}\sphinxhref{mailto:josidd@noc.ac.uk}{josidd@noc.ac.uk}\textgreater{} \sphinxhref{git.noc.ac.uk/josidd}{@josidd} \end{itemize} \section{Contributoring Developers} \label{\detokenize{authors:contributoring-developers}}\begin{itemize} \item {} \sphinxAtStartPar Richard C. Cornes \textless{}\sphinxhref{mailto:rcornes@noc.ac.uk}{rcornes@noc.ac.uk}\textgreater{} \sphinxhref{git.noc.ac.uk/ricorne}{@ricorne} \end{itemize} \sphinxstepscope \chapter{Users Guide} \label{\detokenize{users_guide:module-GeoSpatialTools.neighbours}}\label{\detokenize{users_guide:users-guide}}\label{\detokenize{users_guide::doc}}\index{module@\spxentry{module}!GeoSpatialTools.neighbours@\spxentry{GeoSpatialTools.neighbours}}\index{GeoSpatialTools.neighbours@\spxentry{GeoSpatialTools.neighbours}!module@\spxentry{module}} \section{Neighbours} \label{\detokenize{users_guide:neighbours}} \sphinxAtStartPar Functions for finding nearest neighbours using bisection. \index{SortedError@\spxentry{SortedError}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.neighbours.SortedError}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{exception}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.neighbours.}}\sphinxbfcode{\sphinxupquote{SortedError}}} \pysigstopsignatures \sphinxAtStartPar Error class for Sortedness \end{fulllineitems} \index{SortedWarning@\spxentry{SortedWarning}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.neighbours.SortedWarning}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{exception}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.neighbours.}}\sphinxbfcode{\sphinxupquote{SortedWarning}}} \pysigstopsignatures \sphinxAtStartPar Warning class for Sortedness \end{fulllineitems} \index{find\_nearest() (in module GeoSpatialTools.neighbours)@\spxentry{find\_nearest()}\spxextra{in module GeoSpatialTools.neighbours}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.neighbours.find_nearest}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.neighbours.}}\sphinxbfcode{\sphinxupquote{find\_nearest}}} {\sphinxparam{\DUrole{n}{vals}}\sphinxparamcomma \sphinxparam{\DUrole{n}{test}}\sphinxparamcomma \sphinxparam{\DUrole{n}{check\_sorted}\DUrole{o}{=}\DUrole{default_value}{True}}} {} \pysigstopsignatures \sphinxAtStartPar Find the nearest value in a list of values for each test value. \sphinxAtStartPar Uses bisection for speediness! \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{vals}} (\sphinxstyleliteralemphasis{\sphinxupquote{list}}\sphinxstyleliteralemphasis{\sphinxupquote{{[}}}\sphinxstyleliteralemphasis{\sphinxupquote{Numeric}}\sphinxstyleliteralemphasis{\sphinxupquote{{]}}}) \textendash{} List of values \sphinxhyphen{} this is the pool of values for which we are looking for a nearest match. This list MUST be sorted. Sortedness is not checked, nor is the list sorted. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{test}} (\sphinxstyleliteralemphasis{\sphinxupquote{list}}\sphinxstyleliteralemphasis{\sphinxupquote{{[}}}\sphinxstyleliteralemphasis{\sphinxupquote{Numeric}}\sphinxstyleliteralemphasis{\sphinxupquote{{]} }}\sphinxstyleliteralemphasis{\sphinxupquote{| }}\sphinxstyleliteralemphasis{\sphinxupquote{Numeric}}) \textendash{} List of query values \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{check\_sorted}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Optionally check that the input vals is sorted. Raises an error if set to True (default), displays a warning if set to False. \end{itemize} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{Union}}{[}\sphinxcode{\sphinxupquote{List}}{[}\sphinxcode{\sphinxupquote{int}}{]}, \sphinxcode{\sphinxupquote{int}}{]}} \sphinxlineitem{Returns} \sphinxAtStartPar \begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleemphasis{A list containing the index of the nearest neighbour in vals for each value} \item {} \sphinxAtStartPar \sphinxstyleemphasis{in test. Or the index of the nearest neighbour if test is a single value.} \end{itemize} \end{description}\end{quote} \end{fulllineitems} \index{module@\spxentry{module}!GeoSpatialTools.quadtree@\spxentry{GeoSpatialTools.quadtree}}\index{GeoSpatialTools.quadtree@\spxentry{GeoSpatialTools.quadtree}!module@\spxentry{module}} \section{QuadTree} \label{\detokenize{users_guide:quadtree}}\label{\detokenize{users_guide:module-GeoSpatialTools.quadtree}} \sphinxAtStartPar Constuctors for QuadTree classes that can decrease the number of comparisons for detecting nearby records for example. This is an implementation that uses Haversine distances for comparisons between records for identification of neighbours. \index{Ellipse (class in GeoSpatialTools.quadtree)@\spxentry{Ellipse}\spxextra{class in GeoSpatialTools.quadtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Ellipse}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.quadtree.}}\sphinxbfcode{\sphinxupquote{Ellipse}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{a}}\sphinxparamcomma \sphinxparam{\DUrole{n}{b}}\sphinxparamcomma \sphinxparam{\DUrole{n}{theta}}} {} \pysigstopsignatures \sphinxAtStartPar A simple Ellipse Class for an ellipse on the surface of a sphere. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Horizontal centre of the ellipse \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Vertical centre of the ellipse \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{a}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Length of the semi\sphinxhyphen{}major axis \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{b}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Length of the semi\sphinxhyphen{}minor axis \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{theta}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Angle of the semi\sphinxhyphen{}major axis from horizontal anti\sphinxhyphen{}clockwise in radians \end{itemize} \end{description}\end{quote} \index{contains() (GeoSpatialTools.quadtree.Ellipse method)@\spxentry{contains()}\spxextra{GeoSpatialTools.quadtree.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Ellipse.contains}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{contains}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a point is contained within the Ellipse \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{nearby\_rect() (GeoSpatialTools.quadtree.Ellipse method)@\spxentry{nearby\_rect()}\spxextra{GeoSpatialTools.quadtree.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Ellipse.nearby_rect}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby\_rect}}} {\sphinxparam{\DUrole{n}{rect}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a rectangle is near to the Ellipse \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{QuadTree (class in GeoSpatialTools.quadtree)@\spxentry{QuadTree}\spxextra{class in GeoSpatialTools.quadtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.quadtree.}}\sphinxbfcode{\sphinxupquote{QuadTree}}} {\sphinxparam{\DUrole{n}{boundary}}\sphinxparamcomma \sphinxparam{\DUrole{n}{capacity}\DUrole{o}{=}\DUrole{default_value}{5}}\sphinxparamcomma \sphinxparam{\DUrole{n}{depth}\DUrole{o}{=}\DUrole{default_value}{0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{max\_depth}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar A Simple QuadTree class for PyCOADS \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{boundary}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{Rectangle}}}}}) \textendash{} The bounding Rectangle of the QuadTree \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{capacity}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The capacity of each cell, if max\_depth is set then a cell at the maximum depth may contain more points than the capacity. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The current depth of the cell. Initialises to zero if unset. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{max\_depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} The maximum depth of the QuadTree. If set, this can override the capacity for cells at the maximum depth. \end{itemize} \end{description}\end{quote} \index{divide() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{divide()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.divide}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{divide}}} {} {} \pysigstopsignatures \sphinxAtStartPar Divide the QuadTree \end{fulllineitems} \index{insert() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{insert()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.insert}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{insert}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Insert a point into the QuadTree \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{len() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{len()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.len}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{len}}} {\sphinxparam{\DUrole{n}{\_current\_len}\DUrole{o}{=}\DUrole{default_value}{0}}} {} \pysigstopsignatures \sphinxAtStartPar Get the number of points in the OctTree \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{int}}} \end{description}\end{quote} \end{fulllineitems} \index{nearby\_points() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{nearby\_points()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.nearby_points}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby\_points}}} {\sphinxparam{\DUrole{n}{point}}\sphinxparamcomma \sphinxparam{\DUrole{n}{dist}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get all points that are nearby another point \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{List}}{[}{\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Record}}}}}{]}} \end{description}\end{quote} \end{fulllineitems} \index{query() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{query()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.query}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{query}}} {\sphinxparam{\DUrole{n}{rect}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get points that fall in a rectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{List}}{[}{\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Record}}}}}{]}} \end{description}\end{quote} \end{fulllineitems} \index{query\_ellipse() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{query\_ellipse()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.query_ellipse}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{query\_ellipse}}} {\sphinxparam{\DUrole{n}{ellipse}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get points that fall in an ellipse. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{List}}{[}{\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Record}}}}}{]}} \end{description}\end{quote} \end{fulllineitems} \index{remove() (GeoSpatialTools.quadtree.QuadTree method)@\spxentry{remove()}\spxextra{GeoSpatialTools.quadtree.QuadTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.QuadTree.remove}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{remove}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Remove a Record from the QuadTree if it is in the QuadTree. \sphinxAtStartPar Returns True if the Record is removed. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{Record (class in GeoSpatialTools.quadtree)@\spxentry{Record}\spxextra{class in GeoSpatialTools.quadtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Record}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.quadtree.}}\sphinxbfcode{\sphinxupquote{Record}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{datetime}\DUrole{o}{=}\DUrole{default_value}{None}}\sphinxparamcomma \sphinxparam{\DUrole{n}{uid}\DUrole{o}{=}\DUrole{default_value}{None}}\sphinxparamcomma \sphinxparam{\DUrole{n}{fix\_lon}\DUrole{o}{=}\DUrole{default_value}{True}}\sphinxparamcomma \sphinxparam{\DUrole{o}{**}\DUrole{n}{data}}} {} \pysigstopsignatures \sphinxAtStartPar ICOADS Record class \sphinxAtStartPar This is a simple instance of an ICOARDS record, it requires position data. It can optionally include datetime, a UID, and extra data passed as keyword arguments. \sphinxAtStartPar Equality is checked only on the required fields + UID if it is specified. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Horizontal coordinate \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Vertical coordinate \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{datetime}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} Datetime of the record \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{uid}} (\sphinxstyleliteralemphasis{\sphinxupquote{str}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} Unique Identifier \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{fix\_lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Force longitude to \sphinxhyphen{}180, 180 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{**data}} \textendash{} Additional data passed to the Record for use by other functions or classes. \end{itemize} \end{description}\end{quote} \index{distance() (GeoSpatialTools.quadtree.Record method)@\spxentry{distance()}\spxextra{GeoSpatialTools.quadtree.Record method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Record.distance}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{distance}}} {\sphinxparam{\DUrole{n}{other}}} {} \pysigstopsignatures \sphinxAtStartPar Compute the Haversine distance to another Record \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{float}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{Rectangle (class in GeoSpatialTools.quadtree)@\spxentry{Rectangle}\spxextra{class in GeoSpatialTools.quadtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.quadtree.}}\sphinxbfcode{\sphinxupquote{Rectangle}}} {\sphinxparam{\DUrole{n}{west}}\sphinxparamcomma \sphinxparam{\DUrole{n}{east}}\sphinxparamcomma \sphinxparam{\DUrole{n}{south}}\sphinxparamcomma \sphinxparam{\DUrole{n}{north}}} {} \pysigstopsignatures \sphinxAtStartPar A simple Rectangle class \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{west}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Western boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{east}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Eastern boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{south}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Southern boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{north}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Northern boundary of the Rectangle \end{itemize} \end{description}\end{quote} \index{contains() (GeoSpatialTools.quadtree.Rectangle method)@\spxentry{contains()}\spxextra{GeoSpatialTools.quadtree.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.contains}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{contains}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a point is contained within the Rectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{edge\_dist (GeoSpatialTools.quadtree.Rectangle property)@\spxentry{edge\_dist}\spxextra{GeoSpatialTools.quadtree.Rectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.edge_dist}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{edge\_dist}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Approximate maximum distance from the centre to an edge \end{fulllineitems} \index{intersects() (GeoSpatialTools.quadtree.Rectangle method)@\spxentry{intersects()}\spxextra{GeoSpatialTools.quadtree.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.intersects}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{intersects}}} {\sphinxparam{\DUrole{n}{other}}} {} \pysigstopsignatures \sphinxAtStartPar Test if another Rectangle object intersects this Rectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{lat (GeoSpatialTools.quadtree.Rectangle property)@\spxentry{lat}\spxextra{GeoSpatialTools.quadtree.Rectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.lat}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lat}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Centre latitude of the Rectangle \end{fulllineitems} \index{lat\_range (GeoSpatialTools.quadtree.Rectangle property)@\spxentry{lat\_range}\spxextra{GeoSpatialTools.quadtree.Rectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.lat_range}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lat\_range}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Latitude range of the Rectangle \end{fulllineitems} \index{lon (GeoSpatialTools.quadtree.Rectangle property)@\spxentry{lon}\spxextra{GeoSpatialTools.quadtree.Rectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.lon}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lon}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Centre longitude of the Rectangle \end{fulllineitems} \index{lon\_range (GeoSpatialTools.quadtree.Rectangle property)@\spxentry{lon\_range}\spxextra{GeoSpatialTools.quadtree.Rectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.lon_range}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lon\_range}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Longitude range of the Rectangle \end{fulllineitems} \index{nearby() (GeoSpatialTools.quadtree.Rectangle method)@\spxentry{nearby()}\spxextra{GeoSpatialTools.quadtree.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.quadtree.Rectangle.nearby}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby}}} {\sphinxparam{\DUrole{n}{point}}\sphinxparamcomma \sphinxparam{\DUrole{n}{dist}}} {} \pysigstopsignatures \sphinxAtStartPar Check if point is nearby the Rectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{module@\spxentry{module}!GeoSpatialTools.octtree@\spxentry{GeoSpatialTools.octtree}}\index{GeoSpatialTools.octtree@\spxentry{GeoSpatialTools.octtree}!module@\spxentry{module}} \section{OctTree} \label{\detokenize{users_guide:octtree}}\label{\detokenize{users_guide:module-GeoSpatialTools.octtree}} \sphinxAtStartPar Constuctors for OctTree classes that can decrease the number of comparisons for detecting nearby records for example. This is an implementation that uses Haversine distances for comparisons between records for identification of neighbours. \index{OctTree (class in GeoSpatialTools.octtree)@\spxentry{OctTree}\spxextra{class in GeoSpatialTools.octtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.octtree.}}\sphinxbfcode{\sphinxupquote{OctTree}}} {\sphinxparam{\DUrole{n}{boundary}}\sphinxparamcomma \sphinxparam{\DUrole{n}{capacity}\DUrole{o}{=}\DUrole{default_value}{5}}\sphinxparamcomma \sphinxparam{\DUrole{n}{depth}\DUrole{o}{=}\DUrole{default_value}{0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{max\_depth}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar A Simple OctTree class for PyCOADS. \sphinxAtStartPar Acts as a space\sphinxhyphen{}time OctTree on the surface of Earth, allowing for querying nearby points faster than searching a full DataFrame. As SpaceTimeRecords are added to the OctTree, the OctTree divides into 8 children as the capacity is reached. Additional SpaceTimeRecords are then added to the children where they fall within the child OctTree’s boundary. \sphinxAtStartPar SpaceTimeRecords already part of the OctTree before divided are not distributed to the children OctTrees. \sphinxAtStartPar Whilst the OctTree has a temporal component, and was designed to utilise datetime / timedelta objects, numeric values and ranges can be used. This usage must be consistent for the boundary and all SpaceTimeRecords that are part of the OctTree. This allows for usage of pentad, timestamp, Julian day, etc. as datetime values. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{boundary}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{SpaceTimeRectangle}}}}}) \textendash{} The bounding SpaceTimeRectangle of the QuadTree \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{capacity}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The capacity of each cell, if max\_depth is set then a cell at the maximum depth may contain more points than the capacity. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The current depth of the cell. Initialises to zero if unset. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{max\_depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} The maximum depth of the QuadTree. If set, this can override the capacity for cells at the maximum depth. \end{itemize} \end{description}\end{quote} \index{divide() (GeoSpatialTools.octtree.OctTree method)@\spxentry{divide()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.divide}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{divide}}} {} {} \pysigstopsignatures \sphinxAtStartPar Divide the QuadTree \end{fulllineitems} \index{insert() (GeoSpatialTools.octtree.OctTree method)@\spxentry{insert()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.insert}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{insert}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Insert a SpaceTimeRecord into the QuadTree. \sphinxAtStartPar Note that the SpaceTimeRecord can have numeric datetime values if that is consistent with the OctTree. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{len() (GeoSpatialTools.octtree.OctTree method)@\spxentry{len()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.len}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{len}}} {\sphinxparam{\DUrole{n}{\_current\_len}\DUrole{o}{=}\DUrole{default_value}{0}}} {} \pysigstopsignatures \sphinxAtStartPar Get the number of points in the OctTree \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{int}}} \end{description}\end{quote} \end{fulllineitems} \index{nearby\_points() (GeoSpatialTools.octtree.OctTree method)@\spxentry{nearby\_points()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.nearby_points}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby\_points}}} {\sphinxparam{\DUrole{n}{point}}\sphinxparamcomma \sphinxparam{\DUrole{n}{dist}}\sphinxparamcomma \sphinxparam{\DUrole{n}{t\_dist}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get all points that are nearby another point. \sphinxAtStartPar Query the OctTree to find all SpaceTimeRecords within the OctTree that are nearby to the query SpaceTimeRecord. This search should be faster than searching through all records, since only OctTree children whose boundaries are close to the query SpaceTimeRecord are evaluated. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{point}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecord}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{SpaceTimeRecord}}}}}) \textendash{} The query point. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{dist}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} The distance for comparison. Note that Haversine distance is used as the distance metric as the query SpaceTimeRecord and OctTree are assumed to lie on the surface of Earth. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{t\_dist}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.timedelta}}) \textendash{} Max time gap between SpaceTimeRecords within the OctTree and the query SpaceTimeRecord. Can be numeric if the OctTree boundaries, SpaceTimeRecords, and query SpaceTimeRecord have numeric datetime values and ranges. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{points}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecords}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{SpaceTimeRecords}}}}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} List of SpaceTimeRecords already found. Most use cases will be to not set this value, since it’s main use is for passing onto the children OctTrees. \end{itemize} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{{\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpaceTimeRecords}}}}}} \sphinxlineitem{Returns} \sphinxAtStartPar \begin{itemize} \item {} \sphinxAtStartPar \sphinxstylestrong{SpaceTimeRecords} (\sphinxstyleemphasis{A list of SpaceTimeRecords whose distance to the}) \item {} \sphinxAtStartPar \sphinxstyleemphasis{query SpaceTimeRecord is \textless{}= dist, and the datetimes of the} \item {} \sphinxAtStartPar \sphinxstyleemphasis{SpaceTimeRecords fall within the datetime range of the query} \item {} \sphinxAtStartPar \sphinxstyleemphasis{SpaceTimeRecord.} \end{itemize} \end{description}\end{quote} \end{fulllineitems} \index{query() (GeoSpatialTools.octtree.OctTree method)@\spxentry{query()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.query}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{query}}} {\sphinxparam{\DUrole{n}{rect}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get points that fall in a SpaceTimeRectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{{\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpaceTimeRecords}}}}}} \end{description}\end{quote} \end{fulllineitems} \index{query\_ellipse() (GeoSpatialTools.octtree.OctTree method)@\spxentry{query\_ellipse()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.query_ellipse}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{query\_ellipse}}} {\sphinxparam{\DUrole{n}{ellipse}}\sphinxparamcomma \sphinxparam{\DUrole{n}{points}\DUrole{o}{=}\DUrole{default_value}{None}}} {} \pysigstopsignatures \sphinxAtStartPar Get points that fall in an ellipse. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{{\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpaceTimeRecords}}}}}} \end{description}\end{quote} \end{fulllineitems} \index{remove() (GeoSpatialTools.octtree.OctTree method)@\spxentry{remove()}\spxextra{GeoSpatialTools.octtree.OctTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.OctTree.remove}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{remove}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Remove a SpaceTimeRecord from the OctTree if it is in the OctTree. \sphinxAtStartPar Returns True if the SpaceTimeRecord is removed. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{SpaceTimeEllipse (class in GeoSpatialTools.octtree)@\spxentry{SpaceTimeEllipse}\spxextra{class in GeoSpatialTools.octtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeEllipse}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.octtree.}}\sphinxbfcode{\sphinxupquote{SpaceTimeEllipse}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{a}}\sphinxparamcomma \sphinxparam{\DUrole{n}{b}}\sphinxparamcomma \sphinxparam{\DUrole{n}{theta}}\sphinxparamcomma \sphinxparam{\DUrole{n}{start}}\sphinxparamcomma \sphinxparam{\DUrole{n}{end}}} {} \pysigstopsignatures \sphinxAtStartPar A simple Ellipse Class for an ellipse on the surface of a sphere. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Horizontal centre of the ellipse \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Vertical centre of the ellipse \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{a}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Length of the semi\sphinxhyphen{}major axis \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{b}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Length of the semi\sphinxhyphen{}minor axis \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{theta}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Angle of the semi\sphinxhyphen{}major axis from horizontal anti\sphinxhyphen{}clockwise in radians \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{start}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.datetime}}) \textendash{} Start date of the Ellipse \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{end}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.datetime}}) \textendash{} Send date of the Ellipse \end{itemize} \end{description}\end{quote} \index{contains() (GeoSpatialTools.octtree.SpaceTimeEllipse method)@\spxentry{contains()}\spxextra{GeoSpatialTools.octtree.SpaceTimeEllipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeEllipse.contains}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{contains}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a point is contained within the Ellipse \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{nearby\_rect() (GeoSpatialTools.octtree.SpaceTimeEllipse method)@\spxentry{nearby\_rect()}\spxextra{GeoSpatialTools.octtree.SpaceTimeEllipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeEllipse.nearby_rect}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby\_rect}}} {\sphinxparam{\DUrole{n}{rect}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a rectangle is near to the Ellipse \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{SpaceTimeRecord (class in GeoSpatialTools.octtree)@\spxentry{SpaceTimeRecord}\spxextra{class in GeoSpatialTools.octtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecord}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.octtree.}}\sphinxbfcode{\sphinxupquote{SpaceTimeRecord}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{datetime}}\sphinxparamcomma \sphinxparam{\DUrole{n}{uid}\DUrole{o}{=}\DUrole{default_value}{None}}\sphinxparamcomma \sphinxparam{\DUrole{n}{fix\_lon}\DUrole{o}{=}\DUrole{default_value}{True}}\sphinxparamcomma \sphinxparam{\DUrole{o}{**}\DUrole{n}{data}}} {} \pysigstopsignatures \sphinxAtStartPar ICOADS Record class. \sphinxAtStartPar This is a simple instance of an ICOARDS record, it requires position and temporal data. It can optionally include a UID and extra data. \sphinxAtStartPar The temporal component was designed to use \sphinxtitleref{datetime} values, however all methods will work with numeric datetime information \sphinxhyphen{} for example a pentad, timestamp, julian day, etc. Note that any uses within an OctTree and SpaceTimeRectangle must also have timedelta values replaced with numeric ranges in this case. \sphinxAtStartPar Equality is checked only on the required fields + UID if it is specified. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Horizontal coordinate (longitude). \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Vertical coordinate (latitude). \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{datetime}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.datetime}}) \textendash{} Datetime of the record. Can also be a numeric value such as pentad. Comparisons between Records with datetime and Records with numeric datetime will fail. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{uid}} (\sphinxstyleliteralemphasis{\sphinxupquote{str}}\sphinxstyleliteralemphasis{\sphinxupquote{ | }}\sphinxstyleliteralemphasis{\sphinxupquote{None}}) \textendash{} Unique Identifier. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{fix\_lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Force longitude to \sphinxhyphen{}180, 180 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{**data}} \textendash{} Additional data passed to the SpaceTimeRecord for use by other functions or classes. \end{itemize} \end{description}\end{quote} \index{distance() (GeoSpatialTools.octtree.SpaceTimeRecord method)@\spxentry{distance()}\spxextra{GeoSpatialTools.octtree.SpaceTimeRecord method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecord.distance}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{distance}}} {\sphinxparam{\DUrole{n}{other}}} {} \pysigstopsignatures \sphinxAtStartPar Compute the Haversine distance to another SpaceTimeRecord. Only computes spatial distance. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{float}}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{SpaceTimeRecords (class in GeoSpatialTools.octtree)@\spxentry{SpaceTimeRecords}\spxextra{class in GeoSpatialTools.octtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecords}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.octtree.}}\sphinxbfcode{\sphinxupquote{SpaceTimeRecords}}} {\sphinxparam{\DUrole{n}{iterable}\DUrole{o}{=}\DUrole{default_value}{()}}\sphinxparamcomma \sphinxparam{\DUrole{positional-only-separator}{\DUrole{o}{\sphinxstyleabbreviation{/} (Positional\sphinxhyphen{}only parameter separator (PEP 570))}}}} {} \pysigstopsignatures \sphinxAtStartPar List of SpaceTimeRecords \end{fulllineitems} \index{SpaceTimeRectangle (class in GeoSpatialTools.octtree)@\spxentry{SpaceTimeRectangle}\spxextra{class in GeoSpatialTools.octtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.octtree.}}\sphinxbfcode{\sphinxupquote{SpaceTimeRectangle}}} {\sphinxparam{\DUrole{n}{west}}\sphinxparamcomma \sphinxparam{\DUrole{n}{east}}\sphinxparamcomma \sphinxparam{\DUrole{n}{south}}\sphinxparamcomma \sphinxparam{\DUrole{n}{north}}\sphinxparamcomma \sphinxparam{\DUrole{n}{start}}\sphinxparamcomma \sphinxparam{\DUrole{n}{end}}} {} \pysigstopsignatures \sphinxAtStartPar A simple Space Time SpaceTimeRectangle class. \sphinxAtStartPar This constructs a simple Rectangle object. The defining coordinates are the centres of the box, and the extents are the full width, height, and time extent. \sphinxAtStartPar Whilst the rectangle is assumed to lie on the surface of Earth, this is a projection as the rectangle is defined by a longitude/latitude range. \sphinxAtStartPar The temporal components are defined in the same way as the spatial components, that is that the \sphinxtitleref{datetime} component (t) is the “centre”, and the time extent (dt) is the full time range of the box. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{west}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Western boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{east}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Eastern boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{south}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Southern boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{north}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Northern boundary of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{start}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.datetime}}) \textendash{} Start datetime of the Rectangle \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{end}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.datetime}}) \textendash{} End datetime of the Rectangle \end{itemize} \end{description}\end{quote} \index{centre\_datetime (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{centre\_datetime}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.centre_datetime}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{centre\_datetime}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }datetime}}} \pysigstopsignatures \sphinxAtStartPar The midpoint time of the Rectangle \end{fulllineitems} \index{contains() (GeoSpatialTools.octtree.SpaceTimeRectangle method)@\spxentry{contains()}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.contains}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{contains}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Test if a point is contained within the SpaceTimeRectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{edge\_dist (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{edge\_dist}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.edge_dist}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{edge\_dist}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Approximate maximum distance from the centre to an edge \end{fulllineitems} \index{intersects() (GeoSpatialTools.octtree.SpaceTimeRectangle method)@\spxentry{intersects()}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.intersects}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{intersects}}} {\sphinxparam{\DUrole{n}{other}}} {} \pysigstopsignatures \sphinxAtStartPar Test if another Rectangle object intersects this Rectangle \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{lat (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{lat}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.lat}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lat}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Centre latitude of the Rectangle \end{fulllineitems} \index{lat\_range (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{lat\_range}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.lat_range}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lat\_range}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Latitude range of the Rectangle \end{fulllineitems} \index{lon (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{lon}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.lon}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lon}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Centre longitude of the Rectangle \end{fulllineitems} \index{lon\_range (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{lon\_range}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.lon_range}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{lon\_range}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }float}}} \pysigstopsignatures \sphinxAtStartPar Longitude range of the Rectangle \end{fulllineitems} \index{nearby() (GeoSpatialTools.octtree.SpaceTimeRectangle method)@\spxentry{nearby()}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.nearby}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{nearby}}} {\sphinxparam{\DUrole{n}{point}}\sphinxparamcomma \sphinxparam{\DUrole{n}{dist}}\sphinxparamcomma \sphinxparam{\DUrole{n}{t\_dist}}} {} \pysigstopsignatures \sphinxAtStartPar Check if point is nearby the Rectangle \sphinxAtStartPar Determines if a SpaceTimeRecord that falls on the surface of Earth is nearby to the rectangle in space and time. This calculation uses the Haversine distance metric. \sphinxAtStartPar Distance from rectangle to point is challenging on the surface of a sphere, this calculation will return false positives as a check based on the distance from the centre of the rectangle to the corners, or to its Eastern edge (if the rectangle crosses the equator) is used in combination with the input distance. \sphinxAtStartPar The primary use\sphinxhyphen{}case of this method is for querying an OctTree for nearby Records. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{point}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRecord}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{SpaceTimeRecord}}}}}) \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{dist}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}\sphinxstyleliteralemphasis{\sphinxupquote{,}}) \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{t\_dist}} (\sphinxstyleliteralemphasis{\sphinxupquote{datetime.timedelta}}) \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar \sphinxstylestrong{bool} \sphinxlineitem{Return type} \sphinxAtStartPar True if the point is \textless{}= dist + max(dist(centre, corners)) \end{description}\end{quote} \end{fulllineitems} \index{time\_range (GeoSpatialTools.octtree.SpaceTimeRectangle property)@\spxentry{time\_range}\spxextra{GeoSpatialTools.octtree.SpaceTimeRectangle property}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.octtree.SpaceTimeRectangle.time_range}} \pysigstartsignatures \pysigline {\sphinxbfcode{\sphinxupquote{\DUrole{k}{property}\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{time\_range}}\sphinxbfcode{\sphinxupquote{\DUrole{p}{:}\DUrole{w}{ }timedelta}}} \pysigstopsignatures \sphinxAtStartPar The time extent of the Rectangle \end{fulllineitems} \end{fulllineitems} \index{module@\spxentry{module}!GeoSpatialTools.kdtree@\spxentry{GeoSpatialTools.kdtree}}\index{GeoSpatialTools.kdtree@\spxentry{GeoSpatialTools.kdtree}!module@\spxentry{module}} \section{KDTree} \label{\detokenize{users_guide:kdtree}}\label{\detokenize{users_guide:module-GeoSpatialTools.kdtree}} \sphinxAtStartPar An implementation of KDTree using Haversine Distance for GeoSpatial analysis. Useful tool for quickly searching for nearest neighbours. The implementation is a K=2 or 2DTree as only 2 dimensions (longitude and latitude) are used. \sphinxAtStartPar Haversine distances are used for comparisons, so that the spherical geometry of the earth is accounted for. \index{KDTree (class in GeoSpatialTools.kdtree)@\spxentry{KDTree}\spxextra{class in GeoSpatialTools.kdtree}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.kdtree.KDTree}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.kdtree.}}\sphinxbfcode{\sphinxupquote{KDTree}}} {\sphinxparam{\DUrole{n}{points}}\sphinxparamcomma \sphinxparam{\DUrole{n}{depth}\DUrole{o}{=}\DUrole{default_value}{0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{max\_depth}\DUrole{o}{=}\DUrole{default_value}{20}}} {} \pysigstopsignatures \sphinxAtStartPar A Haverine distance implementation of a balanced KDTree. \sphinxAtStartPar This implementation is a \_balanced\_ KDTree, each leaf node should have the same number of points (or differ by 1 depending on the number of points the KDTree is intialised with). \sphinxAtStartPar The KDTree partitions in each of the lon and lat dimensions alternatively in sequence by splitting at the median of the dimension of the points assigned to the branch. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{points}} (\sphinxstyleliteralemphasis{\sphinxupquote{list}}\sphinxstyleliteralemphasis{\sphinxupquote{{[}}}{\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Record}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{Record}}}}}\sphinxstyleliteralemphasis{\sphinxupquote{{]}}}) \textendash{} A list of GeoSpatialTools.Record instances. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The current depth of the KDTree, you should set this to 0, it is used internally. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{max\_depth}} (\sphinxstyleliteralemphasis{\sphinxupquote{int}}) \textendash{} The maximium depth of the KDTree. The leaf nodes will have depth no larger than this value. Leaf nodes will not be created if there is only 1 point in the branch. \end{itemize} \end{description}\end{quote} \index{delete() (GeoSpatialTools.kdtree.KDTree method)@\spxentry{delete()}\spxextra{GeoSpatialTools.kdtree.KDTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.kdtree.KDTree.delete}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{delete}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Delete a Record from the KDTree. May unbalance the KDTree \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{insert() (GeoSpatialTools.kdtree.KDTree method)@\spxentry{insert()}\spxextra{GeoSpatialTools.kdtree.KDTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.kdtree.KDTree.insert}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{insert}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Insert a Record into the KDTree. May unbalance the KDTree. \sphinxAtStartPar The point will not be inserted if it is already in the KDTree. \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{bool}}} \end{description}\end{quote} \end{fulllineitems} \index{query() (GeoSpatialTools.kdtree.KDTree method)@\spxentry{query()}\spxextra{GeoSpatialTools.kdtree.KDTree method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.kdtree.KDTree.query}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{query}}} {\sphinxparam{\DUrole{n}{point}}} {} \pysigstopsignatures \sphinxAtStartPar Find the nearest Record within the KDTree to a query Record \begin{quote}\begin{description} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{Tuple}}{[}\sphinxcode{\sphinxupquote{List}}{[}{\hyperref[\detokenize{users_guide:GeoSpatialTools.quadtree.Record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Record}}}}}{]}, \sphinxcode{\sphinxupquote{float}}{]}} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{module@\spxentry{module}!GeoSpatialTools.great\_circle@\spxentry{GeoSpatialTools.great\_circle}}\index{GeoSpatialTools.great\_circle@\spxentry{GeoSpatialTools.great\_circle}!module@\spxentry{module}} \section{GreatCircle} \label{\detokenize{users_guide:greatcircle}}\label{\detokenize{users_guide:module-GeoSpatialTools.great_circle}} \sphinxAtStartPar Constructors and methods for interacting with GreatCircle objects, including comparisons between GreatCircle objects. \index{GreatCircle (class in GeoSpatialTools.great\_circle)@\spxentry{GreatCircle}\spxextra{class in GeoSpatialTools.great\_circle}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{\DUrole{k}{class}\DUrole{w}{ }}}\sphinxcode{\sphinxupquote{GeoSpatialTools.great\_circle.}}\sphinxbfcode{\sphinxupquote{GreatCircle}}} {\sphinxparam{\DUrole{n}{lon0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lon1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{R}\DUrole{o}{=}\DUrole{default_value}{6371}}} {} \pysigstopsignatures \sphinxAtStartPar A GreatCircle object for a pair of positions. \sphinxAtStartPar Construct a great circle path between a pair of positions. \sphinxAtStartPar \sphinxurl{https://www.boeing-727.com/Data/fly\%20odds/distance.html} \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of start position. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of start position. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of end position. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of end position. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{R}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Radius of the sphere. Default is Earth radius in km (6371.0). \end{itemize} \end{description}\end{quote} \index{dist\_from\_point() (GeoSpatialTools.great\_circle.GreatCircle method)@\spxentry{dist\_from\_point()}\spxextra{GeoSpatialTools.great\_circle.GreatCircle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle.dist_from_point}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{dist\_from\_point}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}} {} \pysigstopsignatures \sphinxAtStartPar Compute distance from the GreatCircle to a point on the sphere. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of the position to test. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of the position to test. \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar Minimum distance between point and the GreatCircle arc. \sphinxlineitem{Return type} \sphinxAtStartPar float \end{description}\end{quote} \end{fulllineitems} \index{intersection() (GeoSpatialTools.great\_circle.GreatCircle method)@\spxentry{intersection()}\spxextra{GeoSpatialTools.great\_circle.GreatCircle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle.intersection}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{intersection}}} {\sphinxparam{\DUrole{n}{other}}\sphinxparamcomma \sphinxparam{\DUrole{n}{epsilon}\DUrole{o}{=}\DUrole{default_value}{0.01}}} {} \pysigstopsignatures \sphinxAtStartPar Determine intersection position with another GreatCircle. \sphinxAtStartPar Determine the location at which the GreatCircle intersects another GreatCircle arc. (To within some epsilon threshold). \sphinxAtStartPar Returns \sphinxtitleref{None} if there is no solution \sphinxhyphen{} either because there is no intersection point, or the planes generated from the arc and centre of the sphere are identical. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{other}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{GreatCircle}}}}}) \textendash{} Intersecting GreatCircle object \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{epsilon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Threshold for intersection \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar Position of intersection \sphinxlineitem{Return type} \sphinxAtStartPar (float, float) | None \end{description}\end{quote} \end{fulllineitems} \index{intersection\_angle() (GeoSpatialTools.great\_circle.GreatCircle method)@\spxentry{intersection\_angle()}\spxextra{GeoSpatialTools.great\_circle.GreatCircle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle.intersection_angle}} \pysigstartsignatures \pysiglinewithargsret {\sphinxbfcode{\sphinxupquote{intersection\_angle}}} {\sphinxparam{\DUrole{n}{other}}\sphinxparamcomma \sphinxparam{\DUrole{n}{epsilon}\DUrole{o}{=}\DUrole{default_value}{0.01}}} {} \pysigstopsignatures \sphinxAtStartPar Get angle of intersection with another GreatCircle. \sphinxAtStartPar Get the angle of intersection with another GreatCircle arc. Returns None if there is no intersection. \sphinxAtStartPar The intersection angle is computed using the normals of the planes formed by the two intersecting great circle objects. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{other}} ({\hyperref[\detokenize{users_guide:GeoSpatialTools.great_circle.GreatCircle}]{\sphinxcrossref{\sphinxstyleliteralemphasis{\sphinxupquote{GreatCircle}}}}}) \textendash{} Intersecting GreatCircle object \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{epsilon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Threshold for intersection \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar Intersection angle in degrees \sphinxlineitem{Return type} \sphinxAtStartPar float | None \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{cartesian\_to\_lonlat() (in module GeoSpatialTools.great\_circle)@\spxentry{cartesian\_to\_lonlat()}\spxextra{in module GeoSpatialTools.great\_circle}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.cartesian_to_lonlat}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.great\_circle.}}\sphinxbfcode{\sphinxupquote{cartesian\_to\_lonlat}}} {\sphinxparam{\DUrole{n}{x}}\sphinxparamcomma \sphinxparam{\DUrole{n}{y}}\sphinxparamcomma \sphinxparam{\DUrole{n}{z}}\sphinxparamcomma \sphinxparam{\DUrole{n}{to\_radians}\DUrole{o}{=}\DUrole{default_value}{False}}} {} \pysigstopsignatures \sphinxAtStartPar Get lon, and lat from cartesian coordinates. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{x}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} x coordinate \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{y}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} y coordinate \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{z}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} z coordinate \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{to\_radians}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Return angles in radians. Otherwise return values in degrees. \end{itemize} \sphinxlineitem{Return type} \sphinxAtStartPar \DUrole{sphinx_autodoc_typehints-type}{\sphinxcode{\sphinxupquote{tuple}}{[}\sphinxcode{\sphinxupquote{float}}, \sphinxcode{\sphinxupquote{float}}{]}} \sphinxlineitem{Returns} \sphinxAtStartPar \begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleemphasis{(float, float)} \item {} \sphinxAtStartPar \sphinxstyleemphasis{lon, lat} \end{itemize} \end{description}\end{quote} \end{fulllineitems} \index{polar\_to\_cartesian() (in module GeoSpatialTools.great\_circle)@\spxentry{polar\_to\_cartesian()}\spxextra{in module GeoSpatialTools.great\_circle}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.great_circle.polar_to_cartesian}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.great\_circle.}}\sphinxbfcode{\sphinxupquote{polar\_to\_cartesian}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{R}\DUrole{o}{=}\DUrole{default_value}{6371}}\sphinxparamcomma \sphinxparam{\DUrole{n}{to\_radians}\DUrole{o}{=}\DUrole{default_value}{True}}\sphinxparamcomma \sphinxparam{\DUrole{n}{normalised}\DUrole{o}{=}\DUrole{default_value}{True}}} {} \pysigstopsignatures \sphinxAtStartPar Convert from polars coordinates to cartesian. \sphinxAtStartPar Get cartesian coordinates from spherical polar coordinates. Default behaviour assumes lon and lat, so converts to radians. Set \sphinxtitleref{to\_radians=False} if the coordinates are already in radians. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{R}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Radius of sphere. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{to\_radians}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Convert lon and lat to radians. \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{normalised}} (\sphinxstyleliteralemphasis{\sphinxupquote{bool}}) \textendash{} Return normalised vector (ignore R value). \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar x, y, z cartesian coordinates. \sphinxlineitem{Return type} \sphinxAtStartPar (float, float, float) \end{description}\end{quote} \end{fulllineitems} \index{module@\spxentry{module}!GeoSpatialTools.distance\_metrics@\spxentry{GeoSpatialTools.distance\_metrics}}\index{GeoSpatialTools.distance\_metrics@\spxentry{GeoSpatialTools.distance\_metrics}!module@\spxentry{module}} \section{Distance Metrics} \label{\detokenize{users_guide:distance-metrics}}\label{\detokenize{users_guide:module-GeoSpatialTools.distance_metrics}} \sphinxAtStartPar Functions for computing navigational information. Can be used to add navigational information to DataFrames. \index{bearing() (in module GeoSpatialTools.distance\_metrics)@\spxentry{bearing()}\spxextra{in module GeoSpatialTools.distance\_metrics}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.distance_metrics.bearing}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.distance\_metrics.}}\sphinxbfcode{\sphinxupquote{bearing}}} {\sphinxparam{\DUrole{n}{lon0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lon1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat1}}} {} \pysigstopsignatures \sphinxAtStartPar Compute the bearing of a track from (lon0, lat0) to (lon1, lat1). \sphinxAtStartPar Duplicated from geo\sphinxhyphen{}py \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}\sphinxstyleliteralemphasis{\sphinxupquote{,}}) \textendash{} Longitude of start point \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}\sphinxstyleliteralemphasis{\sphinxupquote{,}}) \textendash{} Latitude of start point \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}\sphinxstyleliteralemphasis{\sphinxupquote{,}}) \textendash{} Longitude of target point \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}\sphinxstyleliteralemphasis{\sphinxupquote{,}}) \textendash{} Latitude of target point \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar \sphinxstylestrong{bearing} \textendash{} The bearing from point (lon0, lat0) to point (lon1, lat1) in degrees. \sphinxlineitem{Return type} \sphinxAtStartPar float \end{description}\end{quote} \end{fulllineitems} \index{destination() (in module GeoSpatialTools.distance\_metrics)@\spxentry{destination()}\spxextra{in module GeoSpatialTools.distance\_metrics}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.distance_metrics.destination}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.distance\_metrics.}}\sphinxbfcode{\sphinxupquote{destination}}} {\sphinxparam{\DUrole{n}{lon}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat}}\sphinxparamcomma \sphinxparam{\DUrole{n}{bearing}}\sphinxparamcomma \sphinxparam{\DUrole{n}{distance}}} {} \pysigstopsignatures \sphinxAtStartPar Compute destination of a great circle path. \sphinxAtStartPar Compute the destination of a track started from ‘lon’, ‘lat’, with ‘bearing’. Distance is in units of km. \sphinxAtStartPar Duplicated from geo\sphinxhyphen{}py \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of initial position \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of initial position \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{bearing}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Direction of track \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{distance}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Distance to travel \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar \sphinxstylestrong{destination} \textendash{} Longitude and Latitude of final position \sphinxlineitem{Return type} \sphinxAtStartPar tuple{[}float, float{]} \end{description}\end{quote} \end{fulllineitems} \index{gcd\_slc() (in module GeoSpatialTools.distance\_metrics)@\spxentry{gcd\_slc()}\spxextra{in module GeoSpatialTools.distance\_metrics}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.distance_metrics.gcd_slc}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.distance\_metrics.}}\sphinxbfcode{\sphinxupquote{gcd\_slc}}} {\sphinxparam{\DUrole{n}{lon0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lon1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat1}}} {} \pysigstopsignatures \sphinxAtStartPar Compute great circle distance on earth surface between two locations. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 1 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 1 \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar \sphinxstylestrong{dist} \textendash{} Great circle distance between position 0 and position 1. \sphinxlineitem{Return type} \sphinxAtStartPar float \end{description}\end{quote} \end{fulllineitems} \index{haversine() (in module GeoSpatialTools.distance\_metrics)@\spxentry{haversine()}\spxextra{in module GeoSpatialTools.distance\_metrics}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.distance_metrics.haversine}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.distance\_metrics.}}\sphinxbfcode{\sphinxupquote{haversine}}} {\sphinxparam{\DUrole{n}{lon0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lon1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat1}}} {} \pysigstopsignatures \sphinxAtStartPar Compute Haversine distance between two points. \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 1 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 1 \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar \sphinxstylestrong{dist} \textendash{} Haversine distance between position 0 and position 1. \sphinxlineitem{Return type} \sphinxAtStartPar float \end{description}\end{quote} \end{fulllineitems} \index{midpoint() (in module GeoSpatialTools.distance\_metrics)@\spxentry{midpoint()}\spxextra{in module GeoSpatialTools.distance\_metrics}} \begin{fulllineitems} \phantomsection\label{\detokenize{users_guide:GeoSpatialTools.distance_metrics.midpoint}} \pysigstartsignatures \pysiglinewithargsret {\sphinxcode{\sphinxupquote{GeoSpatialTools.distance\_metrics.}}\sphinxbfcode{\sphinxupquote{midpoint}}} {\sphinxparam{\DUrole{n}{lon0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat0}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lon1}}\sphinxparamcomma \sphinxparam{\DUrole{n}{lat1}}} {} \pysigstopsignatures \sphinxAtStartPar Compute the midpoint of a great circle track \begin{quote}\begin{description} \sphinxlineitem{Parameters}\begin{itemize} \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat0}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 0 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lon1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Longitude of position 1 \item {} \sphinxAtStartPar \sphinxstyleliteralstrong{\sphinxupquote{lat1}} (\sphinxstyleliteralemphasis{\sphinxupquote{float}}) \textendash{} Latitude of position 1 \end{itemize} \sphinxlineitem{Returns} \sphinxAtStartPar Positions of midpoint between position 0 and position 1 \sphinxlineitem{Return type} \sphinxAtStartPar lon, lat \end{description}\end{quote} \end{fulllineitems} \renewcommand{\indexname}{Python Module Index} \begin{sphinxtheindex} \let\bigletter\sphinxstyleindexlettergroup \bigletter{g} \item\relax\sphinxstyleindexentry{GeoSpatialTools.distance\_metrics}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.distance_metrics}} \item\relax\sphinxstyleindexentry{GeoSpatialTools.great\_circle}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.great_circle}} \item\relax\sphinxstyleindexentry{GeoSpatialTools.kdtree}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.kdtree}} \item\relax\sphinxstyleindexentry{GeoSpatialTools.neighbours}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.neighbours}} \item\relax\sphinxstyleindexentry{GeoSpatialTools.octtree}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.octtree}} \item\relax\sphinxstyleindexentry{GeoSpatialTools.quadtree}\sphinxstyleindexpageref{users_guide:\detokenize{module-GeoSpatialTools.quadtree}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}