<?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: Merging multiple featureclasses... in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275905#M9505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It was definitely the long paths causing this particular problem. As soon as I shortened them, it worked like a charm - that is, I was able to access the data from another path which was much shorter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am not sure what you mean by, "...always write my scripts to set a folder with a wildcard string...". Could you explain this a bit more or give an example? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate the help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2013 17:19:46 GMT</pubDate>
    <dc:creator>shawnherrick</dc:creator>
    <dc:date>2013-02-11T17:19:46Z</dc:date>
    <item>
      <title>Merging multiple featureclasses...</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275903#M9503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was wondering if anyone could help me out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to merge a large amount of line featureclasses - 100+ - and I am getting 'ERROR 999999: Workspace or data source is read only; Failed to execute merge'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I have tried using the Merge tool and using Python and I get the same results with both methods. However, if I try it with only say, 10 or so featureclasses instead of 100+ it works fine. And I don't believe the error message about 'read only' because this happens not matter where I put the folder I am working in; the root of the C-drive, on my desktop, over the network to another drive, etc...I am guessing it has something to do with memory maybe?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a 64-bit system, w/ 4GB of RAM, and way too much hard drive space &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas or suggestions would be much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 19:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275903#M9503</guid>
      <dc:creator>shawnherrick</dc:creator>
      <dc:date>2013-02-07T19:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiple featureclasses...</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275904#M9504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I doubt your are running out of memory, just overflowing the buffer that contains the list of input files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately the input form expands every featureclass to the full path. I am guessing that you have excessively long paths so you will have a buffer length of say 100 x 100 characters = 10,000 chars which is more than a likely 8K block limit in the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This was a problem when we used sys.argv[] to pass parameters, and the arcpy.getParameter is supposed to be unlimited.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You could test this by making your paths much smaller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I always write my scripts to set a folder and a wildcard string, and then assemble the list of files without the full path in the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then set the workspace to the folder to execute the merge. Saves specifying the list in the input form, which is more general, but a nuisance for a special case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found other limits merging rasters, max 20 at a time. In that case I did a staged merge.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First merge all the images in a row, then merge the rows into a block, then merge the blocks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It was easy to do from the names of the image tiles which had a good pattern. Works much faster too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 09:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275904#M9504</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2013-02-09T09:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiple featureclasses...</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275905#M9505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It was definitely the long paths causing this particular problem. As soon as I shortened them, it worked like a charm - that is, I was able to access the data from another path which was much shorter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am not sure what you mean by, "...always write my scripts to set a folder with a wildcard string...". Could you explain this a bit more or give an example? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate the help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 17:19:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275905#M9505</guid>
      <dc:creator>shawnherrick</dc:creator>
      <dc:date>2013-02-11T17:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merging multiple featureclasses...</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275906#M9506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your script parameters ask for a folder or workspace not featureclasses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also ask for a wildcard string, default to "*".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This avoids the long pathnames because you are using a workspace setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It also removes the tedious cut and paste of hundreds of featureclasses (or shapefiles)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the wildcard string can be something like "B*" or even an exact match to limit the list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy,sys
wkspace = sys.argv[1] # or arcpy.GetParameterAsText(0)
wild = sys.argv[2] # or arcpy.GetParameterAsText(1)
arcpy.env.workspace = wkspace
lstFC = arcpy.ListFeatureClasses(wild)
# process the list...

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/merging-multiple-featureclasses/m-p/275906#M9506</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2021-12-11T13:26:39Z</dc:date>
    </item>
  </channel>
</rss>

