Skip to content

Commit

Permalink
typo in setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Nov 9, 2023
1 parent ece8ec1 commit 96040b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ setup_requires =
install_requires =
keplergl==0.3.2
h3==3.7.3
gdal=3.4.3
gdal==3.4.3

[options.package_data]
mosaic =
Expand Down
30 changes: 13 additions & 17 deletions python/test/test_raster_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,48 +82,44 @@ def test_raster_scalar_functions(self):
.withColumn("rst_width", api.rst_width("tile"))
.withColumn(
"rst_worldtorastercoordx",
api.rst_worldtorastercoordx("tile", lit(.0), lit(.0)),
api.rst_worldtorastercoordx("tile", lit(0.0), lit(0.0)),
)
.withColumn(
"rst_worldtorastercoordy",
api.rst_worldtorastercoordy("tile", lit(.0), lit(.0)),
api.rst_worldtorastercoordy("tile", lit(0.0), lit(0.0)),
)
.withColumn(
"rst_worldtorastercoord",
api.rst_worldtorastercoord("tile", lit(.0), lit(.0)),
api.rst_worldtorastercoord("tile", lit(0.0), lit(0.0)),
)
)
result.write.format("noop").mode("overwrite").save()
self.assertEqual(result.count(), 1)

def test_raster_flatmap_functions(self):

retile_result = (
self.generate_singleband_raster_df()
.withColumn("rst_retile", api.rst_retile("tile", lit(1200), lit(1200)))
retile_result = self.generate_singleband_raster_df().withColumn(
"rst_retile", api.rst_retile("tile", lit(1200), lit(1200))
)
retile_result.write.format("noop").mode("overwrite").save()
self.assertEqual(retile_result.count(), 4)

subdivide_result = (
self.generate_singleband_raster_df()
.withColumn("rst_subdivide", api.rst_subdivide("tile", lit(1)))
subdivide_result = self.generate_singleband_raster_df().withColumn(
"rst_subdivide", api.rst_subdivide("tile", lit(1))
)
subdivide_result.write.format("noop").mode("overwrite").save()
self.assertEqual(retile_result.count(), 4)

#TODO: reproject into WGS84
tessellate_result = (
self.generate_singleband_raster_df()
.withColumn("rst_tessellate", api.rst_tessellate("tile", lit(3)))
# TODO: reproject into WGS84
tessellate_result = self.generate_singleband_raster_df().withColumn(
"rst_tessellate", api.rst_tessellate("tile", lit(3))
)

tessellate_result.write.format("noop").mode("overwrite").save()
self.assertEqual(tessellate_result.count(), 55)

overlap_result = (
self.generate_singleband_raster_df()
.withColumn("rst_to_overlapping_tiles", api.rst_to_overlapping_tiles("tile", lit(200), lit(200), lit(10)))
overlap_result = self.generate_singleband_raster_df().withColumn(
"rst_to_overlapping_tiles",
api.rst_to_overlapping_tiles("tile", lit(200), lit(200), lit(10)),
)

overlap_result.write.format("noop").mode("overwrite").save()
Expand Down

0 comments on commit 96040b2

Please sign in to comment.