The document discusses various modules in Drupal that enable web mapping capabilities. It describes the Geofield module, which stores and displays geospatial data as fields that can then be used in Views to show the data on a map. It also covers the Leaflet and OpenLayers modules, with Leaflet being newer and lighter than OpenLayers. The OpenLayers module allows for more customizations but requires two Views to implement - one for the data and one for the map. The document provides an overview of how these modules can be used to build web maps with Drupal.
This document provides a whirlwind tour of GIS concepts in 25 slides. It defines GIS as geographical information science and discusses data capture methods like surveys and remote sensing. It explores analysis and visualization techniques, different GIS platforms, common spatial phenomena modeled in GIS, and modeling approaches. The document also covers GIS history, software, data types, attributes, overlay operations, coordinate reference systems, common file formats, data storage, open source GIS, web GIS, and potential future directions for GIS including location-based services and cloud computing.
This document provides a whirlwind tour of GIS concepts in 25 slides. It defines GIS as geographical information science and discusses data capture techniques including remote sensing and sensor networks. It explores analysis and visualization of spatial data in 2D and 3D maps and how visualization can enable further analysis. The document also briefly outlines the history of GIS software and formats, as well as concepts like spatial data types, attributes, modeling frameworks, coordinate reference systems, and industry standard and open source GIS tools. It concludes with discussions of future directions for GIS including location-based services, sensors, cloud computing, and social implications.
This document provides a whirlwind tour of GIS concepts in 25 slides. It defines GIS as geographical information science and discusses data capture methods like remote sensing and GPS. It explains how spatial data can be analyzed and visualized in 2D and 3D maps. Common data types in GIS like vector and raster data are introduced along with concepts like attributes, overlay operations, and coordinate reference systems. Popular GIS software like ArcGIS and open source options are overviewed. The document concludes by discussing emerging areas in GIS like web mapping, mobile apps, sensor networks, and cloud computing.
This document provides a whirlwind tour of GIS concepts in 25 slides. It defines GIS as geographical information science and discusses data capture methods like surveys and remote sensing. It explains how GIS allows for analysis and visualization of spatial data in 2D and 3D maps. Key aspects of GIS covered include its history, common data types of vector and raster, attributes, modeling frameworks, data storage, open source options, and future directions such as location-based services and cloud computing. The document aims to quickly introduce fundamental GIS concepts.
The document provides an introduction to Geographic Information Systems (GIS) and the open-source GIS software QGIS. It discusses John Snow's 1854 map of a cholera outbreak in London and how it helped establish epidemiology. It then defines GIS and describes common components like data input/output, data models, and editing tools. The document also demonstrates how to perform tasks in QGIS like adding vector and raster layers, importing GPX files, editing shapefiles, creating new layers, merging shapefiles, and filtering/separating data.
This document provides an overview of geographic information systems (GIS). It defines GIS as software that can acquire, store, retrieve, and analyze spatial and non-spatial data describing physical objects on Earth. The document discusses the history of GIS, common software packages, data structures and management, and basic GIS operations such as data access, analysis through overlaying layers, and map production.
Geographic information system and remote sensingchala hailu
油
ArcMap is where you create maps and access most of the ArcGIS functionality. Remote sensing is an instrument based of observing an object at a far distance without direct contact.
Looking into the past - feature extraction from historic maps using Python, O...James Crone
油
Tutorial presentation providing an overview of extracting geospatial features from scanned historic maps in an automated fashion using Python, OpenCV and PostGIS.
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Shaun Lewis
油
Paul Shapley gave a presentation on processing Landsat 8 multi-spectral images with GRASS tools and the potential of the QGIS-GRASS plugin. He discussed his background and work with QGIS and GRASS for mapping at Neath Port Talbot Borough Planning Department. He provided an overview of Landsat 8 data and demonstrated using GRASS modules to classify Landsat images and analyze changes over time. Shapley also discussed advantages and updates to the QGIS-GRASS plugin, and future projects using GRASS and 3D data for his local development plan monitoring and property mapping.
This document provides an overview of geospatial technology and geographic information systems (GIS). It discusses how GIS integrates data from GPS and remote sensing to store, analyze and manage spatial data referenced to locations on Earth. The key aspects covered include GIS data models using vector and raster formats, representing terrain as digital terrain models (DTMs), performing analysis like overlay operations and neighborhood functions, and calculating slopes and aspects from elevation data. GIS is presented as a versatile system for solving real-world problems by linking thematic data layers based on their geographic coordinates.
An introduction to GIS Data Types. Strengths and weaknesses of raster and vector data are discussed. Also covered is the importance of topology. Concludes with a discussion of the vector-based format of OpenStreetMap data.
This is an overview of a cartographic mapping package developed at the Canberra College of Advanced Education. The package demonstrates educational and navigational applications and was produced for the semester unit Special Studies in Computing in the course for the award of Bachelor of Arts in Computing Studies.
1. Maperitive is a free desktop application that allows users to create custom map tiles for bounded areas by defining map content and styles. It exports map tiles and bitmaps that can be used on the web.
2. The presentation demonstrates how to use Maperitive to generate custom map tiles for a bounded area. This involves obtaining geographic coordinates, exporting bitmaps, editing maps, loading custom maps into Maperitive, and generating tiles.
3. Key steps include setting the bounding box, exporting PNGs, designing custom maps to match the PNG templates, generating tiles for specific zoom levels, and hosting the tiles to reference them in code using Leaflet.js.
This document provides instructions for using S Flood Global, a tool that converts 2D flood maps created in Sobek into KML files for Google Earth and Google Maps. It describes how to install S Flood Global, convert a Sobek flood map into a KML file, create a Google Map from coordinate data, and notes on coordinate conversions. It also lists training courses offered on hydrologic and hydraulic modeling software, as well as other free applications developed by the provider.
Second part of the Course "Java Open Source GIS Development - From the building blocks to extending an existing GIS application." held at the University of Potsdam in August 2011
This document discusses mapping in Drupal using the OpenLayers module. It begins by introducing OpenLayers and describing its functionality as a JavaScript framework for building map applications. It then provides an overview of Drupal and relevant mapping modules. The document outlines a three step process for creating maps: 1) adding layers, 2) setting map presets, and 3) displaying maps through Views. It provides examples and screenshots for configuring geofield data, layers, styles, and behaviors. Finally, it discusses extensions, improvements, and the status of OpenLayers for Drupal 7.
On 2D SLAM for Large Indoor Spaces: A Polygon-Based SolutionNoury Bouraqadi
油
際際滷s + comments + appendices of the PhD defense of Johann Dichtl. The validation relied on ROS and Pharo. More info and demo video at: https://noury.tech/projects/polygon-based-slam/
MapInfo Professional 12.5 and Discover3D 2014 - A brief overviewPrakher Hajela Saxena
油
MapInfo Professional and Discover3D is a complete suite of software specifically designed for geoscientists, environmentalists, and geochemists.
The software is being used in various industries today like, environment, mining, exploration, hydrology, etc.
Fourth part of the Course "Java Open Source GIS Development - From the building blocks to extending an existing GIS application." held at the University of Potsdam in August 2011
Terra formation control or how to move mountainsijcga
油
The new Uplift Model of terrain generation is generalized here and provides new possibilities for terra
formation control unlike previous fractal terrain generation methods. With the Uplift Model fine-grained
editing is possible allowing the designer to move mountains and small hills to more suitable locations
creating gaps or valleys or deep bays rather than only being able to accept the positions dictated by the
algorithm itself. Coupled with this is a compressed file storage format considerably smaller in size that the
traditional height field or height map storage requirements.
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...Kamlesh Kumar
油
This work is an effort to share Geographical Information System: Georeferencing, digitization and map making steps through QGIS 2.0.1
Georeferencing
Digitization of Topographical sheet
Point
Line
Area
Bihar Map
District Headquarters
Railway of Bihar
District Boundaries
Thematic Maps (Literacy & Sex Ratio)
This document provides an introduction to Geographic Information Systems (GIS). It defines GIS as a system designed to store, manipulate, analyze and display spatially referenced data. The key components of a GIS are hardware, software and data. Common GIS software includes desktop programs like ArcGIS and open-source options like QGIS. GIS can incorporate different types of spatial data like raster, vector and remote sensing data along with associated attribute tables. Example applications discussed are in hydrology, including watershed analysis and flood modeling.
Geographic information system and remote sensingchala hailu
油
ArcMap is where you create maps and access most of the ArcGIS functionality. Remote sensing is an instrument based of observing an object at a far distance without direct contact.
Looking into the past - feature extraction from historic maps using Python, O...James Crone
油
Tutorial presentation providing an overview of extracting geospatial features from scanned historic maps in an automated fashion using Python, OpenCV and PostGIS.
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Shaun Lewis
油
Paul Shapley gave a presentation on processing Landsat 8 multi-spectral images with GRASS tools and the potential of the QGIS-GRASS plugin. He discussed his background and work with QGIS and GRASS for mapping at Neath Port Talbot Borough Planning Department. He provided an overview of Landsat 8 data and demonstrated using GRASS modules to classify Landsat images and analyze changes over time. Shapley also discussed advantages and updates to the QGIS-GRASS plugin, and future projects using GRASS and 3D data for his local development plan monitoring and property mapping.
This document provides an overview of geospatial technology and geographic information systems (GIS). It discusses how GIS integrates data from GPS and remote sensing to store, analyze and manage spatial data referenced to locations on Earth. The key aspects covered include GIS data models using vector and raster formats, representing terrain as digital terrain models (DTMs), performing analysis like overlay operations and neighborhood functions, and calculating slopes and aspects from elevation data. GIS is presented as a versatile system for solving real-world problems by linking thematic data layers based on their geographic coordinates.
An introduction to GIS Data Types. Strengths and weaknesses of raster and vector data are discussed. Also covered is the importance of topology. Concludes with a discussion of the vector-based format of OpenStreetMap data.
This is an overview of a cartographic mapping package developed at the Canberra College of Advanced Education. The package demonstrates educational and navigational applications and was produced for the semester unit Special Studies in Computing in the course for the award of Bachelor of Arts in Computing Studies.
1. Maperitive is a free desktop application that allows users to create custom map tiles for bounded areas by defining map content and styles. It exports map tiles and bitmaps that can be used on the web.
2. The presentation demonstrates how to use Maperitive to generate custom map tiles for a bounded area. This involves obtaining geographic coordinates, exporting bitmaps, editing maps, loading custom maps into Maperitive, and generating tiles.
3. Key steps include setting the bounding box, exporting PNGs, designing custom maps to match the PNG templates, generating tiles for specific zoom levels, and hosting the tiles to reference them in code using Leaflet.js.
This document provides instructions for using S Flood Global, a tool that converts 2D flood maps created in Sobek into KML files for Google Earth and Google Maps. It describes how to install S Flood Global, convert a Sobek flood map into a KML file, create a Google Map from coordinate data, and notes on coordinate conversions. It also lists training courses offered on hydrologic and hydraulic modeling software, as well as other free applications developed by the provider.
Second part of the Course "Java Open Source GIS Development - From the building blocks to extending an existing GIS application." held at the University of Potsdam in August 2011
This document discusses mapping in Drupal using the OpenLayers module. It begins by introducing OpenLayers and describing its functionality as a JavaScript framework for building map applications. It then provides an overview of Drupal and relevant mapping modules. The document outlines a three step process for creating maps: 1) adding layers, 2) setting map presets, and 3) displaying maps through Views. It provides examples and screenshots for configuring geofield data, layers, styles, and behaviors. Finally, it discusses extensions, improvements, and the status of OpenLayers for Drupal 7.
On 2D SLAM for Large Indoor Spaces: A Polygon-Based SolutionNoury Bouraqadi
油
際際滷s + comments + appendices of the PhD defense of Johann Dichtl. The validation relied on ROS and Pharo. More info and demo video at: https://noury.tech/projects/polygon-based-slam/
MapInfo Professional 12.5 and Discover3D 2014 - A brief overviewPrakher Hajela Saxena
油
MapInfo Professional and Discover3D is a complete suite of software specifically designed for geoscientists, environmentalists, and geochemists.
The software is being used in various industries today like, environment, mining, exploration, hydrology, etc.
Fourth part of the Course "Java Open Source GIS Development - From the building blocks to extending an existing GIS application." held at the University of Potsdam in August 2011
Terra formation control or how to move mountainsijcga
油
The new Uplift Model of terrain generation is generalized here and provides new possibilities for terra
formation control unlike previous fractal terrain generation methods. With the Uplift Model fine-grained
editing is possible allowing the designer to move mountains and small hills to more suitable locations
creating gaps or valleys or deep bays rather than only being able to accept the positions dictated by the
algorithm itself. Coupled with this is a compressed file storage format considerably smaller in size that the
traditional height field or height map storage requirements.
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...Kamlesh Kumar
油
This work is an effort to share Geographical Information System: Georeferencing, digitization and map making steps through QGIS 2.0.1
Georeferencing
Digitization of Topographical sheet
Point
Line
Area
Bihar Map
District Headquarters
Railway of Bihar
District Boundaries
Thematic Maps (Literacy & Sex Ratio)
This document provides an introduction to Geographic Information Systems (GIS). It defines GIS as a system designed to store, manipulate, analyze and display spatially referenced data. The key components of a GIS are hardware, software and data. Common GIS software includes desktop programs like ArcGIS and open-source options like QGIS. GIS can incorporate different types of spatial data like raster, vector and remote sensing data along with associated attribute tables. Example applications discussed are in hydrology, including watershed analysis and flood modeling.
Dimensionality Reduction and feature extraction.pptxSivam Chinna
油
Dimensionality reduction, or dimension reduction, is the transformation of data from a high-dimensional space into a low-dimensional space so that the low-dimensional representation retains some meaningful properties of the original data, ideally close to its intrinsic dimension.
The document discusses NumPy, a package for scientific computing that provides tools for handling n-dimensional arrays. It describes NumPy's broadcasting rules which allow operations on arrays of different shapes, fancy indexing using arrays of indices, and indexing with boolean arrays. Broadcasting allows operations on arrays with incompatible shapes by expanding dimensions of size one. Fancy indexing extracts elements from an array using arrays of integer indices. Boolean indexing selects elements where a boolean mask is True.
Pandas is a Python library used for data analysis and manipulation. It allows for cleaning, analyzing, and organizing data in DataFrames which can be created from various inputs like lists, dicts, and NumPy arrays. Pandas provides tools for reading external data files into DataFrames using functions like read_csv() and for concatenating multiple DataFrames.
Pandas is a Python library used for data manipulation and analysis. It allows users to load, clean, and transform data stored in various file formats like CSV and JSON files into DataFrames. DataFrames are the primary data structure in Pandas and act like a spreadsheet, allowing access and manipulation of data in both rows and columns. Some key operations on DataFrames include viewing data, getting information about the data types and memory usage, handling duplicate rows, understanding variable distributions, and converting data between file formats.
Clustering is the process of grouping similar data points together. There are different types of clustering algorithms like k-means clustering, DBSCAN clustering, and self-organizing maps. K-means clustering divides data into k groups by finding cluster centroids. It assigns data points to the nearest centroid and recalculates centroids until clusters stabilize. DBSCAN clustering finds core data points that have many nearby points and groups them into clusters based on density. Self-organizing maps use neural networks to place similar data objects close to each other on a 2D grid based on their similarity to centroid values that are updated during training.
Anomaly detection techniques use statistical methods or data mining to identify outliers in data. Distance-based techniques identify outliers based on their distance from other data points, while density-based techniques find outliers in low-density areas compared to normal data points in high-density areas. Another method is local outlier factor, which can detect outliers in varying density regions by measuring how isolated objects are from their neighbors.
Neural networks are inspired by biological neurons and are used to learn relationships in data. The document defines an artificial neural network as a large number of interconnected processing elements called neurons that learn from examples. It outlines the key components of artificial neurons including weights, inputs, summation, and activation functions. Examples of neural network architectures include single-layer perceptrons, multi-layer perceptrons, convolutional neural networks, and recurrent neural networks. Common applications of neural networks include pattern recognition, data classification, and processing sequences.
Microsoft Power BI is a business analytics service that allows users to visualize data and share insights across an organization, or embed them in apps or websites, offering a consolidated view of data from both on-premises and cloud sources
brightonSEO - Metehan Yesilyurt - Generative AI & GEO: the new SEO race and h...Metehan Yeilyurt
油
This talk is for SEO experts, consultants, leads, managers, founders and growth marketers
SEO has evolved significantly over the years; when the user first entered the field, tactics like meta keywords and backlink packages were commonplace. With the rapid advancements in AI, their approach to SEO has transformed, necessitating constant adaptation and refinement of techniques.
As tools like Perplexity, SearchGPT emerge, the landscape will shift further with new algorithms, rankings, and optimization strategies, pushing the boundaries of SEO expertise even further.
Metehan is a seasoned Growth Lead with extensive experience in SEO, recognized for driving impactful growth through AI-driven solutions. Known for his unique expertise, he consistently delivers data-backed, effective organic growth strategies.
SQL (Structured Query Language) is the foundation of data analytics. If you're an aspiring analyst, data scientist, or business intelligence professional, mastering SQL is non-negotiable. In this presentation, youll discover the top 10 most essential SQL queries used by professionals in real-world scenarios. From SELECT and WHERE statements to powerful JOINs, aggregations (GROUP BY, SUM, COUNT), and subqueries, this crash course will teach you how to extract actionable insights from large datasets. Learn to solve practical data problems and make data-driven decisions with confidencewithout needing a CS degree. Whether you're working with MySQL, PostgreSQL, or SQL Server, these query patterns will give you a strong, job-ready foundation in analytics.
Statistics for Management - standard deviation.pptxJeya Sree
油
Steel rods are manufactured to be 3 inches in diameter, but they are acceptable if they are inside the limits of 2.99 inches and 3.01 inches. It is observed that 5% are rejected as oversize and 5% are rejected as undersize. Assuming that the diameters are normally distributed, how will you find the standard deviation of the distribution. Further how will you find the proportion of rejects would be, if the permissible limits were widened to 2.985 to 3.015 inches? Explain
Z-Table is used.
cPanel Dedicated Server Hosting at Top-Tier Data Center comes with a Premier ...soniaseo850
油
cPanel Dedicated Server Hosting at Top-Tier Data Center comes with a Premier Metal License. Enjoy powerful performance, full control & enhanced security.
A key metric for current SaaS companies is Weekly Active Users. Its also a dangerous one because the graph we use to represent it, even when it looks up and to the right, can be hiding a growth ticking bomb.
This bomb is the byproduct of how we think and how we try to improve Activation, that stage that goes from Signup to happy loyal user.
In this talk, you will learn a new way to think about Activation:
- What are the users trying to achieve during this period?
-
- What is blocking them in their journey to happy users?
- How can you solve the blockers without creating bigger problems down the funnel?
- How to measure all of that so you have an accurate depiction of your current activation.
Exploratory data analysis (EDA) is used by data scientists to analyze and inv...jimmy841199
油
EDA review" can refer to several things, including the European Defence Agency (EDA), Electronic Design Automation (EDA), Exploratory Data Analysis (EDA), or Electron Donor-Acceptor (EDA) photochemistry, and requires context to understand the specific meaning.
The data science lifecycle is a structured approach to solving problems using data. This detailed presentation walks you through every stepstarting with data collection and cleaning, followed by analysis, visualization, model building, and finally prediction and evaluation. Whether you're new to the field or brushing up your skills, youll get a full picture of how analysts and data scientists work. We explain common tools and techniques used in each phase, including Python, pandas, NumPy, scikit-learn, and visualization libraries like Matplotlib and Seaborn. Youll also learn how these steps apply to real-world projects and how to structure your portfolio to reflect this process when job hunting.
2. 2
What is Geopandas?
GeoPandas is an open-source project to make
working with geospatial data in python easier.
GeoPandas is one of the most satisfying Python
packages to use because it produces a tangible,
visible output that is directly linked to the real world.
Here we will be exploring the method to create a geo
map and visualize data over it, using shapefiles(.shp)
and some other Python libraries.
3. 3
The core data structure in GeoPandas
GeoDataFrame, a subclass of pandas.
DataFrame, that can store geometry columns and perform
spatial operations.
The geopandas.GeoSeries, a subclass of pandas.Series,
handles the geometries.
Therefore, your GeoDataFrame is a combination of
pandas.Series, with traditional data (numerical, boolean, text
etc.), and geopandas.GeoSeries, with geometries (points,
polygons etc.).
You can have as many columns with geometries as you wish;
theres no limit typical for desktop GIS software.
5. 5
The core data structure in GeoPandas
Each GeoSeries can contain any geometry type (you can even
mix them within a single array) and has a GeoSeries.crs
attribute, which stores information about the projection (CRS
stands for Coordinate Reference System).
Therefore, each GeoSeries in a GeoDataFrame can be in a
different projection, allowing you to have, for example,
multiple versions (different projections) of the same geometry.
Only one GeoSeries in a GeoDataFrame is considered the
active geometry, which means that all geometric operations
applied to a GeoDataFrame operate on this active column.
6. 6
world map projections.
1. Mercator
This projection was developed by Gerardus Mercator back in 1569
for navigational purposes.
Its ability to represent lines of constant course from coast to coast
made it the perfect map for sailing the seas.
Its popularity was so great that it became used as a geographic
teaching aid even though the projection grossly distorts countries
sizes.
This is at its worst the closer you are to the poles. Greenland is 550%
too big, it should fit into Africa 14 times!
7. 7
Vector Data: OpenGIS Simple Features / OCG Simple Feature Access
Used in spatial databases (Postgresql/PostGIS), GIS,
WKT (Well known Text):
Point, Multipoint
LineString, MultiLineString
Polygon, MultiPolygon
GeometryCollection
(TIN, Circle, Curve, Triangle, Surface, PolyhedralSurface,
)
map projections.
10. 10
world map projections.
1. Mercator
This projection was developed by
Gerardus Mercator back in 1569 for
navigational purposes.
Its ability to represent lines of constant
course from coast to coast made it the
perfect map for sailing the seas.
Its popularity was so great that it
became used as a geographic teaching
aid even though the projection grossly
distorts countries sizes.
This is at its worst the closer you are to
the poles. Greenland is 550% too big, it
should fit into Africa 14 times!
11. 11
Map projections.
2. Robinson
This map is known as a compromise, it shows neither the shape or land
mass of countries correct.
Arthur Robinson developed it in 1963 using a more visual trial and error
development.
Our Classic world map uses the Robinson projection and is a contemporary
tribute to the familiar schoolroom map and is perfect for map-lovers of all
ages..
12. 12
map projections
3. Dymaxion Map
This projection was released by R Buckminster Fuller in 1954 after several
decades working on it.
The world is projected onto the surface of a icosahedron, allowing it to be
unfolded and flattened in two dimensions.
It is said to represent the Earths continents as one island.
13. 13
map projections
4. Gall-Peters
This is a cylindrical world map projection, that regains accuracy in surface
area.
It is named after James Gall and Arno Peters. Whilst Gall, first described
the projection in 1855 it was not until 1973 when Peters, began to heavily
market the projection as the Peters World Map that it became popular.
14. 14
map projections
5. Sinu-Mollweide
Developed in 1953 by Allen K Philbrick, this projection fuses the
Sinusoidal projection , which was first used in the 16th Century, with Karl
Brandan Mollweide's map of 1805 and challenges our assumption of how
the flattened globe should look.
Still an equal area projection that maintains fidelity of area, we like this
projection for its bold graphic view.
15. 15
map projections
6 Winkel Tripel
A globe that is projected onto a flat surface giving it curved lines of latitude and
curved meridians.
The projection, by Oswald Winkel in1921 was developed with the goal of minimizing
the three kinds of distortion: area, direction and distance.
Thus it became the Tripel Projection (German for triple).
The projection is neither equal-area nor conformal, its main feature is that all of the
parallels are curved except for the straight poles and equator.
This gives a lovely spherical feeling to this two dimensional map.
17. 17
GeoPandas packages:
pandas
shapely
fiona
pyproj
packaging
Further, matplotlib is an optional dependency,
required for plotting.
GeoPandas using the conda package manager.
18. 18
Reading and writing files
Assuming you have a file containing both data and geometry
(e.g. GeoPackage, GeoJSON, Shapefile), you can read it using
geopandas.read_file(),
which automatically detects the filetype and creates a
GeoDataFrame.
This tutorial uses the "nybb" dataset, a map of New York
boroughs, which is available through the geodatasets package.
Therefore, we use geodatasets.get_path() to download the
dataset and retrieve the path to the local copy.
19. 19
Reading and writing files
Assuming you have a file containing both data and geometry
(e.g. GeoPackage, GeoJSON, Shapefile), you can read it using
geopandas.read_file(),
which automatically detects the filetype and creates a
GeoDataFrame.
This tutorial uses the "nybb" dataset, a map of New York
boroughs, which is available through the geodatasets package.
Therefore, we use geodatasets.get_path() to download the
dataset and retrieve the path to the local copy.
20. 20
Writing files
To write a GeoDataFrame back to file use
GeoDataFrame.to_file().
The default file format is Shapefile, but you can
specify your own with the driver keyword.
21. 21
Simple accessors and methods
Now we have our GeoDataFrame and can start working with
its geometry.
Since there was only one geometry column in the New York
Boroughs dataset, this column automatically becomes the
active geometry and spatial methods used on the
GeoDataFrame will be applied to the "geometry" column.
22. 22
Simple accessors and methods
Measuring area
To measure the area of each polygon (or MultiPolygon in this
specific case), access the GeoDataFrame.area attribute,
which returns a pandas.Series.
Note that GeoDataFrame.area is just GeoSeries.area applied to
the active geometry column.
23. 23
Simple accessors and methods
Getting polygon boundary and centroid
To get the boundary of each polygon (LineString), access the
GeoDataFrame.boundary:
Since we have saved boundary as a new column, we now have
two geometry columns in the same GeoDataFrame.
24. 24
Simple accessors and methods
Getting polygon boundary and centroid
To get the boundary of each polygon (LineString), access the
GeoDataFrame.boundary:
Since we have saved boundary as a new column, we now have
two geometry columns in the same GeoDataFrame.
25. 25
Simple accessors and methods
Measuring distance
We can also measure how far each centroid is from the first centroid
location.
Note that geopandas.GeoDataFrame is a subclass of pandas.DataFrame, so
we have all the pandas functionality available to use on the geospatial
dataset we can even perform data manipulations with the attributes and
geometry information together.
26. 26
Making maps
GeoPandas can also plot maps, so we can check how the
geometries appear in space.
To plot the active geometry, call GeoDataFrame.plot().
To color code by another column, pass in that column as the
first argument.
In the example below, we plot the active geometry column and
color code by the "area" column. We also want to show a
legend (legend=True).
28. 28
Making maps
You can also explore your data interactively using
GeoDataFrame.explore(), which behaves in the same way
plot() does but returns an interactive map instead.
29. 29
Making maps
Switching the active geometry
(GeoDataFrame.set_geometry) to centroids, we can plot the
same data using point geometry..
30. 30
Making maps
And we can also layer both GeoSeries on top of each other.
We just need to use one plot as an axis for the other.
31. 31
Step 1 : Installing GeoPandas and
Shapely
need to install the GeoPandas and Shapely libraries in order to
plot a map, and these libraries do not come with the Anaconda
download.
through the conda-forge channel with the following command
from your terminal
or alternatively
Shapely can be pip installed with the command
conda install -c conda-forge geopandas
pip install geopandas
pip install shapely
32. 32
Importing the libraries
Importing the libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import geopandas as gpd
import shapefile as shp
from shapely.geometry import Point
sns.set_style('whitegrid')
33. 33
Load the data
Use india-polygon.shp shape file to plot India map
Load the data into a GeoDataFrame as shown below.
fp = r india-polygon.shp'
map_df = gpd.read_file(fp)
map_df_copy = gpd.read_file(fp)
map_df.head()
34. 34
Plotting the Shapefiles
One nice thing about
downloading a
GeoDataFrame, is that
weve already got enough
info to make a basic plot.
map_df.plot()
36. 36
data of the number of
landslides that have happened
in each state over the years
37. 37
Merge the data
We can now merge this above state data which contains
landslide information with map_df shapefile. We will use the
State column of both the data frames for merging purposes.
#Merging the data
merged = map_df.set_index('st_nm').join(state_df.set_index('State'))
merged['Count'] = merged['Count'].replace(np.nan, 0)
merged.head()
38. 38
Plotting the data on the Shapefile
#Create figure and axes for Matplotlib and set the title
fig, ax = plt.subplots(1, figsize=(10, 10))
ax.axis('off')ax.set_title('Number of landslides in India state-wise',
fontdict={'fontsize': '20', 'fontweight' : '10'})# Plot the figure
merged.plot(column='Count',cmap='YlOrRd', linewidth=0.8, ax=ax,
edgecolor='0',legend=True,markersize=[39.739192, -104.990337],
legend_kwds={'label': "Number of landslides"})
40. 40
plot the latitudes and longitudes
We can also plot the latitudes and longitudes
of the occurred landslides on the map along
with the names of states as shown below.
For this, you will need to find the shapefile
data for Indian states and their latitudes and
longitudes.
have to plot data points on the map..