I'm working with the ArcGIS .net runtime 10.2.5, in particular I'm looking at the DynamicLayerAddData sample.
I can add an local image layers just fine as long as they've got the geo/projection information embedded in the image (e.g. a geotiff with geodata in it).
My question is, is it possible to take a plain tiff and programmatically specify that geo information through the API, is that possible? (In this case I've got the plain image and the geo/proj info from a separate metadata system). Is it possible, and if so is there any sample code available?
The first thing to say is that we are working on direct support for raster data in the ArcGIS Runtime without requiring the use of LocalServer. However this will be in a future release (not the forthcoming 10.2.6 release).
Using the LocalServer, there may be several options. One would be to programmatically create the metadata files required and add the raster via the DynamicLayers capability as you have been doing so far. Another option might be to create a Geoprocessing tool which does some processing of the raster, for example create a new mosaic dataset and add the raster to that mosaic. For a list of supported GP tools see Local Server geoprocessing tools support—ArcGIS Runtime SDK for .NET | ArcGIS for Developers.
Regarding the programmatic option - I have not had a chance to try this, but the LocalServer is reading the raster as ArcGIS would read any other raster, therefore if you know how to make it work for ArcGIS Desktop or Server then it should work with the LocalServer too.
You'll probably need to consider creating:
- World File: A text file with the same name as the tif but with the extension tfw. For more info see ArcGIS Help (10.2, 10.2.1, and 10.2.2)
- Auxilliary File: An auxiliary (.AUX or .AUX.XML) file accompanies the raster in the same location and stores any auxiliary information that cannot be stored in the raster file itself. For more info see ArcGIS Help (10.2, 10.2.1, and 10.2.2)
Rasters display better with Pyramids - this is a binary file which ArcGIS can create but unfortunately the LocalServer does not currently support the 'Build Pyramids' tool. Therefore, depending on your requirements, the mosaic option above may be beneficial for you. For more info see ArcGIS Help (10.2, 10.2.1, and 10.2.2).