Presentation On Scipy Python Module

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Kathmandu University

Department
Department Of Geomatics
of Civil Engineering
and Geomatics Engineering

Presentation on Scipy Python Module

Presented By: Presented To:

Bhisma Dhungana (10) Asst. Prof. Uma Shankar Panday


CONTENT
 Introduction to Module
 Introduction to SciPy
 Numpy vs SciPy
 Installation of SciPy
 Delaunay Triangle
 Convex hull
 Distance Calculation

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
INTRODUCTION TO MODULE
 A python file consisting python code
 It is single or collection files that are imported under single import
 Module consist of definitions, classes and variables
 A module allows us to logically organize our Python code
 A module helps to group relatable codes,
i.e helps to understand and use code with ease
  A module can also include runnable code.

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
INTRODUCTION TO SCIPY
 SciPy is a collection of mathematical algorithms and convenience functions.
 It is built on the NumPy extension of Python.
 provides user with high-level commands and classes for manipulating and visualizing data.
 SciPy helps to develop sophisticated programs and specialized applications.
 It contains different sub-packages:

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
Why use SciPy??
 SciPy contains varieties of sub packages which help to solve the most common issue related to
Scientific Computation.
 SciPy is one of the most used Scientific library 
 Easy to use and understand as well as fast computational power.
 It can operate on an array of NumPy library.

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
SCIPY VS NUMPY
SciPy NumPy

SciPy is built in top of the NumPy Numpy is written in C and use for
mathematical or numeric calculation.
SciPy is a fully-featured version of Linear Numpy is the most useful library for Data
Algebra while Numpy contains only a few Science to perform basic calculations.
features.
Most new Data Science features are available Numpy is the most useful library for Data
in Scipy rather than Numpy. Science to perform basic calculations

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
INSTALLATION OF SCIPY
 C:\windows\system32> pip install scipy

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
UPGRADE IT IF NEEDED
C:\windows\system32> python –m pip install –upgrade pip

Department of Geomatics Engineering


INSTALL MATPLOTLIB
C:\windows\system32> pip install matplotlib

Department of Geomatics Engineering


SPATIAL USE OF SCIPY
Spatial Algorithm and Data structures

 Delaunay Triangulation
 Convex Hull
 Distance Calculation

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DELAUNAY TRIANGULATION
 The triangulation was invented by Boris Delaunay in 1934.
 looks for nearest neighboring points.
 A Delaunay triangulation is the set of lines joining a set of points together
such that each point is joined to its nearest neighbors.
 Delaunay triangulations tend to avoid skinny triangles.
 Delaunay triangulations concept is used in converting points to raster. i.e
TINs(Triangulated irregular Networks), which is used for creating contour in
GIS.
 Delaunay maximizes the sequence of angles in lexicographical order.

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DELAUNAY TRIANGULATION

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DELAUNAY TRIANGULATION

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DELAUNAY TRIANGULATION

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DELAUNAY TRIANGLE

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
CONVEX HULL
 A convex hull is the smallest convex polygon containing all the given points.
 It is a ubiquitous(i.e appearing everywhere at once) structure in
computational geometry.
 Convex hull can be used for area computation, pattern recognition, image
processing, 

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
CONVEX HULL

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
CONVEX HULL

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
DISTANCE CALCULATION
 Compute distance between each pair of the two collections of inputs.
using Scipy.spatial
 Distance calculation is used in gis application and surveying either for
buffering, coordinate calculation.

Department of Geomatics Engineering


DISTANCE CALCULATION

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
REFERENCES

 org, S. (n.d.). Retrieved from Scipy.org: https://docs.scipy.org/doc/scipy-1.0.0/reference/index.html


 org, S. (n.d.). Retrieved from Scipy.org:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.cdist.html
 overflow, S. (n.d.). Retrieved from Stackoverflow.org: https://stackoverflow.com/questions/19873596
 Sommer, P. (n.d.). A gentle introduction to the convex hull. Retrieved from
https://medium.com/@pascal.sommer.ch/a-gentle-introduction-to-the-convex-hull-problem-62dfcabee90c

Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University
Department
Department of Geomatics
of Civil Engineering
and Geomatics Engineering
Kathmandu University

You might also like