ISaveAs produces FDO_E_FEATURE_EMPTY_GEOMETRY when writing to JPG

1230
2
07-12-2011 03:38 AM
SteveStanton
New Contributor
I'm creating some raster tiles using code like that in http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000001z000000(mod... to accept the output file type - JPG or PNG).

At first, everything seemed to be working great. However, one of my datasets seems to have a problem writing to JPG. The call to ISaveAs.SaveAs comes back with the error: esriDataSourcesRaster.GdalDriver - Failed to copy raster dataset - COM Errorcode -2147217383 [FDO_E_FEATURE_EMPTY_GEOMETRY].

However, it works if I save to PNG. It doesn't seem to relate to the pixel type (all the files I'm working with are PT_UCHAR). Any ideas?
Reply
0 Kudos
2 Replies
SteveStanton
New Contributor
For the record, it wasn't actually FDO_E_FEATURE_EMPTY_GEOMETRY - error code -2147217383 is also E_RASTER_FAILED_TO_COPY_DATASET (which makes a lot more sense).

Looking at archived forums, I see people were having this problem years back. No answer then, no answer now. In the end, I got around it by saving initially to a BMP file, then used System.Drawing.Image.Save to convert that to JPG.
Reply
0 Kudos
RobertBerger
New Contributor III
Greetings,

The JPG format has some other limitations besides the bit depth. For example, you can only have 1 band or 3 band data and color maps are not supported. You can see that here. I don't know if your data has these kind of issues or not. Might help?

Robert
Reply
0 Kudos