RasterLayer加载本地文件问题
Qiaoxinghua opened this issue · 3 comments
1.请问使用RasterLayer加载本地tif文件,有办法去除黑边吗?
目前,我们的SDK不支持改变RasterLayer的透明度。一个可能的办法是用mask RasterFunction。或者是在ArcGIS Pro或Desktop 中处理。
Question: Is there a way to remove black border of tif image through RasterLayer
? Or change the black border to be transparent?
Answer: RasterLayer doesn't support changing transparency. One possible solution is to create a RasterFunction
using mask function json. Then create a Raster
from the RasterFunction
. Or preprocess the tif image in Pro or Desktop before creating a RasterLayer from the tif image.
2.请问使用RasterLayer支持加载png格式的图片吗?
RasterLayer支持加载png格式的图片。参见https://developers.arcgis.com/android/latest/guide/add-raster-data.htm#ESRI_SECTION1_D3B90253C5A945BEB79E521C344E945D
Question: Can RasterLayer read png images?
Answer: Yes. More raster formats supported by our SDK can be found at https://developers.arcgis.com/android/latest/guide/add-raster-data.htm#ESRI_SECTION1_D3B90253C5A945BEB79E521C344E945D.
非常更感谢您的回复,我使用
Raster raster = new Raster(rasterFilePath);
RasterLayer rasterLayer = new RasterLayer(raster);
ArcGISMap map = new ArcGISMap(new Basemap(rasterLayer));
这种方式加载png图片是可以显示的,但是使用下面这种方式却不能显示
Raster raster= new Raster(path);
final RasterLayer rasterLayer= new RasterLayer(raster);
map.getOperationalLayers().add(rasterLayer);
请问这是什么原因,期待您的回复!
请问你的底图和png 图层的坐标系统分别是什么?
What are the spatial references of your basemap and your png image respectively?
请以后使用 https://community.esri.com/ 网站和英文报告问题, 谢谢!