POST
|
I have managed to publish multiple raster (tiff) under one mosaic dataset as Image Service. I also manage to use ArcGISImageServiceLayer to load the ImageServer above. but how do I retrieve a single raster image based on their name? I tried to set the ImageServiceLayer initialExtent and fullExtent, but ImageServiceLayer always use the Map Extent which always return all the rasters. I also used "setDefinitionExpression" method in ImageServiceLayer but there is nothing being drawn on the map. The closest that I manage to do was: 1. use query on ImageServer with Name = '<raster_name>' 2. Get the Extent of the return record 3. Create ImageServiceParameters with Extent in #2 above as value 4. use exportMapImage and pass in ImageServiceParameters in #3 above. When I check Chrome debugging console, #4 above return the correct image that I want to load. Question is: How do i load the MapImage returned by the method callback into current ImageServiceLayer?
... View more
08-25-2016
08:02 PM
|
0
|
0
|
782
|
POST
|
I have to add two rasters, one bigger than the other, but before adding I have to set the value of NODATA of smaller raster to the value of bigger raster. So i used the following code to do it: import arcpy
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")
arcpy.env.extent = "MAXOF"
arcpy.env.overwriteOutput = True
smallerRaster = arcpy.Raster(r"C:\Temp\smallraster.asc")
biggerRaster = arcpy.Raster(r"C:\Temp\bigraster.asc")
OutputRaster = Con(IsNull(smallerRaster), biggerRaster, smallerRaster + biggerRaster)
resultRaster = r"C:\Temp\resultRaster"
OutputRaster.save(resultRaster + "_con.tif")
arcpy.RasterToASCII_conversion(resultRaster + "_con.tif", resultRaster + "_con.asc")
arcpy.gp.Con_sa(IsNull(smallerRaster), 0, resultRaster + "_con_sa.tif", smallerRaster + biggerRaster)
arcpy.RasterToASCII_conversion(resultRaster + "_con_sa.tif", resultRaster + "_con_sa.asc") For Con_sa, smaller raster cell value (those that are NODATA) is assigned to NODATA value (in my sample it is -9999) instead of assign with bigger raster cell value. (I tried with constant value of 0, it still assigned them with NODATA) I need to use Con_sa because the script can be executed by more than one instance of application. While Con result is what I needed, the output temporary result will be stored in "<User Folder>\AppData\Local\ESRI\Desktop10.3\SpatialAnalyst\<RASTER_RESULT>", when the script executed in paralel, the CON will fail due to racing condition in code execution (either throw FATAL error) or (Raster cannot be found). So is there away to set the NODATA value to constant value when I'm using Con_sa for my scenario above? I will attach the raster that I used in this example.
... View more
06-03-2016
01:59 AM
|
0
|
0
|
2474
|
POST
|
I'm new with raster concept, so reason why I ask the question because when publish Image Service using arcpy, it shows "Raster data source does not have statistics CODE 10010) and came across this: 10010: Raster data source does not have statistics—Documentation (10.3 and 10.3.1) | ArcGIS for Server and it said: "Your raster data source does not have statistics computed, which can degrade your raster display and potentially impact drawing performance." My understanding is that statistics only needed if we want to do raster operation. So if there is no operation on the raster (only display), do we need to calculate the statistics? If raster has statistics, is it drawn faster when ArcGIS javascript call it from "ArcGISImageServiceLayer" API?
... View more
05-17-2016
11:41 PM
|
0
|
1
|
2202
|
POST
|
Currently based on the Polygon_To_Raster1 image, the area with the RED rectangle, when it converts to Raster, the cell is assigned as NoData, even though the polygon geometry actually cover that cell. I would like to convert Polygon to Raster where as long as the polygon geometry overlap the cell (Not only cell center), the cell will be assigned with field value. I will have another script that will implement mathematical formula to each of the cell that is not NoData.
... View more
05-16-2016
01:57 AM
|
0
|
1
|
980
|
POST
|
I'm using Polygon to Raster tool to create a raster (10x10). The problem is that some cells of the output raster is not assigned any value. My understanding is that the tool always uses the cell center to decide the value of a raster pixel. Attached is the result when I overlay both the output raster and Input polygon on ArcMap. (Black is the NoData cell). Anyway to include all those cells that fall within the polygon when generating the raster? I tried to use Feature Vertices to Points to generate the point and convert the points to raster, but the vertex of the polygon that I used only have 1 vertex. Another item to note is when using smaller cell size (1x1), the raster cell generated are good but when I resample it to 10x10, the output raster from resampling is the same as above raster.
... View more
05-16-2016
12:32 AM
|
0
|
3
|
2958
|
POST
|
Hi Guys, I created and publish a layer using: MakeRasterCatalogLayer_management SaveToLayerFile_management AddLayerToGroup CreateMapSDDraft AnalyzeForSD StageService_server UploadServiceDefinition_server In the python script I will add relevant layers to the MXD to its respective group: 1. I created a layer from "QRA_Official_Plot_Plans" raster catalog. 2. Save the layer to layer file. 3. Rename the layer to "top_PlotP_VOPAK-S04" 4. Added in the layer into the group "Plot Plans" layer group. Problem is the layer name in MXD file for the mentioned layer is not the same as what is reflected in ArcGIS REST Service JSON. When I opened up the MXD, it shows "top_PlotP_VOPAK-S04" (as shown in TOC.png). But when I go the JSON layer definition, it shows the Raster Catalog name where I queried the layer from (as shown in JSONLayerDefinitino.png).
... View more
04-05-2016
01:43 AM
|
0
|
0
|
3517
|
POST
|
I managed to achieve the heat map I'm looking for using Kernel Density (Spatial Analysis) and use the respective attribute as a value for "Population Field".
... View more
11-30-2015
02:05 AM
|
1
|
2
|
1794
|
POST
|
I've run through tutorial from ArcGIS on how to create a heat map using Spatial Analysis. Based on the example, point features are scattered around the map and we need do the following to generate heat map. Run Project Data -> Integrate Data -> Collect Events -> Run "Hotspot Analysis" -> Run "Spatial Analysis" Is it possible to generate a heat map if I don't have point features that are scattered around the map but instead I have point features that have an attribute value that represent "Number of point" around this point features? For example: I have 5 locations. In the first scenario, I will have 5 points feature around area #1 20 points feature around area #2 40 points feature around area #3 30 points feature around area #4 10 points feature around area #5 While for second scenario, I will have Point feature 1, attribute value: 5 Point feature 2, attribute value: 20 Point feature 3, attribute value: 40 Point feature 4, attribute value: 30 Point feature 5, attribute value: 10
... View more
11-29-2015
10:10 PM
|
0
|
3
|
7858
|
Title | Kudos | Posted |
---|---|---|
1 | 11-30-2015 02:05 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|