Select to view content in your preferred language

Create basemap using different raster data formats

4077
16
Jump to solution
03-10-2021 06:45 AM
VanyaIvanov
Regular Contributor

Can i use .tif, .jpg or .bmp surface images for creating a basemap? I use .tpk files from ArcGIS Pro as world surface image but i want to try other formats(.tif is preferable). What i use now that works but only with .tpk files:

TileCache tileCache = new TileCache("C:\\Users\\user\\Downloads\\WorldImagery1.tpk");
ArcGISTiledLayer[] tiledLayers = new ArcGISTiledLayer[1];
tiledLayers[0] = new ArcGISTiledLayer(tileCache);
Basemap basemap = new Basemap(Arrays.asList(tiledLayers), null);
arcscene = new ArcGISScene(basemap);
sceneView.setArcGISScene(arcscene);

 

 
0 Kudos
16 Replies
VanyaIvanov
Regular Contributor

When i use my tif file it loads but doesn't display. The string "raster added" appears, scene is zoomed but i haven't any image displayed. I didn't find tif file from your sample link. I found RasterLayerFile.png file and have the same result when running program with this .png file.

My SDK and JDK are 11.0.2

OS is Windows 10 Pro

0 Kudos
VanyaIvanov
Regular Contributor

VanyaIvanov_2-1617270047805.png

when i use my tif file

 

 

 

0 Kudos
VanyaIvanov
Regular Contributor

VanyaIvanov_3-1617270268308.png

when i use .png file from your sample

0 Kudos
MarkBaird
Esri Regular Contributor

@VanyaIvanov it's not easy for me to see why this isn't working unless I can get a sample of your data.

Can you post it on the forum, or if sharing your specific data isn't an option for you, then look me up here https://github.com/mbcoder and find a way of sharing the data with me.

If I can get the data you are trying to display I should be able to find the issue.

 

VanyaIvanov
Regular Contributor

Thank you. I displayed Shasta.tif. It remains to uderstand  why i can't open my .tif files

0 Kudos
MarkBaird
Esri Regular Contributor

I'm glad to hear you've managed to display a tif file which should give you confidence in your code.  

I'm happy to take a look at one of your files to see if I can see the issue.  You just need to post it here or contact me directly to find a way of sharing it.

VanyaIvanov
Regular Contributor

The problem was in CRS of my .tif images. Using Define Projection tool in ArcGIS Pro i changed CRS to the right CRS(EPSG 3857 in my case) and images started to display.

0 Kudos