raster_layer.tile_to_layout didn't work

8 views
Skip to first unread message

Ahmet Temiz

unread,
May 14, 2019, 6:43:15 AM5/14/19
to geotrellis-user
Hi,
I am very new to geopyspark. 
I tried it but raster_layer.tile_to_layout didn't work.

Here is the code I have tried:
---
from pyspark import SparkContext


conf = gps.geopyspark_conf(master="local[*]", appName="layers")
pysc = SparkContext(conf=conf)

raster_layer = gps.geotiff.get(layer_type=gps.LayerType.SPATIAL, uri="file:///tmp/cropped.tif")
python_rdd = raster_layer.to_numpy_rdd()
print (python_rdd.first())

tiled_raster_layer = raster_layer.tile_to_layout(gps.GlobalLayout(), target_crs=3857)
--
it gives some errors:
Traceback (most recent call last):
  File "ingest1.py", line 16, in <module>
    tiled_raster_layer = raster_layer.tile_to_layout(gps.GlobalLayout(), target_crs=3857)
  File "/usr/local/miniconda3/lib/python3.7/site-packages/geopyspark/geotrellis/layer.py", line 832, in tile_to_layout
    return _reproject(target_crs, layout, resample_method, partition_strategy, self)
  File "/usr/local/miniconda3/lib/python3.7/site-packages/geopyspark/geotrellis/layer.py", line 134, in _reproject
...
...

--

What am I doing wrong?

regards

Ross Bernet

unread,
May 20, 2019, 5:01:00 PM5/20/19
to geotrel...@googlegroups.com
Hi Ahmet,

I see you also posted on gitter. We have responded to your question there with some follow up questions. 

Thanks,
Ross

--
You received this message because you are subscribed to the Google Groups "geotrellis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geotrellis-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geotrellis-user/85d3c7a3-7873-4c39-a30d-6f998c3d753c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Ross Bernet, Project Manager, GeoTrellis
Azavea | 990 Spring Garden Street, 5th Floor, Philadelphia, PA
rbe...@azavea.com | office: 215.701.7717  | mobile: 858.692.1872

Azavea is a B Corporation - we apply geospatial technology for civic and social impact
while advancing the state-of-the-art through research. Join us.
Reply all
Reply to author
Forward
0 new messages