It works perfectly. Thank you for the solution.
I tried this using a similar approach, it should work with not just points, but any feature class
In my test the point feature class had a Long field RASTERVALU with value 2.
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> <SPAN class="keyword token">from</SPAN> arcpy <SPAN class="keyword token">import</SPAN> env <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> oldgrid <SPAN class="operator token">=</SPAN> Raster<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"oldgrid.tif"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> env<SPAN class="punctuation token">.</SPAN>cellSize <SPAN class="operator token">=</SPAN> oldgrid <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> env<SPAN class="punctuation token">.</SPAN>snapRaster <SPAN class="operator token">=</SPAN> oldgrid <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> env<SPAN class="punctuation token">.</SPAN>extent <SPAN class="operator token">=</SPAN> <SPAN class="string token">"MINOF"</SPAN> <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> r <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FeatureToRaster_conversion<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Feature"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"RASTERVALU"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"xg"</SPAN><SPAN class="punctuation token">,</SPAN> oldgrid<SPAN class="punctuation token">.</SPAN>meanCellHeight<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> env<SPAN class="punctuation token">.</SPAN>extent <SPAN class="operator token">=</SPAN> oldgrid<SPAN class="punctuation token">.</SPAN>extent <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> outraster <SPAN class="operator token">=</SPAN> Con<SPAN class="punctuation token">(</SPAN>IsNull<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"xg"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"test"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"xg"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> outraster<SPAN class="punctuation token">.</SPAN>save<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"test1"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
This also worked.
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CopyRaster_management<SPAN class="punctuation token">(</SPAN>oldgrid<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"test1"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Append_management<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"xg"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"test1"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
One way that works for one pixel and could work in different ways for multiple pixels...
Summary:
In short create a single point in an editing session, use it as a mask feature, extract the pixel from the source, reclassify it, append it back to it's source (using source as the target), then reclassify it again to normalize it with the rest of the source raster.
General Steps:
1. Set the environment's geoprocessing x, y, z tolerances - this important
2. Create a point feature class, import the coordinate system of the raster, start an editing session, zoom to the pixel and add a point on the pixel and save
3. Use Spatial Analyst Tools\Extraction\Extract by Mask, set the input raster and use the point as the feature mask data and run
You should now have a single pixel in the extracted output raster
4. Use Spatial Analyst Tools\Reclass\Reclassify and assign the pixel the value you want
Here's the tricky part:
5. Use Data Management Tools\General\Append and append the pixel raster to it's source At this point it may not look like it worked because you can not access the new value in the ArcMap symbology tab, however...
6. Run Spatial Analyst Tools\Reclass\Reclassify then "Add Entry" and type the value in as old and new
7. After the reclassification you should have a raster with the pixel updated.
I was using ArcMap 10.5 with LiDAR derived rasters and used a similar technique to clean up a bunch of pixels in an area using a polygon mask...
Incidentally I was only working with a small section of a relatively small raster and went with the raster to point option. Edited the points, then converted back to raster setting snap raster as the original. It worked for my purposes but the addin looks like it would make things much easier.
I've just tried this but get the error "void startEditing()" when I try to start editing any rasters. I've converted to GRID and starting a regular edit session first but no joy. Did you come across any similar problems?
ARIS Grid & Raster Editor for ArcMap
Sam, a coworker of mine was looking for the same functionality just yesterday. I asked around and got suggestions similar to what you've already received, but then I did some web searching and found this extension/add-on: GitHub - haoliangyu/ares: ArcMap Raster Edit Suite
I downloaded it and tested it on a GRID raster I had sitting around, it seemed to work for me. It has a very nice design to its toolbar too, the icons match up with the Esri icons!
Is this the functionality you were looking for?
The ARIS Grid & Raster Editor for ArcMap now also supports edits on multi-band RGB rasters. You can edit cells/pixels in one to three bands all at the same time through the Red, Green and Blue channels by painting in the map.
Available for ArcGIS 10.0 - 10.8:
https://www.aris.nl/gridrastereditor_arcmap
The latest version of ARIS Grid & Raster Editor for ArcMap (https://www.aris.nl/gridrastereditor_arcmap) will let you do a limited number of edits in an edit session for free during the trial period. These edits are saved instantly so you can really check out whether it suits your work.
In this tool many common drawing tools can be used on raster data like: pencil/freehand, line, polygon, paintcan, replace specific values, selection area.
Besides the ESRI GRID format now also many other raster formats are supported like BIL, BIP, BSQ, ENVI, Erdas IMG, FGDBR, (Geo)TIFF, ...
Hmmm...to my knowledge not with core software but I could be mistaken. I did find the ARIS GRID Editor for ArcMap at http://www.aris.nl/index.php?option=com_content&view=article&id=210:aris-grid-editor-for-arcmap&catid=64:arcgis-tools&Itemid=161 that would do what you want. An option to consider...Regards,Robert
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.