wereber

XY coordinates using SQL command for ST_RASTER

Discussion created by wereber on Jun 17, 2014
Latest reply on Dec 11, 2014 by tpcolson
Hi,

I have seen the posts:
http://forums.arcgis.com/threads/85557-Oracle-SQL-and-ST_RASTER-some-functions-work-others-don-t.?highlight=st_raster
http://forums.arcgis.com/threads/110319-XY-coordinates-using-SQL-command

but I have not solved the problem, like the first post some functions work, others don't but the error is diferent, I can issue SQL such as:

SELECT sde.st_raster_util_getVersion();
the result is: 1000

SELECT raster.getPixelType() FROM unam.sde.HR_50M_U_00Z02ENE2005
The result is: FLOAT

SELECT raster.describe(null) from unam.sde.HR_50M_U_00Z02ENE2005
the result is: Raster ID ...................: 1 Raster Column ID ............: 2 Raster Dimension ............: 972, 571, 1 Raster Tile Dimension .......: 128, 128 Pixel Type ..................: float Compression .................: lz77 Image Pyramid ...............: 4, nearest Extent ......................:    minx    :              -121.66974999999999   miny    :                12.17025   maxx    :               -82.34425   maxy    :                35.25525 Cell Size....................:    x       :                 0.0405   y       :                 0.0405 Statistics ..................:    min     :             -9999.0000000000   max     :                12.0319995880   mean    :             -1839.1215462317   std dev :              3871.6449191090

However when try to get a pixel value, the query fails with errors:
SELECT raster.getValueByLoc(1,1,-105.2,18.5) from unam.sde.HR_50M_U_00Z02ENE2005
Ther result is:
Msg 6522, Level 16, State 1, Line 1
Error de .NET Framework occurred during execution of user-defined routine or aggregate  "ST_Raster":
System.DllNotFoundException: Unable to load DLL 'sde.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
System.DllNotFoundException:
   at SES_inflate_init(IntPtr* )
   at RasterCodec.decodeLZ77(RasterCodec* , SByte* dest, SByte* src, Int32* size, Int32 numPixels, Int32 dataSize, Int32 bytesPerPixel, SByte* zbuf, Int32 zbufSize)
   at RasterCodec.decode(RasterCodec* , SByte* dest, SByte* src, Int32* size, Int32 numPixels, Int32 tileSize, Int32 dataSize, Int32 bandTypes, SByte* zbuf, Int32 zbufSize)
   at gsrvr.SdeRasterTile.decode(SdeRasterTile* , SByte* src, Int32* size, SdeRasterBitmap** bitmap)
   at ST_RasterCommon.getPixelValueCommon(ST_RasterCommon* , Int32 band, Int32 l, Int32 x, Int32 y, PixelValueArgument* __unnamed004)
   at ST_RasterSS.getPixelValue(ST_RasterSS* , Int32 band, Int32 l, Double __unnamed002, Double __unnamed003, Double* __unnamed004)
   at ESRI_ArcSDE.STRasterType.ST_Raster.getValueByLoc(SqlInt32 band, SqlInt32 level, SqlDouble x, SqlDouble y)


Windows Server 2003 R2
SQL Server 2008 with ArcSDE 10.0
.NET Framework 3.5

Thanks,
-RL

Outcomes