POST
|
thanks for your response. I run TopoToRaster whit sample data on AGDesktop 10.0 (toolbox and arcpy script also) works fine and fast. Then on AGServer 10.2.2. as geoprocessing service (arcpy srcipt) run very slow. I changed interpolation method and it works fine now (on both platform).
... View more
10-29-2015
05:27 AM
|
0
|
0
|
253
|
POST
|
That piece of code is slice of my script (all script takes cca 20 sec). I published it on arcgis server and geoprecessing service run over minute. When I change interpolation method it runs much faster. So there is no problem between local computer and server, but in TopoToRaster method. It seems like method doesn´t take EXTENT into the account.(??)
... View more
10-29-2015
03:28 AM
|
0
|
2
|
253
|
POST
|
Hi I have code as you can see below. In ArcGIS Desktop run about 1 sec, but in ArcGISServer about 40 sec. Do anybody know where can be a problem? Thanks a lot. Martin. pMask = "in_memory\\oblastx" trsPolyline = "in_memory\\polyline" inBoundary = TopoBoundary([pMask ]) inContours = TopoContour([[trsPolyline, 'HPlus']]) inFeatures = ([inContours,inBoundary]) rRast = TopoToRaster(inFeatures,20,pMask ,20,80,3000,"NO_ENFORCE","CONTOUR",40,0,0.5,0,"#","#","#","#","#","#")
... View more
10-29-2015
03:15 AM
|
0
|
4
|
2199
|
POST
|
Hi I have one very strange error when i try compute statistics for my Raster (only happens whit FGDB Raster). It happens when i overwrite raster (when i create new raster everything is OK). Any Ideas? thanks Dim pRasterCol As IRasterBandCollection pRasterCol = pRaster Dim pBand As IRasterBand pBand = pRasterCol.Item(0) pBand.ComputeStatsAndHist() 'ERROR ERROR = "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." I create raster like this> Dim copyRaster As ESRI.ArcGIS.DataManagementTools.CopyRaster = New ESRI.ArcGIS.DataManagementTools.CopyRaster() Dim gp As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor gp.OverwriteOutput = True gp.AddOutputsToMap = False copyRaster.in_raster = pRaster copyRaster.out_rasterdataset = pOutputPath copyRaster.nodata_value = -9999 copyRaster.pixel_type = "32_BIT_FLOAT" gp.Execute(copyRaster, Nothing) gp = Nothing copyRaster = Nothing
... View more
11-19-2013
03:36 AM
|
0
|
3
|
592
|
POST
|
Thanks for reply, but i just need to check value at one point (x,y) and save whole raster is not a good idea, i think. What i need is know if the value is NoData or 0.
... View more
11-14-2013
09:18 PM
|
0
|
0
|
192
|
POST
|
Hi i have code loke belov. I set NoData value to my pRaster (IRaster2) as value - 9999. but when i use GetPixelValue(0, x, y) at pixel location whit NoData i have value = 0. do anybody know where is mistake? Or how to set my NoData Value correctly ? dim pRaster as IRaster2 . . pRasPropsIn = CType(pRaster, IRasterProps) pRasPropsIn.NoDataValue = -9999 'urcovanie hodnoty no data . . dim pValue as Single pValue = pRaster.GetPixelValue(0, x, y) here is pValue = 0 not -9999 !!!!!!
... View more
11-14-2013
05:24 AM
|
0
|
2
|
704
|
POST
|
pRaster as IRaster2 x = pFeat.Extent.XMax() 'map coordinate y = pFeat.Extent.YMax() i = pRaster.ToPixelColumn(x) 'raster coordinate j = pRaster.ToPixelRow(y) value = pRaster.GetPixelValue(0, i, j)
... View more
10-29-2013
11:59 PM
|
0
|
0
|
499
|
POST
|
Hi i want to work whit my raster via pixelBlock, but when i try define to my raster value of NoData nothing happen. (I want set NoData as -9999, but when i create array of pixels, minimum value is 0. Also when i save this raster there is no NoData values only 0). do anybody know where is a mistake? I used to create pixelblock like this in past and it was workong fine. thank a lot Dim pBlock As IPixelBlock3 Dim pPoint As IPnt Dim pRasPropsIn2 As IRasterProps Dim pRaster As IRaster Dim pSingArray As Single(,) pRaster = pOutRasterArray(0) 'Array whit raster object pRasPropsIn2 = CType(pRaster, IRasterProps) pRasPropsIn2.NoDataValue = -9999 pPoint = New DblPnt pPoint.SetCoords(10, 10) pBlock = pRaster.CreatePixelBlock(pPoint) pSingArray = CType(pBlock.PixelData(0), Single(,)) ' this array has nodata = 0
... View more
10-14-2013
03:08 AM
|
0
|
0
|
340
|
POST
|
Hi i create raster dataset (GRID) like this: pRasterDataset = pWs.CreateRasterDataset(sRasterDatasetName, "GRID", origin, pRastProps.Width, pRastProps.Height, pRastProps.MeanCellSize.X, pRastProps.MeanCellSize.Y, 1, pRastProps.PixelType, pRastProps.SpatialReference, True) and the result is raster dataset BUT whitout spatial reference. I take spatial reference from existing raster "pRastProps.SpatialReference" where is defined. When i debug pRastProps.SpatialReference has spatial reference (is not nothing) Do anybody know where is problem? (AG 10.1, VS 2010, .NET 4). thanks a lot
... View more
09-04-2013
02:59 AM
|
0
|
0
|
486
|
POST
|
Hi i want create array fill whit IRaster2 objects (Dim pRasterArray(6, 4) As IRaster2). Is it possible? How can i compute storage allocation or memory usage? for example i have 35 rasters whit celllSize 10 (5000 px * 5000 px) and i want storage it to the array. Dim pRasterArray(6, 4) As IRaster2 . . . how can i compute max size of rasters? or is it just reference to object which is 4 bytes on 32 - bit platform? thanks a lot.
... View more
08-28-2013
06:49 AM
|
0
|
0
|
570
|
POST
|
Hi how can i get raster format (type of rasterWorkspaceFactory) (GRID, FGDB, ACCESS,SDE) just from path to my raster (without searching for ".gdb/" ...)?? thanks a lot ( I Use VS 2010, AG 10.0)
... View more
08-27-2013
03:41 AM
|
0
|
0
|
528
|
POST
|
Hi is there some trick how to use .NET framework 4 for esri addin for arcgis 10.0? I know in 10.1 is 4 supported but no in 10.0. thanks
... View more
08-21-2013
03:34 AM
|
0
|
0
|
339
|
POST
|
OK try this one: use !!! "Hillshade_sa" !!! Dim gp As IGeoProcessor2 = New GeoProcessor Dim parameters As IVariantArray = New VarArray ' Populate the variant array with parameter values. parameters.Add("C:\Users\kl23_dem") parameters.Add("C:\Users\HillShadeTry") parameters.Add("315") parameters.Add("45") parameters.Add("NO_SHADOW") parameters.Add("1") gp.Execute("Hillshade_sa", parameters, Nothing)
... View more
06-03-2013
03:47 AM
|
0
|
0
|
235
|
POST
|
Dim kl23_dem As Object = "kl23_dem" I think you have to use Path to your raster layer instead of name. Private Sub Calculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calculate.Click ' Initialize the geoprocessor. Dim gp As Geoprocessor = New Geoprocessor() Dim hillshadeTool As HillShade = New HillShade ' Local variables Dim kl23_dem As Object = "C:\Users\kl23_dem" Dim HillShadeOut As Object = "C:\Users\HillShadeTry" Dim parameters As IVariantArray = New VarArray ' Populate the variant array with parameter values. parameters.Add(kl23_dem) parameters.Add(HillShadeOut) parameters.Add("315") parameters.Add("45") parameters.Add("NO_SHADOW") parameters.Add("1") gp.Execute("Hillshade", parameters, Nothing) End Sub
... View more
05-30-2013
11:22 PM
|
0
|
0
|
235
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|