Skip to content

Commit

Permalink
Merge pull request #676 from jbouffard/fix/metadata-crs
Browse files Browse the repository at this point in the history
Metadata Creation Fix
  • Loading branch information
Jacob Bouffard committed Aug 9, 2018
2 parents bb09a3d + 18d3573 commit 48e2e36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions geopyspark-backend/geotrellis/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ assemblyShadeRules in assembly := {
)
}

fork in Test := true

javaOptions ++= Seq("-Xms1024m", "-Xmx6144m")

assemblyMergeStrategy in assembly := {
case s if s.startsWith("META-INF/services") => MergeStrategy.concat
case "reference.conf" | "application.conf" => MergeStrategy.concat
Expand Down
2 changes: 1 addition & 1 deletion geopyspark-backend/project/Version.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Version {
val geopyspark = "0.4.2"
val geotrellis = "2.0.0-RC1"
val geotrellis = "2.0.0"
val scala = "2.11.11"
val scalaTest = "2.2.0"
}
2 changes: 1 addition & 1 deletion geopyspark/geotrellis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class Metadata(object):

def __init__(self, bounds, crs, cell_type, extent, layout_definition):
self.bounds = bounds
self.crs = crs
self.crs = crs_to_proj4(crs)

if isinstance(cell_type, CellType):
self.cell_type = CellType(cell_type).value
Expand Down
6 changes: 3 additions & 3 deletions geopyspark/tests/geotrellis/tiled_layer_tests/mask_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import rasterio
import numpy as np

from geopyspark.geotrellis import SpatialKey, Tile, SpatialPartitionStrategy, RasterizerOptions
from geopyspark.geotrellis import SpatialKey, Tile, SpatialPartitionStrategy, RasterizerOptions, Metadata
from shapely.geometry import Polygon, box
from geopyspark.tests.base_test_class import BaseTestClass
from geopyspark.geotrellis.layer import TiledRasterLayer
Expand All @@ -27,7 +27,7 @@ class MaskTest(BaseTestClass):
layout = {'layoutCols': 2, 'layoutRows': 2, 'tileCols': 2, 'tileRows': 2}
metadata = {'cellType': 'float32ud-1.0',
'extent': extent,
'crs': '+proj=longlat +datum=WGS84 +no_defs ',
'crs': 4326,
'bounds': {
'minKey': {'col': 0, 'row': 0},
'maxKey': {'col': 1, 'row': 1}},
Expand All @@ -36,7 +36,7 @@ class MaskTest(BaseTestClass):
'tileLayout': layout}}

geoms = [box(0.0, 0.0, 2.0, 2.0), box(3.0, 3.0, 4.0, 4.0)]
raster_rdd = TiledRasterLayer.from_numpy_rdd(LayerType.SPATIAL, rdd, metadata)
raster_rdd = TiledRasterLayer.from_numpy_rdd(LayerType.SPATIAL, rdd, Metadata.from_dict(metadata))

@pytest.fixture(autouse=True)
def tearDown(self):
Expand Down

0 comments on commit 48e2e36

Please sign in to comment.