Repository navigation
Add dynamic ZFactor for slope calculation - #3014
Conversation
There was a problem hiding this comment.
A nice ZFactor port! Some code style questions remaining and there are no headers generated for new files. See https://github.com/sbt/sbt-header#creating-headers
|
@pomadchin Thanks! I should've resolved the issues you pointed out. Also, thanks for reminding me about the headers. I knew I forgot something... |
echeipesh
left a comment
There was a problem hiding this comment.
Lots of comments about naming. I feel now that this code is being lifted from geopyspark-backend where there was no user interaction its important to reconsider the naming decisions since this is going to be the front and center API for GT scala.
| } | ||
|
|
||
| def createZFactorCalculator(mappedLats: Map[Double, Double]): ZFactorCalculator = { | ||
| def createCalculator(mappedLats: Map[Double, Double]): ZFactorCalculator = { |
There was a problem hiding this comment.
A little pedantic but I still think worth pointing out words like create are generally filler words in function names. Constructors create an object, functions return a value. Unless there is a special significance to the fact that you're getting a new instance, if it has surprisingly high resource requirement for instance, they are unnecessary.
createCalculator is more meaningful as interpolateFromTable - given that interpolation is the critical thing that it does.
createLatLngCalculator is as meaningful and shorter as forLatLng giving you the following full path ZFactorCalculator.forLatLng
|
I'm 👍 on |
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
…to use the ZFactorCalculator Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
…kage object Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
…thods Signed-off-by: Jacob Bouffard <[email protected]>
Signed-off-by: Jacob Bouffard <[email protected]>
2cf3f86 to
507c783
Compare
|
Just created the CQ for squants: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=20340#c0 |
Signed-off-by: Jacob Bouffard <[email protected]>
|
@jbouffard heads up, you attached the artifact jar instead of the source jar on that CQ request. |
Overview
This PR adds the
ZFactorclass as a way of producing the correctzFactorwhen calculatingslope. Before, thezFactorhad a default value of 1. However, this doesn't make sense, as thezFactorneeds to be calculated on a per-tile bases. TheZFactorclass will help by deriving the appropriateZFactorfor each tile depending on its spatial position.Checklist
docs/CHANGELOG.rstupdated, if necessaryCloses #2548