<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Jenks Classification in a script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733771#M56897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Noah,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after I posted the pdf, I did indeed type up this piece of code as a python script. And tested it on a set of random numbers generated by python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code worked fine. Havn't tested it again to see if it returns the same split values as ArcMap symbol editor though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I overlooked your original intention, classify an "image", and get those values into a reclassify routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found that the script worked well with, say, several 100's of records. But it doesn't scale very well. All those mat1, mat2 lists which it has to shuffle through. Once these get large, it gets very large.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you might have to consider is to resample your slope raster using 1000 random points then use those values as an input into the Jenks classifier routine. Obviously converting the entire image (via raster to point or something), you will end up with too much data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2014 17:18:26 GMT</pubDate>
    <dc:creator>NeilAyres</dc:creator>
    <dc:date>2014-03-20T17:18:26Z</dc:date>
    <item>
      <title>Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733767#M56893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a portion of a stand alone script in which the user supplies the dem for the slope analysis.&amp;nbsp; The reclassify tool would otherwise allow me to choose a jenks classification and set the number classes to 10.&amp;nbsp; I need to supply the reclassify tool the necessary parameters to accomplish the same thing without the benefit of the arcgis tool dialogue.&amp;nbsp; How can I set this up programmatically using the output slope raster to supply the necessary parameters to the reclassify tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial")&amp;nbsp; # Execute Slope try: &amp;nbsp;&amp;nbsp;&amp;nbsp; outSlope = Slope(raster_clip, "DEGREE", 3.2808333) &amp;nbsp;&amp;nbsp;&amp;nbsp; dem_Slope = outSlope.save("dem_Slope") &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Slope complete.") except: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError("Was not able to complete slope...")&amp;nbsp;&amp;nbsp; # Reclassify the slope raster remapTable = Reclassify (dem_Slope, Value, ...&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 20:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733767#M56893</guid>
      <dc:creator>NoahHuntington</dc:creator>
      <dc:date>2014-03-18T20:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733768#M56894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Jenks classification is a reasonably complex calculation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this on the web some time ago.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I cannot remember where it came from, so cannot attribute the author.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Havn't tried to implement this code either, so cannot say if it actually works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 05:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733768#M56894</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2014-03-19T05:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733769#M56895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The Jenks classification is a reasonably complex calculation.&lt;BR /&gt;I found this on the web some time ago.&lt;BR /&gt;Unfortunately I cannot remember where it came from, so cannot attribute the author.&lt;BR /&gt;Havn't tried to implement this code either, so cannot say if it actually works.&lt;BR /&gt;Good luck,&lt;BR /&gt;Neil&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Neil!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am glad you chimed in.&amp;nbsp; I imagined it would be fairly complicated. I will work with this and see if I can't make it happen!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Noah&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 12:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733769#M56895</guid>
      <dc:creator>NoahHuntington</dc:creator>
      <dc:date>2014-03-19T12:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733770#M56896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neil... If I can pick your mind a bit further?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe this will work perfectly with the standalone script I am working on. I am admittedly somewhat novice with python but can generally follow the usage and flow of a script. With that said I have a question regarding obtaining �??datalist�?� variable. I am working witha slope raster where I am interested in classifying the �??Value�?� from the cells. Any suggestions on obtaining the datalist? Cursor or otherwise?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 16:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733770#M56896</guid>
      <dc:creator>NoahHuntington</dc:creator>
      <dc:date>2014-03-19T16:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733771#M56897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Noah,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after I posted the pdf, I did indeed type up this piece of code as a python script. And tested it on a set of random numbers generated by python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code worked fine. Havn't tested it again to see if it returns the same split values as ArcMap symbol editor though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I overlooked your original intention, classify an "image", and get those values into a reclassify routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found that the script worked well with, say, several 100's of records. But it doesn't scale very well. All those mat1, mat2 lists which it has to shuffle through. Once these get large, it gets very large.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you might have to consider is to resample your slope raster using 1000 random points then use those values as an input into the Jenks classifier routine. Obviously converting the entire image (via raster to point or something), you will end up with too much data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 17:18:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733771#M56897</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2014-03-20T17:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733772#M56898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another idea and probably more practical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why not let ArcGIS do the classification and then access the value of the split values via the arcpy.mapping module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the RasterClassifiedSymbology class here :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/#/RasterClassifiedSymbology/00s30000005p000000/"&gt;http://resources.arcgis.com/en/help/main/10.2/#/RasterClassifiedSymbology/00s30000005p000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;That could work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 17:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733772#M56898</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2014-03-20T17:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Jenks Classification in a script</title>
      <link>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733773#M56899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neil&amp;nbsp; I've read thru the resources and am not finding many examples on implementing this approach.&amp;nbsp; I think you may be onto something.&amp;nbsp; Is there anyway you can elaborate or assist me in implementing this with my data?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 16:59:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jenks-classification-in-a-script/m-p/733773#M56899</guid>
      <dc:creator>NoahHuntington</dc:creator>
      <dc:date>2014-03-21T16:59:24Z</dc:date>
    </item>
  </channel>
</rss>

