How to remove background of .tif or .tiff in Raster feature ?
Closed this issue · 1 comments
I have .tif file and i'll use for Raster feature. I have problem if .tiff file have background.
So, how to i remove background of .tiff ?
I'm using implementation 'com.esri.arcgisruntime:arcgis-android:100.8.0'
Below is my sample code .
Sample code
private void setupMap() {
if (mMapView != null) {
Basemap.Type basemapType = Basemap.Type.IMAGERY_WITH_LABELS_VECTOR;
double latitude = -6.770082;
double longitude = 106.948603;
int levelOfDetail = 8;
ArcGISMap map = new ArcGISMap(basemapType, latitude, longitude, levelOfDetail);
//Polyline
createGraphics();
//GET RASTER FILE
List raster = new ArrayList<>();
raster.add(new Raster(new File("/storage/emulated/0/Download/jakarta_indonesia.tif").getAbsolutePath() ));
raster.add(new Raster(new File("/storage/emulated/0/Download/orthoMTBU.tif").getAbsolutePath() ));
raster.add(new Raster(new File("/storage/emulated/0/Download/orthoTSBC.tif").getAbsolutePath() ));
mMapView.setMap(map);
for (Raster r : raster) {
RasterLayer rasterLayer = new RasterLayer(r);
map.getOperationalLayers().add(rasterLayer);
rasterLayer.addDoneLoadingListener(() -> {
if (rasterLayer.getLoadStatus() == LoadStatus.LOADED) {
mMapView.setViewpointGeometryAsync(rasterLayer.getFullExtent(), 50);
} else {
Toast.makeText(getActivity(), "Raster Layer Failed to Load!", Toast.LENGTH_LONG).show();
}
});
}
}
}
Thank you for anyone for help.
Hi @riansyaaah
This git repository is for issues relating to the samples code and not the API.
You question is best posted in the GeoNet forum https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-android
When you post your question can you include a picture of what you are seeing as this will help us to see what is happening.
I will close this issue in a couple of days.
Thanks
Mark