locationtech-labs / geopyspark

GeoTrellis for PySpark
Other
179 stars 59 forks source link

ColorMap.build with np.arange #596

Closed echeipesh closed 6 years ago

echeipesh commented 6 years ago

Python doesn't have a standard way to build a range using using decimal increments. Users are usually guided to use np.arange in situation like this:

color_map = gps.ColorMap.build(
    np.arange(0, 6, 0.2), 
    'magma')

Since GeoPySpark already depends heavily on numpy to serialize RDDs of tiles it seems reasonable to support the arange in place of a list.