![]() ![]() ![]() In addition, Spark needs to be installed and configured with the Java 8 and Scala 2.11 are needed for GeoPySpark to work, as they are required by write ( uri = 'file:///tmp/pa-nlcd-2011', layer_name = 'north-west-philly', tiled_raster_layer = pyramid )įor additional examples, check out the Jupyter notebook demos. pyramid () # Save each layer of the pyramid locally so that it can be accessed at a later time. mask ( geometries = area_of_interest ) # We will now pyramid the masked TiledRasterLayer so that we can use it in a TMS server later. # This is the region that will be masked. GlobalLayout (), target_crs = 3857 ) # Creates a Polygon that covers roughly the north-west section of Philadelphia. SPATIAL, uri = '/tmp/NLCD2011_LC_Pennsylvania.tif', num_partitions = 100 ) # Tile the rasters within the layer and reproject them to Web Mercator. # This tif represents the state of Pennsylvania. geopyspark_conf ( appName = "geopyspark-example", master = "local" ) sc = SparkContext ( conf = conf ) # Read in the NLCD tif that has been saved locally. Unzip -d /tmp /tmp/NLCD2011_LC_Pennsylvania.zip import geopyspark as gps from pyspark import SparkContext from shapely.geometry import box # Create the SparkContext conf = gps. Running these two commands will complete these tasksįor you: curl -o /tmp/NLCD2011_LC_Pennsylvania.zip "" If you wish to follow along with this example, you will need to download the Of the state of Pennsylvania from 2011, and do a masking operation on it withĪ Polygon that represents an area of interest. Library for working with geospatial data in a distributed environment.Īble to provide an interface into the GeoTrellis framework. GeoPySpark is a Python bindings library for GeoTrellis, a Scala ![]()
0 Comments
Leave a Reply. |