Skip to main content

Uses Hough Transform and clustering to link line segments and for feature extraction of linear and radial structures

Project description

Welcome to LinkingLines!

DOI

PyPI

ReadtheDocs

License

1. Introduction

Welcome to the documentation for our Python module that performs the Hough Transform on line data from a CSV, clusters it using Agglomerative Clustering, and provides functionality to export the results into a CSV file. This module also includes custom plotting scripts and feature extraction methods to help you analyze and visualize your data effectively.

This code was used to create the results published in Kubo Hutchison et al., 2023. Initially, it was designed to link together mapped dike segments in Cartesian space to find their true lengths. This code can be applied to any linear features including roads, fractures, and other types of linear data.

  • Data Clustering: Apply Agglomerative Clustering to group similar data points, this can be used for data reduction, analysis, and mapping .

  • Data Visualization: Custom plotting scripts help you visualize and analyze your data, making it easier to identify patterns and anomalies.

  • Feature Extraction: Extract meaningful features from clustered data to perform further analysis, such as linear or radial type features.

Full documentation can be found on ReadTheDocs

2. Installation

To use this module, make sure you have Python installed (preferably Python 3.x). You can install the required packages using pip:

pip install linkinglines

3. Quick Start

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import linkinglines as ll

data=pd.read_csv('path/to/data')
theta,rho,xc,yc=ll.HoughTransform(data)
data['theta']=theta
data['rho']=rho

dtheta=2 #degrees
drho=500 #meters

dikeset, Z=ll.AggCluster(data)
lines,evaluation=examineCluster(data)
fig,ax=DotsLines(lines, ColorBy='AvgTheta')

Follow this indepth tutorial to get started!

You are now ready to utilize the power of Hough Line Transform, Agglomerative Clustering, and custom plotting in your data analysis projects. If you have any questions or need further assistance, please refer to the detailed documentation or contact our support team.

Happy coding!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LinkingLines-2.0.1.tar.gz (54.9 kB view hashes)

Uploaded Source

Built Distribution

LinkingLines-2.0.1-py3-none-any.whl (54.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page