Tag Info

Hot answers tagged

15

I have found that not all tools work when your geoprocessing environment is set to run in the background. I believe that Dissolve may be one of these. Change you GP environment to Disable Background Processing and then give it a try. I have not tested this but may be worth a try


13

ST_MemUnion() will run a naive and slow memory friendly process. You can try that, if your problem is small enough, it might finish in a reasonable amount of time. You can also just break your problem into halves, then run the halves together. Since the resultants will have a lot fewer points than the inputs you might be able to fit the whole problem into ...


13

ST_Union would work, but your line work is almost assuredly not clean. So the boundaries of your little thingies don't all perfectly like up. You can gently snap them to a grid to try and increase the odds that vertexes line up, but I bet that you'll still have a few cases that don't work. Either they will be beyond tolerance or, more likely, there will be ...


12

You can do this with the Summary Statistics (Analysis) tool. The case field parameter is what you use to "dissolve". From the above link: case_field [case_field,...] (Optional) The fields in the Input Table used to calculate statistics separately for each unique attribute value (or combination of attribute values when multiple fields are specified).


10

ArcGIS is utterly woeful for dissolving/merging. We had to do a buffer/merge for 3 million points recently and soon gave up on using ArcGIS -- their help desk didn't have much clue either. Postgres did it in less than an hour using the st_union function. see http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html


10

I might be missing something, but won't the basic Dissolve tool (somewhere in the data management toolbox) do this for you? No need to mess with any code as in artwork21's answer. Just open the dissolve tool, select your feature class, do not select any field to dissolve on, and then uncheck 'Create Multi-part poygons' otherwise all your poly's will be ...


8

@Tom Parker - MWrenn is correct. You have the option of selecting an attibute to dissolve on.(this will do an attribute dissolve) or no attribute (this will do a spatial dissolve). choose the statistics and any attributes you want to carry over. (this is not going to quite work like you want). Prior to doing the dissolve. create a new field and ...


8

There are a few reasons why this isn't working for you: Dissolve only works with a single input. You need to use a tool like Merge in order to dissolve two polygons. ArcGIS geoprocessing tools like Dissolve can run using arcpy geometries as inputs. However, your code does not pass arcpy geometry objects to the dissolve tool, it is entire layers/shapefiles. ...


7

Try the Dissolve tool. From the help: Use the Dissolve tool when you want to aggregate features based on a specified attribute or attributes. For example, you could take a feature class containing sales data collected on a county-by-county basis and use Dissolve to create a feature class containing contiguous sales regions based on the name of the ...


7

If you simply want to dissolve the edges and are happy with having one large multipolygon feature of all buildings, you can simply use the fTools "Dissolve" tool ("Vector/Geoprocessing/Dissolve"). If you want to keep the attributes (in the case of OS Vector that would only be the ID, which seems to be rather arbitrary), you can split the dissolved vector ...


6

Use the looping and variable value as shown in Aragon's answer with the FID field (this is the zero-based object ID field for shapefiles) as the select field as shown in L_Holcombe's answer to generate the where clause, and all should be good. To program in the total number of features use the Get Count tool and divide by 10 assigned to the variable. Will ...


6

Your problem is likely because of what you have included in the group by field. ST_UNION is an aggregate function, meaning that it is dissolving based on what you specify as the GROUP parameter. Here is what you entered: SELECT c.fid, ST_Union(c.boundaryshape) FROM c Group by c.fid,c.boundaryshape; According to this, you are grouping by your fid, which ...


5

This sounds like you need to look at the Summary Statistics tool which I find to be a bit of a Swiss Army Knife in that it comes with ArcView and can often be used in place of Frequency (that needs ArcInfo) and PULLITEMS (that needs ArcInfo Workstation:-) to reorder fields.


5

You can always use an open-source tool like QGIS to open your shapefile and merge features using the built-in "merge selected features" tool (just select features, click merge, select attributes to inherit to the new merged feature, done). This of course doesn't make much sense if we're talking about hundreds or thousands of merges. I myself was wondering ...


5

if you´re looking for something like this(labels denote area in sqkm): You can just intersect the Fishnet with the Polygon Layer.


5

The Dissolve tool can create a Godzilla by combining smaller (but still fairly large) features into one feature. This is known as the combinatorial problem. The Dissolve tool has logic that prevents it from creating a Godzilla (you’ll receive the warning code 000059) but this logic is based on the machine’s available memory at the time Dissolve is run. So, ...


4

You can create a model within Model Builder and export out the script, then copy and paste that script to a UIButtonControl within ArcMap vba. See script example below. Private Sub Dissolve_Click() ' Create the Geoprocessor object set gp = CreateObject("esriGeoprocessing.GPDispatch.1") ' Load required toolboxes... gp.AddToolbox ...


4

Is your PostGIS compiled against GEOS 3.1.0+? For that version, a much faster cascaded union was implemented, but if not found will use the older code which is orders of magnitude slower. Update: it looks as if your PostGIS is using the cascaded union approach, but the memory starvation is real. I'd try increasing the available memory to your Postgres ...


4

fTools is a python plugin for QGIS that can do it and you could hack it into fitting your needs. An easier alternative is the QGIS GRASS plugin, which includes v.dissolve, but then you're easier off scripting with GRASS directly. If you're not familiar with PostGIS, this may be a faster approach.


4

You need to create an empty list, then append the features the new empty list. Rather than building the output location within the method you can create it in advance, and store it as a variable. Then you can use that same variable to append to the list. output_workspace = "C:/GIS Home/project_1" dissolveList = [] #empty list fcList = ...


4

You can do this in a few steps in ArcGIS. Perform a Select By Attribute to select all features with a specific land use type (e.g. residential). Perform a Select By Location on the previous selection with a 100m tolerance specified. Run the Dissolve tool on the final selection. This can be done manually if you only have a few land use types, or you could ...


4

Consider the following workflow: Add Field to polygon feature class Calculate field (See attached Code Block) Dissolve based on your new reclassified field values (i.e. 1 or 2) Hopefully this simplified approach, or a variation of it, will work for you.


4

You can use enumarete function in python. myList = [] n = 99 for i, v in enumarete(myList): if i == n: print v 'first 100 item' #append your list if i > n and i < (n+2)*2: print v Or you can use this script from SO: def split_list(alist, wanted_parts=1): length = len(alist) return [ alist[i*length // wanted_parts: ...


4

I ended up making the function suggested below. In part inspired by inputs from other contributors on this question. The object handling is coarse and it creates a lot of temporary files. I am sure this function could be made a lot better. If properly polished it could be a decent preliminary fix for the dissolve bug by ESRI. I am making it a community ...


4

The syntax is Dissolve_management (in_features, out_feature_class, {dissolve_field}, {statistics_fields}, {multi_part}, {unsplit_lines}) You need to specify the dissolve_field as the third parameter - here you've left it blank.


4

You can also try SQLite/Spatialite (comes with QGIS) or PostgreSQL/PostGIS where dissolve "a la ArcGIS" is done by the combination of the ST_Union() function on the geometry and a group by on the attribute to be summarized. Something like this: SELECT ST_Union(the_geom) INTO dissolved_polygons FROM your_table GROUP BY your_attribute;


4

Back in Arc/Info days (now called Workstation), INFO allowed you to "overdefine" aliases across multiple fields. If they weren't neighboring, then you'd need to generate a frequency table across the multiple fields, join to that table, and use the unique ID for your dissolve. The old way is still available, but the Dissolve tool under Geoprocessing (I'm ...


4

This is a pure Javascript api that performs Dissolve, also commonly called Union, and other spatial operations. It is based on Java Topology Suite. jsts


4

You could create a new attribute called "dissolve", and calculate it to be whatever unique value you wish to use for the dissolve. Eg, "for some specific countries" you would calculate dissolve to be "Country + State", while for the other countries you would calculate dissolve to be simply "Country".


3

It looks as though you are using the USGDR data (BLM) BTW: Dissolve is what you would use instead of merge. the python part is not my thing. The dissolve command with the first division identifier column as the dissolve field should get you what you want First you want to create a new field to hold the qtr section value for each qtr qtr by using ... right ...



Only top voted, non community-wiki answers of a minimum length are eligible