XY coordinates using SQL command for ST_RASTER

2096
2
06-17-2014 08:36 AM
RamonLira
New Contributor
Hi,

I have seen the posts:
http://forums.arcgis.com/threads/85557-Oracle-SQL-and-ST_RASTER-some-functions-work-others-don-t.?hi...
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
0 Kudos
2 Replies
RamonLira
New Contributor
I have solved the problem, copy the file sde.dll to the system32 and SysWOW64 folders,

thanks

-RL
0 Kudos
ThomasColson
MVP Frequent Contributor

I am having the same exact problem. I can query raster properties successfully, but

raster.getValueByLoc(1,1,-83.458047,35.713469)  FROM  [dbo].[GRSM30DEM]

Returns the same error.

Msg 6522, Level 16, State 1, Line 1

A .NET Framework error occurred during execution of user-defined routine or aggregate "ST_Raster":

System.Runtime.InteropServices.SEHException: External component has thrown an exception.

System.Runtime.InteropServices.SEHException:

   at _CxxThrowException(Void* , _s__ThrowInfo* )

   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)

I too have copied sde.dll into those two directories, same error again. Wonder why the correct configuration instructions aren't included on ESRI help? What other steps are required to get ST_RASTER working correctly?

SDE 10.2.2 SQL 2012 SP1


0 Kudos