/
vector-data.html
451 lines (433 loc) · 27.9 KB
/
vector-data.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="RasterFrames brings the power of Spark DataFrames to geospatial raster data.">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="">
<meta name="lang:search.pipeline.stopwords" content="true">
<meta name="lang:search.pipeline.trimmer" content="true">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<meta name="description" content="RasterFrames brings the power of Spark DataFrames to geospatial raster data.">
<link rel="shortcut icon" href="assets/images/RasterFrames_32x32.ico">
<title>Vector Data · RasterFrames</title>
<link rel="stylesheet" href="assets/stylesheets/application.451f80e5.css">
<link rel="stylesheet" href="assets/stylesheets/application-palette.22915126.css">
<meta name="theme-color" content="#546e7a" />
<link rel="stylesheet" href="lib/material__tabs/dist/mdc.tabs.min.css">
<link rel="stylesheet" href="lib/prettify/prettify.css">
<script src="assets/javascripts/modernizr.1aa3b519.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
<style>
body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}
code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}
</style>
<link rel="stylesheet" href="assets/fonts/font-awesome.css">
<link rel="stylesheet" href="assets/fonts/material-icons.css">
<link rel="stylesheet" href="assets/stylesheets/paradox-material-theme.css">
<link rel="stylesheet" href="assets/custom.css">
</head>
<body
data-md-color-primary="blue-grey"
data-md-color-accent="light-blue"
>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="index.html" title="RasterFrames" class="md-header-nav__button md-logo">
<img src="assets/images/RF-R.svg" width="24" height="24">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
RasterFrames
</span>
<span class="md-header-nav__topic">
Vector Data
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1"></button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/locationtech/rasterframes"
title="Go to repository"
class="md-source"
data-md-source="github">
<div class="md-source__icon">
<i class="fa fa-github"></i>
</div>
<div class="md-source__repository">
locationtech/rasterframes
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0" style="visibility: hidden">
<label class="md-nav__title md-nav__title--site" for="drawer">
<a href="index.html" title="RasterFrames" class="md-nav__button md-logo">
<span class="md-nav__button md-logo">
<img src="assets/images/RF-R.svg" width="24" height="24">
</a>
<a href="index.html" title="RasterFrames">
RasterFrames
</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/locationtech/rasterframes"
title="Go to repository"
class="md-source"
data-md-source="github">
<div class="md-source__icon">
<i class="fa fa-github"></i>
</div>
<div class="md-source__repository">
locationtech/rasterframes
</div>
</a>
</div>
<ul>
<li><a href="description.html" class="page">Overview</a></li>
<li><a href="getting-started.html" class="page">Getting Started</a></li>
<li><a href="concepts.html" class="page">Concepts</a></li>
<li><a href="raster-io.html" class="page">Raster Data I/O</a>
<ul>
<li><a href="raster-catalogs.html" class="page">Raster Catalogs</a></li>
<li><a href="raster-read.html" class="page">Reading Raster Data</a></li>
<li><a href="raster-write.html" class="page">Writing Raster Data</a></li>
</ul></li>
<li><a href="vector-data.html" class="active page">Vector Data</a></li>
<li><a href="raster-processing.html" class="page">Raster Processing</a>
<ul>
<li><a href="local-algebra.html" class="page">Local Map Algebra</a></li>
<li><a href="nodata-handling.html" class="page">“NoData” Handling</a></li>
<li><a href="masking.html" class="page">Masking</a></li>
<li><a href="zonal-algebra.html" class="page">Zonal Map Algebra</a></li>
<li><a href="aggregation.html" class="page">Aggregation</a></li>
<li><a href="time-series.html" class="page">Time Series</a></li>
<li><a href="raster-join.html" class="page">Raster Join</a></li>
</ul></li>
<li><a href="machine-learning.html" class="page">Machine Learning</a>
<ul>
<li><a href="unsupervised-learning.html" class="page">Unsupervised Machine Learning</a></li>
<li><a href="supervised-learning.html" class="page">Supervised Machine Learning</a></li>
</ul></li>
<li><a href="numpy-pandas.html" class="page">NumPy and Pandas</a></li>
<li><a href="ipython.html" class="page">IPython/Jupyter Extensions</a></li>
<li><a href="languages.html" class="page">Scala and SQL</a></li>
<li><a href="reference.html" class="page">Function Reference</a></li>
<li><a href="release-notes.html" class="page">Release Notes</a></li>
</ul>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul>
<li><a href="vector-data.html#vector-data" class="header">Vector Data</a>
<ul>
<li><a href="vector-data.html#geojson-datasource" class="header">GeoJSON DataSource</a></li>
<li><a href="vector-data.html#geopandas-and-rasterframes" class="header">GeoPandas and RasterFrames</a></li>
<li><a href="vector-data.html#shapely-geometry-support" class="header">Shapely Geometry Support</a></li>
<li><a href="vector-data.html#geomesa-functions-and-spatial-relations" class="header">GeoMesa Functions and Spatial Relations</a></li>
</ul></li>
</ul>
</nav>
</nav>
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.9.1
</label>
</li>
</ul>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul>
<li><a href="vector-data.html#vector-data" class="header">Vector Data</a>
<ul>
<li><a href="vector-data.html#geojson-datasource" class="header">GeoJSON DataSource</a></li>
<li><a href="vector-data.html#geopandas-and-rasterframes" class="header">GeoPandas and RasterFrames</a></li>
<li><a href="vector-data.html#shapely-geometry-support" class="header">Shapely Geometry Support</a></li>
<li><a href="vector-data.html#geomesa-functions-and-spatial-relations" class="header">GeoMesa Functions and Spatial Relations</a></li>
</ul></li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<div class="md-content__searchable">
<h1><a href="#vector-data" name="vector-data" class="anchor"><span class="anchor-link"></span></a>Vector Data</h1>
<p>RasterFrames provides a variety of ways to work with spatial vector data (points, lines, and polygons) alongside raster data. </p>
<ul>
<li>DataSource for GeoJSON format</li>
<li>Ability to convert between from <a href="http://geopandas.org">GeoPandas</a> and Spark DataFrames</li>
<li>In PySpark, geometries are <a href="https://shapely.readthedocs.io/en/latest/manual.html">Shapely</a> objects, providing a great deal of interoperability</li>
<li>Many Spark functions for working with columns of geometries</li>
<li>Vector data is also the basis for <a href="zonal-algebra.html">zonal map algebra</a> operations.</li>
</ul>
<h2><a href="#geojson-datasource" name="geojson-datasource" class="anchor"><span class="anchor-link"></span></a>GeoJSON DataSource</h2>
<pre class="prettyprint"><code class="language-python">from pyspark import SparkFiles
admin1_us_url = 'https://raw.githubusercontent.com/datasets/geo-admin1-us/master/data/admin1-us.geojson'
spark.sparkContext.addFile(admin1_us_url) # this lets us read http scheme uri's in spark
df = spark.read.geojson(SparkFiles.get('admin1-us.geojson'))
df.printSchema()
</code></pre>
<pre><code>root
|-- geometry: geometry (nullable = true)
|-- ISO3166-1-Alpha-3: string (nullable = true)
|-- country: string (nullable = true)
|-- id: string (nullable = true)
|-- name: string (nullable = true)
|-- state_code: string (nullable = true)
</code></pre>
<p>The properties of each discrete geometry are available as columns of the DataFrame, along with the geometry itself.</p>
<h2><a href="#geopandas-and-rasterframes" name="geopandas-and-rasterframes" class="anchor"><span class="anchor-link"></span></a>GeoPandas and RasterFrames</h2>
<p>You can also convert a <a href="http://geopandas.org">GeoPandas</a> GeoDataFrame to a Spark DataFrame, preserving the geometry column. This means that any vector format that can be read with <a href="https://gdal.org/drivers/vector/index.html">OGR</a> can be converted to a Spark DataFrame. In the example below, we expect the same schema as the DataFrame defined above by the GeoJSON reader. Note that in a GeoPandas DataFrame there can be heterogeneous geometry types in the column, which may fail Spark’s schema inference.</p>
<pre class="prettyprint"><code class="language-python">import geopandas
from shapely.geometry import MultiPolygon
def poly_or_mp_to_mp(g):
""" Normalize polygons or multipolygons to all be multipolygons. """
if isinstance(g, MultiPolygon):
return g
else:
return MultiPolygon([g])
gdf = geopandas.read_file(admin1_us_url)
gdf.geometry = gdf.geometry.apply(poly_or_mp_to_mp)
df2 = spark.createDataFrame(gdf)
df2.printSchema()
</code></pre>
<pre><code>root
|-- name: string (nullable = true)
|-- country: string (nullable = true)
|-- ISO3166-1-Alpha-3: string (nullable = true)
|-- state_code: string (nullable = true)
|-- id: string (nullable = true)
|-- geometry: multipolygon (nullable = true)
</code></pre>
<h2><a href="#shapely-geometry-support" name="shapely-geometry-support" class="anchor"><span class="anchor-link"></span></a>Shapely Geometry Support</h2>
<p>The <code>geometry</code> column will have a Spark user-defined type that is compatible with <a href="https://shapely.readthedocs.io/en/latest/manual.html">Shapely</a> when working with Python via PySpark. This means that when the data is collected to the driver, it will be a Shapely geometry object.</p>
<pre class="prettyprint"><code class="language-python">the_first = df.first()
print(type(the_first['geometry']))
</code></pre>
<pre><code><class 'shapely.geometry.polygon.Polygon'>
</code></pre>
<p>Since it is a geometry we can do things like this:</p>
<pre class="prettyprint"><code class="language-python">the_first['geometry'].wkt
</code></pre>
<pre><code>'POLYGON ((-71.14789974636884 41.64758738867177, -71.1203820461734 41.49465098730397, -71.85382564969197 41.32003632258973, -71.79295081245215 41.46661652278563, -71.8009089830251 42.01324982356905, -71.37915178087496 42.02436025651181, -71.30507361518457 41.76241242122431, -71.14789974636884 41.64758738867177))'
</code></pre>
<p>You can also write user-defined functions that take geometries as input, output, or both, via user defined types in the <a href="https://github.com/locationtech/rasterframes/blob/develop/pyrasterframes/src/main/python/geomesa_pyspark/types.py">geomesa_pyspark.types</a> module. Here is a simple <strong>but inefficient</strong> example of a user-defined function that uses both a geometry input and output to compute the centroid of a geometry. Observe in a sample of the data the geometry columns print as well known text (wkt).</p>
<pre class="prettyprint"><code class="language-python">from pyspark.sql.functions import udf
from geomesa_pyspark.types import PointUDT
@udf(PointUDT())
def inefficient_centroid(g):
return g.centroid
df.select(df.state_code, inefficient_centroid(df.geometry))
</code></pre>
<p><em>Showing only top 5 rows</em>.</p>
<table>
<thead>
<tr>
<th>state_code </th>
<th>inefficient_centroid(geometry) </th>
</tr>
</thead>
<tbody>
<tr>
<td>RI </td>
<td>POINT (-71.52928731203043 41.68199156750… </td>
</tr>
<tr>
<td>FL </td>
<td>POINT (-82.50257410032164 28.61692830512… </td>
</tr>
<tr>
<td>OK </td>
<td>POINT (-97.5041982257254 35.581496016431… </td>
</tr>
<tr>
<td>MN </td>
<td>POINT (-94.17743611908642 46.36007316339… </td>
</tr>
<tr>
<td>TX </td>
<td>POINT (-99.3286756609654 31.455508256185… </td>
</tr>
</tbody>
</table>
<h2><a href="#geomesa-functions-and-spatial-relations" name="geomesa-functions-and-spatial-relations" class="anchor"><span class="anchor-link"></span></a>GeoMesa Functions and Spatial Relations</h2>
<p>As documented in the <a href="reference.html">function reference</a>, various user-defined functions implemented by GeoMesa are also available for use. The example below uses a GeoMesa user-defined function to compute the centroid of a geometry. It is logically equivalent to the example above, but more efficient.</p>
<pre class="prettyprint"><code class="language-python">from pyrasterframes.rasterfunctions import st_centroid
df.select(df.state_code, inefficient_centroid(df.geometry), st_centroid(df.geometry))
</code></pre>
<p><em>Showing only top 5 rows</em>.</p>
<table>
<thead>
<tr>
<th>state_code </th>
<th>inefficient_centroid(geometry) </th>
<th>st_centroid(geometry) </th>
</tr>
</thead>
<tbody>
<tr>
<td>RI </td>
<td>POINT (-71.52928731203043 41.68199156750… </td>
<td>POINT (-71.52928731203043 41.68199156750… </td>
</tr>
<tr>
<td>FL </td>
<td>POINT (-82.50257410032164 28.61692830512… </td>
<td>POINT (-82.50257410032164 28.61692830512… </td>
</tr>
<tr>
<td>OK </td>
<td>POINT (-97.5041982257254 35.581496016431… </td>
<td>POINT (-97.5041982257254 35.581496016431… </td>
</tr>
<tr>
<td>MN </td>
<td>POINT (-94.17743611908642 46.36007316339… </td>
<td>POINT (-94.17743611908642 46.36007316339… </td>
</tr>
<tr>
<td>TX </td>
<td>POINT (-99.3286756609654 31.455508256185… </td>
<td>POINT (-99.3286756609654 31.455508256185… </td>
</tr>
</tbody>
</table>
<p>The RasterFrames vector functions and GeoMesa functions also provide a variety of spatial relations that are useful in combination with the geometric properties of projected rasters. In this example, we use the <a href="raster-catalogs.html#using-built-in-experimental-catalogs">built-in Landsat catalog</a> which provides an extent. We will convert the extent to a polygon and filter to those within approximately 50 km of a selected point.</p>
<pre class="prettyprint"><code class="language-python">from pyrasterframes.rasterfunctions import st_geometry, st_bufferPoint, st_intersects, st_point
from pyspark.sql.functions import lit
l8 = spark.read.format('aws-pds-l8-catalog').load()
l8 = l8.withColumn('geom', st_geometry(l8.bounds_wgs84)) # extent to polygon
l8 = l8.withColumn('paducah', st_point(lit(-88.628), lit(37.072))) # col of points
l8_filtered = l8 \
.filter(st_intersects(l8.geom, st_bufferPoint(l8.paducah, lit(50000.0)))) \
.filter(l8.acquisition_date > '2018-02-01') \
.filter(l8.acquisition_date < '2018-03-11')
</code></pre>
<iframe src="data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3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aW9uL2ZvbGl1bS9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfYzYwODk5YjAzYWM4NGM0NWJiOGU1OGVlNmFmNGQyODQgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2M2MDg5OWIwM2FjODRjNDViYjhlNThlZTZhZjRkMjg0IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9jNjA4OTliMDNhYzg0YzQ1YmI4ZTU4ZWU2YWY0ZDI4NCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9jNjA4OTliMDNhYzg0YzQ1YmI4ZTU4ZWU2YWY0ZDI4NCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMCwgMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAxLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNmRkMDJhMmUxY2VkNDI2NmJhMDVjYjcwMzA3M2QxZGUgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2M2MDg5OWIwM2FjODRjNDViYjhlNThlZTZhZjRkMjg0KTsKICAgICAgICAKICAgIAogICAgICAgICAgICBtYXBfYzYwODk5YjAzYWM4NGM0NWJiOGU1OGVlNmFmNGQyODQuZml0Qm91bmRzKAogICAgICAgICAgICAgICAgW1szNC45NDg1MSwgLTkxLjM2MTMzXSwgWzM4LjUx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NDcyOTIsIDM2LjM4MTk4XV1dLCAidHlwZSI6ICJQb2x5Z29uIn0sICJpZCI6ICIzIiwgInByb3BlcnRpZXMiOiB7ImJvdW5kc193Z3M4NCI6IFstODkuNDcyOTIsIDM2LjM4MTk4LCAtODYuODAxNDgsIDM4LjUxNjNdfSwgInR5cGUiOiAiRmVhdHVyZSJ9LCB7Imdlb21ldHJ5IjogeyJjb29yZGluYXRlcyI6IFtbWy05MS4wNTEzNSwgMzYuMzU3NDddLCBbLTkxLjA1MTM1LCAzOC41MDc0MV0sIFstODguMzEwNTgsIDM4LjUwNzQxXSwgWy04OC4zMTA1OCwgMzYuMzU3NDddLCBbLTkxLjA1MTM1LCAzNi4zNTc0N11dXSwgInR5cGUiOiAiUG9seWdvbiJ9LCAiaWQiOiAiNCIsICJwcm9wZXJ0aWVzIjogeyJib3VuZHNfd2dzODQiOiBbLTkxLjA1MTM1LCAzNi4zNTc0NywgLTg4LjMxMDU4LCAzOC41MDc0MV19LCAidHlwZSI6ICJGZWF0dXJlIn0sIHsiZ2VvbWV0cnkiOiB7ImNvb3JkaW5hdGVzIjogW1tbLTg4LjI4ODM4LCAzNC45NzM5N10sIFstODguMjg4MzgsIDM3LjA5MTUxXSwgWy04NS43MjM3NSwgMzcuMDkxNTFdLCBbLTg1LjcyMzc1LCAzNC45NzM5N10sIFstODguMjg4MzgsIDM0Ljk3Mzk3XV1dLCAidHlwZSI6ICJQb2x5Z29uIn0sICJpZCI6ICI1IiwgInByb3BlcnRpZXMiOiB7ImJvdW5kc193Z3M4NCI6IFstODguMjg4MzgsIDM0Ljk3Mzk3LCAtODUuNzIzNzUsIDM3LjA5MTUxXX0sICJ0eXBlIjogIkZlYXR1cmUifV0sICJ0eXBlIjogIkZlYXR1cmVDb2xsZWN0aW9uIn0pOwoKICAgICAgICAKPC9zY3JpcHQ+" allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen="" style="position:relative;width:100%;height:500px"></iframe>
</div>
<div>
<a href="https://github.com/locationtech/rasterframes/tree/v0.9.1/pyrasterframes/target/python/docs/vector-data.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.9.1
</span>
</div>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="raster-write.html" title="Writing Raster Data" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Writing Raster Data
</span>
</div>
</a>
<a href="raster-processing.html" title="Raster Processing" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Raster Processing
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
© 2017-2019 <a href="https://astraea.earth">Astraea</a>, Inc. All rights reserved.
</div>
</div>
</div>
</div>
</footer>
</div>
<script src="assets/javascripts/application.583bbe55.js"></script>
<script src="assets/javascripts/paradox-material-theme.js"></script>
<script>app.initialize({version:"0.17",url:{base:"."}})</script>
<script type="text/javascript" src="lib/prettify/prettify.js"></script>
<script type="text/javascript" src="lib/prettify/lang-scala.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
window.prettyPrint && prettyPrint();
});
</script>
<script>!function(e,a,t,n,o,c,i){e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),i=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","UA-106630615-1"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var a=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",a,e.href)})});if(document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
</body>
</html>