POST
|
Thank you Xander and all. it is solved now. As suggested by Xander, I used the Aggregate tool to evaluate minimum and maximum first, then I used Raster calculation to calculate range (Max - Min). Appreciate your time.
... View more
11-19-2017
02:19 AM
|
0
|
1
|
934
|
POST
|
Hi, I have two raster, Raster1 ( ~1km resolution ) and Raster2 (90m resolution). There are about 100 pixels of Raster2 under a pixel of Raster1. I would like to calculate range (max-min) of those 100 pixels of Raster2 for each pixel of Raster1. I tried zonal statistics, which accumulated the range values for each value of pixel NOT for each pixel, which I don't want. I appreciate any clue how to do this. Many thanks in advance.
... View more
11-18-2017
11:08 AM
|
0
|
6
|
1587
|
POST
|
Thanks everyone, I decided to go with Model Builder as suggested by Rebecca.
... View more
11-08-2015
01:16 PM
|
0
|
1
|
512
|
POST
|
Hi, I am going to perform repeated task for large data set here are few tasks I am looking for help 1. I need to convert set of raster from integer to float, then 2. divide all the raster by value 10, then 3. select cells above X and less than Y, then 4. subtract value M from each cell in each raster, then 5. subtract each cell of each raster to Value N, then 6. sum up all the raster, then 7. divide by value Z I did this using tools in ArcGIS but it seems that I could not document all the steps and there are chances of missing steps when I perform in large data set in repetitive manner. hence, I am looking for python script. I am novice in python. your kind help is highly appreciated.
... View more
11-06-2015
06:23 AM
|
0
|
6
|
2573
|
POST
|
Thanks for the codes, I Think its working now, I will post more latter thanking you
# Import system modules
import arcgisscripting, os
# Create the Geoprocessor object
gp = arcgisscripting.create()
import arcpy
import os
import glob
# Path to ascii files
filepath = r"J:/BIOCLIM_Data/a1b_scenario/csiro_mk3_0_sres_a1b_2020s_bio_30s_no_tile_asc/new folder"
# Path where to put rasters
outFolder = r"J:/BIOCLIM_Data/a1b_scenario/csiro_mk3_0_sres_a1b_2020s_bio_30s_no_tile_asc/new folder"
ascList = glob.glob(filepath + "/*.asc")
print ascList
for ascFile in ascList:
outRaster = outFolder + "/" + os.path.split(ascFile)[1][:-3] + "tif"
print outRaster
arcpy.ASCIIToRaster_conversion(ascFile, outRaster, "FLOAT")
... View more
03-15-2013
08:31 AM
|
0
|
0
|
694
|
POST
|
Dear all I am trying to convert many ASCII files to Raster from Python I edited following codes from different sources but I don't know where it went wrong, but not working it just list out different ASCII file names present in the folder any our help be appreciated thanking you here is my code
# Import system modules
import arcgisscripting, os
# Create the Geoprocessor object
gp = arcgisscripting.create()
import arcpy
# Set local variables
InAsciiFile = None
inDir = r'J:/BIOCLIM_Data/a1b_scenario/csiro_mk3_0_sres_a1b_2020s_bio_30s_no_tile_asc'
OutRaster = 'J:/BIOCLIM_Data/a1b_scenario/csiro_mk3_0_sres_a1b_2020s_bio_30s_no_tile_asc/Raster format'
gp.outputCoordinateSystem = "Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"
for InAsciiFile in os.listdir(inDir):
if InAsciiFile.rsplit(".")[-1] == "asc":
print InAsciiFile
try:
full_path = os.path.join(inDir, filename)
inASCII = '%s.asc' % (full_path,)
outRaster = '%s.img' % (full_path,)
# Process: ASCIIToRaster_conversion
gp.ASCIIToRaster_conversion(os.path.join(inDir,InAsciiFile), OutRaster, "FLOAT")
except:
pass
... View more
03-14-2013
10:07 PM
|
0
|
0
|
694
|
POST
|
Dear all here is my syntax
import arcpy
import os
dir_name = "J:/BIOCLIM_Data/a1b_scenario/csiro_mk3_0_sres_a1b_2020s_bio_30s_no_tile_asc"
for filename in os.listdir(dir_name):
if not filename.endswith("%s.asc"): continue
full_path = os.path.join(dir_name, filename)
inASCII = '%s.asc' % (full_path,)
outRaster = '%s.img' % (full_path,)
rasterType = "FLOAT"
arcpy.ASCIIToRaster_conversion(inASCII, outRaster, rasterType)
I don't know where it went wrong, but is not working out put is
Traceback (most recent call last):
File "C:\Documents and Settings\Madan K Suwal\Desktop\R to A.py", line 7, in <module>
arcpy.ASCIIToRaster_conversion(inASCII, outRaster, rasterType)
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 1615, in ASCIIToRaster
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000865: Input ASCII raster file: bio_1.asc does not exist.
Failed to execute (ASCIIToRaster).
I am very new in python, actually just modified the syntax from online sources, so I don't know what wrong with it I need to convert about 150 ASCII files to Raster and define projection WGS 1984 to them at the same time I want to automate the process, I am expecting this forum's support, any kind help is appreciated thanking you Regards madan k suwal
... View more
03-14-2013
02:35 AM
|
0
|
1
|
326
|
POST
|
dear all, I got the same problem, I need to find distance between point and polygon (nearest distance to polygon boundary regardless of direction/angle), similary, I also need to find distance between the same points and line (river), again regardless of direction/angle. I have more than 2000 points and more than 6000 rivers, so, doing manually will result much more error and it is much time consuming, I am looking for solution many thanks from your kind support madan k suwal Nepal
... View more
03-24-2012
10:13 PM
|
0
|
0
|
536
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|