Select to view content in your preferred language

Grainy Raster Dataset in Flex, but not in ArcMap???

1587
7
03-21-2011 12:56 PM
TonyCollins
Regular Contributor
Hi, I have two Raster Datasets containing Aerial Photography. They has been created on Server 9.3.1.

One of them appears perfectly from Flex, but the other appears really grainy like a heavily compressed JPEG.

Both of these appear fine in ArcMap when using Direct Connect or the actual ArcGIS Server service the Flex API is using?
Tags (2)
0 Kudos
7 Replies
TonyCollins
Regular Contributor
If you look closely at this image you can see what I mean. Look in the bottom left at the grass to see:



The image quality is identical in Arcmap when calling from the database or using the ArcGIS service, but when viewed through the API it goes grainy like above.

HELP!!!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tony,

    Are you adding them to the map as a ArcGISDynamicMapServiceLayer? If so have you tried to set the imageFormat="jpg" and dpi="150"? This is what I do for my Imagery layers.
0 Kudos
TonyCollins
Regular Contributor
Tony,

    Are you adding them to the map as a ArcGISDynamicMapServiceLayer? If so have you tried to set the imageFormat="jpg" and dpi="150"? This is what I do for my Imagery layers.


Hi Robert,

You are a STAR!!!

One thing though, I have had to use PNG24 as this layer is scale dependant and when the layer should not be shown the whole screen goes white. I am asuming this is because the API makes the layers transparent or something when they should not be visible (which JPG does not support)??

Does this sound right to you?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tony,

  Yep that's why I actually use these lines in my code:

if(label == "Aerial Photography")
      {
       dynLayer.imageFormat = "jpg";
       dynLayer.dpi = 150;
       dynLayer.minScale = 10000;
      }
0 Kudos
TonyCollins
Regular Contributor
Tony,

  Yep that's why I actually use these lines in my code:

if(label == "Aerial Photography")
      {
       dynLayer.imageFormat = "jpg";
       dynLayer.dpi = 150;
       dynLayer.minScale = 10000;
      }




Thanks Robert,

Do you know whether the image format I specifiy is done on the client or ArcGIS Server? I think I would prefer using PNG24 to stop the white area you get whilst the layer loads but I definately don't want any extra load on the server?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tony,

   I am pretty sure it is server side. Which means larger images/bytes that are to be transferred to the client if PNG 24.
0 Kudos
TonyCollins
Regular Contributor
Tony,

   I am pretty sure it is server side. Which means larger images/bytes that are to be transferred to the client if PNG 24.


Oh Ok, I shall have to do some testing.
Thanks as always Robert, you helped me hugely!!!
0 Kudos