-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit conversions from ProjectedRaster to Tile create confusing semantics #2829
Comments
Would not be better just to have conversion (and other funcs) function properly implemented there? |
@pomadchin You'd have to define |
Ah indeed; also read a lil bit wrong the issue from phone |
I'd actually voice support for having at least
At least that way you can get at I uses |
Anyone know what happens if you try to |
@metasim actually a good question: scala/bug#10152 But probably would work as expected. |
To followup from above, this is the use case I have a lot of time, especially when GeoTIFFs don't have the val pr = someGeotiff.projectedRaster
val tile = pr.tile.interpretAs(UShortConstantNoDataCellType)
val fixedpr = ProjectedRaster(tile, pr.extent, pr.crs) |
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_162).
Type in expressions for evaluation. Or try :help.
scala> :paste
// Entering paste mode (ctrl-D to finish)
@deprecated("this method will be removed // dummy conversion", "GeoTrellis")
implicit def intToString(i: Int): String = i.toString
// Exiting paste mode, now interpreting.
intToString: (i: Int)String
scala> val str: String = 25
<console>:12: warning: method intToString is deprecated: this method will be removed // dummy conversion
val str: String = 25
^
str: String = 25 |
So how about we start off with just |
It looks like 3.0 release is very close :D we can try to get it merged in |
Testing it out now; works as advertised: MultibandTilePolygonalSummaryHandler.scala:41:113: method featureToRaster in object Raster is deprecated: Implicit conversions considered unsafe
...
MatchingRasters.scala:56:33: method projectedToRaster in object ProjectedRaster is deprecated: Implicit conversions considered unsafe Need to determine a better message tho... |
Partially addresses locationtech#2829. Signed-off-by: Simeon H.K. Fitch <fitch@astraea.io>
To wit:
I suggest removing these:
geotrellis/raster/src/main/scala/geotrellis/raster/ProjectedRaster.scala
Lines 38 to 44 in cb39e0b
I also think the ones from tuples should go to, but the argument isn't as strong. Same for
Raster[T]
.Related: #1780, #2768
The text was updated successfully, but these errors were encountered: