SlideShare a Scribd company logo
1 of 12
Download to read offline
Introduction Using cleangeo Conclusions & Perspectives
cleangeo - Cleaning Geometries from Spatial
Objects in RR
Emmanuel Blondel
emmanuel.blondel1@gmail.com
CEO - International Consultant
September 30, 2015
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
Outline
1 Introduction
2 Using cleangeo
3 Conclusions & Perspectives
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
R spatial data processing
RR provides a lot of facilities to read and manipulate spatial data.
We can mention some packages such as:
sp, which provides a set of classes and methods to handle
spatial objects
maptools, a set of tools for reading and handling Spatial
Objects
rgdal, which provides an interface to the well-known
Geospatial Data Abstraction Library (GDAL)
rgeos, which provides an interface to the widely used
Geometry Engine, Open Source (GEOS) library.
The main problem comes when spatial objects did not have valid
geometries, or expose different types of geometry errors (e.g.
orphaned holes), which prevents any easy spatial data processing.
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
A package for cleaning geometries from spatial objects in R
cleangeo was built in order:
to facilitate handling and catching rgeos geometry issues
to provide an utility to clean the spatial objects.
cleangeo appears to a useful tool to check, and eventual clean
the data prior any spatial data processing.
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
Outline
1 Introduction
2 Using cleangeo
3 Conclusions & Perspectives
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
Usage - Installing cleangeo
cleangeo can be installed:
from CRAN
R> install.packages("cleangeo")
from Github, for latest updates (requires devtools package)
R> require(devtools)
R> install_github("eblondel/cleangeo")
Load cleangeo in R using:
R> require(cleangeo)
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
Usage - Identify geometry issues in spatial objects
Let’s load some sample data in RR:
R> require(maptools)
R> file <- system.file("extdata", "example.shp", package = "cleangeo")
R> sp <- readShapePoly(file)
cleangeo first allows to inspect spatial objects, and detect
eventual issues:
R> sp.report <- clgeo_CollectionReport(sp)
R> sp.summary <- clgeo_SummaryReport(sp.report)
type valid issue_type
rgeos_validity:2 Mode :logical GEOM_VALIDITY:2
NA's :1 FALSE:2 NA's :1
TRUE :1
NA's :0
The output indicates that 2 spatial objects have a problem of
geometry validity.
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
Usage - Clean geometries spatial objects
cleangeo allows you to clean spatial objects:
R> sp.fixed <- clgeo_Clean(sp)
Let’s analyse the new spatial objects:
R> sp.fixed.report <- clgeo_CollectionReport(sp.fixed)
R> sp.fixed.summary <- clgeo_SummaryReport(sp.fixed.report)
type valid issue_type
NA's:3 Mode:logical NA's:3
TRUE:3
NA's:0
And that’s it! Now your spatial objects have clean geometries, you
can safely do some spatial data processing on it.
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
Outline
1 Introduction
2 Using cleangeo
3 Conclusions & Perspectives
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
Conclusions and Perspectives
Although cleangeo is at its early stages, it has proved to be a real
benefit in the field of spatial data processing, providing a quick
and simple way to check geometry issues and clean spatial objects.
cleangeo is currently focused on cleaning SpatialPolygons
objects. A direct perspective is to extend it to other Spatial*
objects.
Any suggestion from users is welcome to strenghten the cleangeo
package.
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
Looking for Sponsors
cleangeo was initially born from some assistance provided to users
that were facing issues in processing spatial data in R (see the
original post). The prototype package was made available on
Github on a voluntary basis in support to this users request.
To guarantee the sustainability of cleangeo, we are seeking for
fundings, throught sponsoring or donations to:
implement, test, validate and release improvements
guarantee a quality maintenance of the package
provide support to users and institutions that may take
advantage of cleangeo
If you are interesting in supporting cleangeo, please do not
hesitate to contact me!
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
Introduction Using cleangeo Conclusions & Perspectives
cleangeo
on the web
on Github:
source code: https://github.com/eblondel/cleangeo
online documentation:
https://github.com/eblondel/cleangeo/blob/master/vignettes/quickst
on the Comprehensive R Archive Network (CRAN):
http://cran.r-project.org/package=cleangeo
E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR

More Related Content

Similar to cleangeo - Cleaning Geometries from Spatial Objects in R

Naturnet newsletter05 1
Naturnet newsletter05 1Naturnet newsletter05 1
Naturnet newsletter05 1
WirelessInfo
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
Laura Lorenz
 
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
NETWAYS
 
Recommendation Engine Powered by Hadoop
Recommendation Engine Powered by HadoopRecommendation Engine Powered by Hadoop
Recommendation Engine Powered by Hadoop
Pranab Ghosh
 
Towards a software ecosystem for java prolog interoperabilty
Towards a software ecosystem for java prolog interoperabiltyTowards a software ecosystem for java prolog interoperabilty
Towards a software ecosystem for java prolog interoperabilty
kim.mens
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
PyData
 

Similar to cleangeo - Cleaning Geometries from Spatial Objects in R (20)

OpenGL
OpenGLOpenGL
OpenGL
 
PROPOSAL OF A TWO WAY SORTING ALGORITHM AND PERFORMANCE COMPARISON WITH EXIST...
PROPOSAL OF A TWO WAY SORTING ALGORITHM AND PERFORMANCE COMPARISON WITH EXIST...PROPOSAL OF A TWO WAY SORTING ALGORITHM AND PERFORMANCE COMPARISON WITH EXIST...
PROPOSAL OF A TWO WAY SORTING ALGORITHM AND PERFORMANCE COMPARISON WITH EXIST...
 
Naturnet newsletter05 1
Naturnet newsletter05 1Naturnet newsletter05 1
Naturnet newsletter05 1
 
Binary Sort
Binary SortBinary Sort
Binary Sort
 
20150422 repro resr
20150422 repro resr20150422 repro resr
20150422 repro resr
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
 
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
OSMC 2022 | Unifying Observability Weaving Prometheus, Jaeger, and Open Sourc...
 
Recommendation Engine Powered by Hadoop
Recommendation Engine Powered by HadoopRecommendation Engine Powered by Hadoop
Recommendation Engine Powered by Hadoop
 
Recommendation Engine Powered by Hadoop - Pranab Ghosh
Recommendation Engine Powered by Hadoop - Pranab GhoshRecommendation Engine Powered by Hadoop - Pranab Ghosh
Recommendation Engine Powered by Hadoop - Pranab Ghosh
 
3 j grass-new-age
3 j grass-new-age3 j grass-new-age
3 j grass-new-age
 
Introduction to Renjin, the alternative engine for R
Introduction to Renjin, the alternative engine for R Introduction to Renjin, the alternative engine for R
Introduction to Renjin, the alternative engine for R
 
A Step Towards Reproducibility in R
A Step Towards Reproducibility in RA Step Towards Reproducibility in R
A Step Towards Reproducibility in R
 
Towards a software ecosystem for java prolog interoperabilty
Towards a software ecosystem for java prolog interoperabiltyTowards a software ecosystem for java prolog interoperabilty
Towards a software ecosystem for java prolog interoperabilty
 
An Empirical Study of Identical Function Clones in CRAN
An Empirical Study of Identical Function Clones in CRANAn Empirical Study of Identical Function Clones in CRAN
An Empirical Study of Identical Function Clones in CRAN
 
On unifying query languages for RDF streams
On unifying query languages for RDF streamsOn unifying query languages for RDF streams
On unifying query languages for RDF streams
 
Program Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit AdaptorProgram Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit Adaptor
 
Remote Sensing for Land Cover Mapping in Google Earth Engine - HAMENYIMANA Is...
Remote Sensing for Land Cover Mapping in Google Earth Engine - HAMENYIMANA Is...Remote Sensing for Land Cover Mapping in Google Earth Engine - HAMENYIMANA Is...
Remote Sensing for Land Cover Mapping in Google Earth Engine - HAMENYIMANA Is...
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
 
Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"
 
Automated bug localization
Automated bug localizationAutomated bug localization
Automated bug localization
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

cleangeo - Cleaning Geometries from Spatial Objects in R

  • 1. Introduction Using cleangeo Conclusions & Perspectives cleangeo - Cleaning Geometries from Spatial Objects in RR Emmanuel Blondel emmanuel.blondel1@gmail.com CEO - International Consultant September 30, 2015 E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 2. Introduction Using cleangeo Conclusions & Perspectives Outline 1 Introduction 2 Using cleangeo 3 Conclusions & Perspectives E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 3. Introduction Using cleangeo Conclusions & Perspectives cleangeo R spatial data processing RR provides a lot of facilities to read and manipulate spatial data. We can mention some packages such as: sp, which provides a set of classes and methods to handle spatial objects maptools, a set of tools for reading and handling Spatial Objects rgdal, which provides an interface to the well-known Geospatial Data Abstraction Library (GDAL) rgeos, which provides an interface to the widely used Geometry Engine, Open Source (GEOS) library. The main problem comes when spatial objects did not have valid geometries, or expose different types of geometry errors (e.g. orphaned holes), which prevents any easy spatial data processing. E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 4. Introduction Using cleangeo Conclusions & Perspectives cleangeo A package for cleaning geometries from spatial objects in R cleangeo was built in order: to facilitate handling and catching rgeos geometry issues to provide an utility to clean the spatial objects. cleangeo appears to a useful tool to check, and eventual clean the data prior any spatial data processing. E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 5. Introduction Using cleangeo Conclusions & Perspectives Outline 1 Introduction 2 Using cleangeo 3 Conclusions & Perspectives E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 6. Introduction Using cleangeo Conclusions & Perspectives cleangeo Usage - Installing cleangeo cleangeo can be installed: from CRAN R> install.packages("cleangeo") from Github, for latest updates (requires devtools package) R> require(devtools) R> install_github("eblondel/cleangeo") Load cleangeo in R using: R> require(cleangeo) E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 7. Introduction Using cleangeo Conclusions & Perspectives cleangeo Usage - Identify geometry issues in spatial objects Let’s load some sample data in RR: R> require(maptools) R> file <- system.file("extdata", "example.shp", package = "cleangeo") R> sp <- readShapePoly(file) cleangeo first allows to inspect spatial objects, and detect eventual issues: R> sp.report <- clgeo_CollectionReport(sp) R> sp.summary <- clgeo_SummaryReport(sp.report) type valid issue_type rgeos_validity:2 Mode :logical GEOM_VALIDITY:2 NA's :1 FALSE:2 NA's :1 TRUE :1 NA's :0 The output indicates that 2 spatial objects have a problem of geometry validity. E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 8. Introduction Using cleangeo Conclusions & Perspectives cleangeo Usage - Clean geometries spatial objects cleangeo allows you to clean spatial objects: R> sp.fixed <- clgeo_Clean(sp) Let’s analyse the new spatial objects: R> sp.fixed.report <- clgeo_CollectionReport(sp.fixed) R> sp.fixed.summary <- clgeo_SummaryReport(sp.fixed.report) type valid issue_type NA's:3 Mode:logical NA's:3 TRUE:3 NA's:0 And that’s it! Now your spatial objects have clean geometries, you can safely do some spatial data processing on it. E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 9. Introduction Using cleangeo Conclusions & Perspectives Outline 1 Introduction 2 Using cleangeo 3 Conclusions & Perspectives E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 10. Introduction Using cleangeo Conclusions & Perspectives cleangeo Conclusions and Perspectives Although cleangeo is at its early stages, it has proved to be a real benefit in the field of spatial data processing, providing a quick and simple way to check geometry issues and clean spatial objects. cleangeo is currently focused on cleaning SpatialPolygons objects. A direct perspective is to extend it to other Spatial* objects. Any suggestion from users is welcome to strenghten the cleangeo package. E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 11. Introduction Using cleangeo Conclusions & Perspectives cleangeo Looking for Sponsors cleangeo was initially born from some assistance provided to users that were facing issues in processing spatial data in R (see the original post). The prototype package was made available on Github on a voluntary basis in support to this users request. To guarantee the sustainability of cleangeo, we are seeking for fundings, throught sponsoring or donations to: implement, test, validate and release improvements guarantee a quality maintenance of the package provide support to users and institutions that may take advantage of cleangeo If you are interesting in supporting cleangeo, please do not hesitate to contact me! E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR
  • 12. Introduction Using cleangeo Conclusions & Perspectives cleangeo on the web on Github: source code: https://github.com/eblondel/cleangeo online documentation: https://github.com/eblondel/cleangeo/blob/master/vignettes/quickst on the Comprehensive R Archive Network (CRAN): http://cran.r-project.org/package=cleangeo E. Blondel cleangeo - Cleaning Geometries from Spatial Objects in RR