Select to view content in your preferred language

load geotiff or other raster from a remote url

852
5
07-05-2011 11:53 PM
devrim_barisacar
Emerging Contributor
Hi
I am just evaluating silverlight for a project proposal.


Can I load a raster image without using arcgis server(I have seen samples load from KML)?  For example from an URL like http://myserver.com/worldBackground.tiff.

Thanks in advance.
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
You can use an ElementLayer to display images or videos.
There is a sample here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MediaLayer

Note that Silverlight doesn't support tiff format though.
So you will need either a 3rd party component or a conversion to a supported format (jpeg, png (no gif nor tiff)).
0 Kudos
devrim_barisacar
Emerging Contributor
Thank you Dominique.
I am not allowed to use the local ARCGIS Server for serving the world image.
So my solution was to load this world image layer from a file or url.

As far as I understand from the sample I will replace the
     Source="http://serverapps.esri.com/media/scec-shakeout-simulation-rt.wmv"
line with the url of the imagery and I will be done , correct?

If I change the projection of the map, will this imagery also change projection?

Best regards
baris



You can use an ElementLayer to display images or videos.
There is a sample here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MediaLayer

Note that Silverlight doesn't support tiff format though.
So you will need either a 3rd party component or a conversion to a supported format (jpeg, png (no gif nor tiff)).
0 Kudos
DominiqueBroux
Esri Frequent Contributor
As far as I understand from the sample I will replace the
Source="http://serverapps.esri.com/media/scec-shakeout-simulation-rt.wmv"
line with the url of the imagery and I will be done , correct?


Almost! You have also to set the esri:ElementLayer.Envelope to the correct map coordinates for your image.

If I change the projection of the map, will this imagery also change projection?

Nothing automatic. You have to adapt the envelope of your element to the map coordinates.
0 Kudos
devrim_barisacar
Emerging Contributor
Almost! You have also to set the esri:ElementLayer.Envelope to the correct map coordinates for your image.


Nothing automatic. You have to adapt the envelope of your element to the map coordinates.


Doing this adaptation, are there any libraries I can make use of during calculation of this transformation between projections? Or am I on my own?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Doing this adaptation, are there any libraries I can make use of during calculation of this transformation between projections? Or am I on my own?


The most general answer is the Geometry service (sample here :http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Project).

For the particular case of transformations between webmercator and geographical coordinates, you can use the WebMercator class : http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Projection...

Nothing else is available at the client side (for the moment).
0 Kudos