geopyspark
geopyspark copied to clipboard
Default layer type to 'spatial'
This is meant to be a discussion.
I have an instinct to want to remove as many parameters as possible to make the code as readable as possible for a person who is new to GeoPySpark so they can quickly scan a demo and understand what's going on.
Each single parameter doesn't seem like a big deal...but they add up. I would see it as a plus if we can remove ones that aren't strictly necessary and try to make best guesses for default behavior with the option to easily override if necessary.
e.g.:
elev_rdd = get(pysc=sc, rdd_type='spatial', uri='../elevation.tif')
I understand we are going to try to hide pysc=sc
which is a big plus. If we can also hide `rdd_type='spatial' I would see that as a plus.
A new user is going to have a need to understand simple spatial datasets before leveraging temporal datasets. If we let rdd_type=temporal
be an override parameter in the event that it is necessary, this would remove one more parameter for simple examples.
I don't agree with having layer_type
default to spatial
. The impression I had was that the user was already going to have basic knowledge in regards to the differences between spatial and temporal. Therefore, I don't think asking them which kind of data they have would be that overwhelming. I also think defaulting to spatial
is somewhat biased towards our use cases, since we tend to work with a lot of spatial
data.
As an additional point, I don't think layer_type
parameter is that pervasive in GeoPySpark. The only time it's required is when either RasterLayer
or TiledRasterLayer
is initialized; and even then, most of those instances are behind the scenes.
Those are good points. I am definitely not set on this happening. I think part of my motivation comes from a lack of understanding of the use cases for temporal
layer_tyler
.
Do any example use-cases exist?