POST
|
Hi Cody, Thank you for your suggests. I'll run these past the rest of the group. At the risk of sounding like I've skipped over something, I understand how a mosaic can be created in ArcGIS, but I do not know how ortho images would be created from UAV data (i.e. non-nadir). Is there a workflow for that? Is that something that has been added between 10.3.1 and Pro? Thank you, John
... View more
02-07-2018
10:22 AM
|
0
|
1
|
3362
|
POST
|
Hi Dan, Thank you for your note! For other reasons I would like to stay in 10.3.1, personally. But, I'll give ArcGIS Pro a shot as well. Thank you, John
... View more
02-06-2018
03:31 PM
|
0
|
0
|
3362
|
POST
|
Hello Cody, The image was created in Pix4D from UAV images recorded with a MicaSense RedEdge sensor. Although the camera records in 16-bit, Pix4D created 32-bit GeoTIFF outputs. I should be able to switch the output to 16-bit in Pix4D, but I have not been able to find that setting in the version of the software I have and I think that issue is maybe best left to a different forum. If that is something I should include, please let me know. Due to the bit-depth issue, I thought I should be able to convert the values in ArcGIS and be good to go. I am converting thousands of files from roughly 70 surveys that were carried out by someone before me on a university/research project. These surveys cover a series of turfgrass plots and surveys were repeated on multiple days with the aim of observing a blight taking over the grass fields. Some surveys have RGB composite rasters/orthophotos/images while others have individual reflectance rasters which I was planning to convert to 16-bit and create a composite raster (R,G,B, NIR and RedEdge). I thought the 0.0241 to 0.0674 sounded odd! I will go over the workflow I was provided with and see if I get different values from reprocessing. The main reason I have been tasked with converting from 32- to 16-bit is the next person is suppose to carry out supervised and unsupervised image classification in ERDAS imagine. They picked that software since it is the package they are familiar with for that kind of work. They are hoping that the spectral signal in the images I process will be enough to classify the turfgrass blight automatically. Please let me know if I did not answer your questions fully. Thank you, John
... View more
02-06-2018
03:29 PM
|
0
|
3
|
3362
|
POST
|
I have several thousand TIFF files that I need to convert from 32-bit to 16-bit, but the Copy Raster geoprocessing tool appears to be providing erroneous results. As an example, I have a TIF in 32-bit format with values ranging 0.0241 to 0.0674. When I use Copy Rater and set the "NoData Value" to blank, "Pixel Type" to 16-bit unsigned, set the "Scale Pixel Value" to true, I get a TIFF with values ranging 0 to 32768, but the image appears blank no matter what histogram stretch I use. I have tried Calculating Statistics within ArcCatalog with no results. When I set "Scale Pixel Value" to false, I get values ranging 0 to 1 with an image that appears blank. I am using ArcGIS 10.3.1. Is there something I am missing?
... View more
02-06-2018
10:09 AM
|
0
|
10
|
6877
|
POST
|
I am trying to run Train ISO Cluster Classifier using Python. Can someone help me identify why I am getting Error 999999? My code looks like: #Libraries import arcpy, os from arcpy import env from arcpy.sa import * inRaster = "C:/gis/oberlin/unsupervised/inrasternorm" path = os.path.dirname(inRaster) #Get directory name env.workspace = path #Set workspace env.overwriteOutput = True #Checkout extensions arcpy.CheckOutExtension("Spatial") #Build directory structure segmentFolder = path + "/segments" #Stores the segmented images try: os.stat(segmentFolder) except: os.mkdir(segmentFolder) classifierFolder = path + "/classifier" #Stores the ECD classifier rules try: os.stat(classifierFolder) except: os.mkdir(classifierFolder) classifiedFolder = path + "/classified" #Stores the classified images try: os.stat(classifiedFolder) except: os.mkdir(classifiedFolder) #Begin with the Segment Mean Shift variables that need to change for x in range(5, 16, 1): spectral_detail = x for y in range (5, 16, 1): spatial_detail = y min_segment_size = 100 seg_raster = SegmentMeanShift(inRaster, spectral_detail, spatial_detail, min_segment_size) outName = segmentFolder + '/sms{:02d}_{:02d}.tif'.format(spectral_detail, spatial_detail) seg_raster.save(outName) TrainIsoClusterClassifier("C:/gis/oberlin/unsupervised/segments/sms05_06.tif", 5, "C:/gis/oberlin/unsupervised/classifier/sms05_06.ecd", "C:/gis/oberlin/unsupervised/inrasternorm", 50, 100, "", "MEAN") #Classify Raster classifiedraster = ClassifyRaster(seg_raster, out_definition, in_additional_raster) outName2 = classifiedFolder + '/clsfid{:02d}_{:02d}.tif'.format(spectral_detail, spatial_detail) classifiedraster.save(outName2) print "Done!" However, I get the following error: Traceback (most recent call last): File "C:\Python27\ArcGIS10.3\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript exec codeObject in __main__.__dict__ File "C:\Users\John\Desktop\unspervised_classifier.py", line 68, in <module> TrainIsoClusterClassifier("C:/gis/oberlin/unsupervised/segments/sms05_06.tif", 5, "C:/gis/oberlin/unsupervised/classifier/sms05_06.ecd", "C:/gis/oberlin/unsupervised/inrasternorm", 50, 100, "", "MEAN") File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py", line 7741, in TrainIsoClusterClassifier used_attributes) File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Utils.py", line 53, in swapper result = wrapper(*args, **kwargs) File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py", line 7731, in Wrapper used_attributes) File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geoprocessing\_base.py", line 504, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 999999: Error executing function. Failed to execute (TrainIsoClusterClassifier).
... View more
01-12-2018
01:37 PM
|
0
|
1
|
702
|
POST
|
I am new to image classification and would like to know about optimizing image segmentation within ArcGIS. From what I have read, image segmentation is possible with the Segment Mean Shift tool in ArcGIS 10.x, but I have not been able to find anything mentioning how one determines optimal segmentation has been reached. One article I found developed a method for identifying optimal segmentation by minimizing local variance [1], but it is not within ArcGIS (or any other software I have access to). Assuming minimizing variance within a segment is considered optimal segmentation, is this possible within ArcGIS? [1] Drǎguţ, L., Tiede, D., & Levick, S. R. (2010). ESP: a tool to estimate scale parameter for multiresolution image segmentation of remotely sensed data. International Journal of Geographical Information Science, 24(6), 859-871.
... View more
04-26-2017
08:09 AM
|
0
|
0
|
668
|
POST
|
Changed the line: outName = os.path.join(fgdbPath,"minpnt01") to: outName02 = os.path.join(dirName,"minpnt01.tif") seems to run now...
... View more
11-02-2016
07:57 AM
|
0
|
0
|
105
|
POST
|
Dan, Thanks for your response. The tool output: outCon = Con(Raster(r"dem") == Raster(r"outName"), 1) I tried that, as well as changing it to: outCon = Con(Raster(dem) == Raster(outName), 1) All of which end up with the same issue: RuntimeError: ERROR 010240: Could not save raster dataset to C:\gis\enforcer\enforcer.gdb\zonemin01 with output format FGDBR. I don't understand why there would be a FGDBR write error if I just created the FGDBR in the script immediately before this one. Can the write permissions be set to anyone from within Python? -John
... View more
11-02-2016
07:41 AM
|
0
|
1
|
834
|
POST
|
outName: C:/gis/enforcer\enforcer.gdb\zonemin01 outName02: C:/gis/enforcer\enforcer.gdb\minpnt01 Not sure what the issue is...
... View more
11-02-2016
07:27 AM
|
0
|
0
|
834
|
POST
|
Hello Xander, Thank you for your recommendations. I've gone through my code and changed: analysisSinks = fgdbPath + "/" + "sinkanalysis" to: analysisSinks = os.path.join(fgdbPath, "sinkanalysis") as you recommended. Additionally, thank you for noting the snapRaster typo. I've fixed that as well. Interesting how it didn't seem to throw an error in another script which I pulled the header information from on this code. I'll go back and fix it there too. Thanks, John
... View more
11-02-2016
07:26 AM
|
0
|
0
|
834
|
POST
|
Hi Luke, Thanks for your suggestion. I changed: outCon = Con(dem == outName, 1) to: outCon = Con(dem == Raster(outName), 1) But, I am still getting the same error. Is there something else I am doing incorrectly? Thanks, John
... View more
11-02-2016
07:24 AM
|
0
|
4
|
834
|
POST
|
I have the following code: import arcpy, os from arcpy import env from arcpy.sa import * arcpy.env.workspace = "C:/gis/enforcer" #Dummy path arcpy.env.overwriteOutput = True dem = "C:/gis/enforcer/dem" #Dummy path rmseDEM = 0.09 #Dummy value roads = "C:/gis/enforcer/roads.shp" #Dummy path rails = "C:/gis/enforcer/rail.shp" #Dummy path fgdb = "enforcer.gdb" #Dummy path arcpy.env.cellSize = dem arcpy.env.extent = dem arcpy.env.sanpRaster = dem desc = arcpy.Describe(dem) demResolution = desc.meanCellHeight #Assumes a square dirName = os.path.dirname(dem) fgdbPath = dirName + "/" + fgdb arcpy.CheckOutExtension("Spatial") #-----------------------------------Identify Low Points---------------------------------- analysisSinks = fgdbPath + "/" + "sinkanalysis" outName = fgdbPath + "/" + "zonemin01" outZonalStats = ZonalStatistics(analysisSinks, "OBJECTID", dem, "MINIMUM", "NODATA") outZonalStats.save(outName) outName02 = "minpnt01" #fgdbPath + "/" outCon = Con(dem == outName, 1) outCon.save(outName02) However, Con in the next to last line seems to crash PythonWin every chance it gets or throws ERROR 010240. I've tried everything from saving it as a TIF to switching to a different directory to no avail. Any recommendations?
... View more
11-01-2016
01:23 PM
|
1
|
10
|
1614
|
Title | Kudos | Posted |
---|---|---|
1 | 11-01-2016 01:23 PM | |
1 | 09-02-2016 11:47 AM | |
1 | 12-04-2011 06:05 PM |
Online Status |
Offline
|
Date Last Visited |
09-27-2021
03:25 PM
|