-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08ce1da
commit 05eeb02
Showing
8 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Polygons and shapefiles · NighttimeLights.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://ayushpatnaikgit.github.io/NighttimeLights.jl/polygons.html"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">NighttimeLights.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="concepts.html">Basic concepts</a></li><li class="is-active"><a class="tocitem" href="polygons.html">Polygons and shapefiles</a></li><li><a class="tocitem" href="data_cleaning.html">Data Cleaning</a></li><li><a class="tocitem" href="tutorial.html">Tutorial</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="polygons.html">Polygons and shapefiles</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="polygons.html">Polygons and shapefiles</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/master/docs/src/polygons.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><article class="docstring"><header><a class="docstring-binding" id="NighttimeLights.load_shapefile-Tuple{Any}" href="#NighttimeLights.load_shapefile-Tuple{Any}"><code>NighttimeLights.load_shapefile</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Polygon boundaries are usually stored in a format called shapfile. For example, the shapefile of the world will consist of country names and each country will have coordinates of the boundaries. </p><pre><code class="language-julia">load_shapefile("assets/mumbai_map/mumbai_districts.shp")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/1fbc60d96dad4ededbbe0ed7c7694b39dde6d7c4/src/polygons.jl#L1-L6">source</a></section></article><pre><code class="nohighlight">| | geometry | DISTRICT | ST_NM | ST_CEN_CD | DT_CEN_CD | censuscode | | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Polygons and shapefiles · NighttimeLights.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://ayushpatnaikgit.github.io/NighttimeLights.jl/polygons.html"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">NighttimeLights.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="concepts.html">Basic concepts</a></li><li class="is-active"><a class="tocitem" href="polygons.html">Polygons and shapefiles</a></li><li><a class="tocitem" href="data_cleaning.html">Data Cleaning</a></li><li><a class="tocitem" href="tutorial.html">Tutorial</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="polygons.html">Polygons and shapefiles</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="polygons.html">Polygons and shapefiles</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/master/docs/src/polygons.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><article class="docstring"><header><a class="docstring-binding" id="NighttimeLights.load_shapefile-Tuple{Any}" href="#NighttimeLights.load_shapefile-Tuple{Any}"><code>NighttimeLights.load_shapefile</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Polygon boundaries are usually stored in a format called shapfile. For example, the shapefile of the world will consist of country names and each country will have coordinates of the boundaries. </p><pre><code class="language-julia">load_shapefile("assets/mumbai_map/mumbai_districts.shp")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/08ce1da81cd0aaa0845a6192d7372d5a7ef20b10/src/polygons.jl#L1-L6">source</a></section></article><pre><code class="nohighlight">| | geometry | DISTRICT | ST_NM | ST_CEN_CD | DT_CEN_CD | censuscode | | ||
|:-:|:-------------------:|:---------------:|:-----------:|:---------:|:---------:|:----------:| | ||
| 1 | Polygon(78 Points) | Mumbai | Maharashtra | 27 | 23 | 519 | | ||
| 2 | Polygon(139 Points) | Mumbai Suburban | Maharashtra | 27 | 22 | 518 |</code></pre><p>Each row of a shapefile dataframe contains a polygon and other information about it. </p><article class="docstring"><header><a class="docstring-binding" id="NighttimeLights.polygon_mask-Tuple{CoordinateSystem,Any}" href="#NighttimeLights.polygon_mask-Tuple{CoordinateSystem,Any}"><code>NighttimeLights.polygon_mask</code></a> — <span class="docstring-category">Method</span></header><section><div><p>The polygon of a shapefile row can be make into a mask. This means all the points inside the polygon will be marked as 1, while the points outside will be marked as 0.</p><pre><code class="language-julia">mumbai_districts = load_shapefile("assets/mumbai_map/mumbai_districts.shp") | ||
district1 = mumbai_dists[1,:] # Select the first district | ||
district1_mask = polygon_mask(my_coordinate_system, district1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/1fbc60d96dad4ededbbe0ed7c7694b39dde6d7c4/src/polygons.jl#L40-L48">source</a></section></article><p>Once a mask is obtained from a polygon, the mask can be used as just as any other mask. </p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="concepts.html">« Basic concepts</a><a class="docs-footer-nextpage" href="data_cleaning.html">Data Cleaning »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="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/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="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/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 23 July 2021 11:31">Friday 23 July 2021</span>. Using Julia version 1.4.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | ||
district1_mask = polygon_mask(my_coordinate_system, district1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ayushpatnaikgit/NighttimeLights.jl/blob/08ce1da81cd0aaa0845a6192d7372d5a7ef20b10/src/polygons.jl#L40-L48">source</a></section></article><p>Once a mask is obtained from a polygon, the mask can be used as just as any other mask. </p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="concepts.html">« Basic concepts</a><a class="docs-footer-nextpage" href="data_cleaning.html">Data Cleaning »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="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/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="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/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 23 July 2021 19:45">Friday 23 July 2021</span>. Using Julia version 1.4.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.