Tag Info

Hot answers tagged

18

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


18

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 ...


14

I believe the tool you are looking for is the Dissolve tool. You can specify which field you want to dissolve your feature on, so in your case you would specify "district" and it will dissolve all of your polygons based on the value in that field.


14

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).


14

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 ...


11

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 ...


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

@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 ...


9

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. ...


9

A Dissolve operation will usually reduce the number of features, arcs and nodes within a layer, particularly for layers with significant lengths of shared boundaries. Since the time spent during a Buffering operation is highly dependent on the number of nodes, pre-processing with Dissolve may significantly reduce the running time (and memory requirements). ...


9

If memory use is your prime concern, then lots of little (low vertex count) features is probably going to be more to your liking than a few very large (high vertex count) features. But you may find that "too many features" may eventually overwhelm even "too many vertices" for processing speed. If you think about how the algorithms must be structured to ...


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 ...


7

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 ...


7

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, ...


6

QGIS has a tool to dissolve polygons. Look into Vector -> GeoProcessingTools->Dissolve


6

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 a Basic (formerly called) ArcView level license and can often be used in place of Frequency (that needs Advanced/ArcInfo) and PULLITEMS (that needs ArcInfo Workstation:-) to reorder fields.


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 ...


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

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 ...


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

There is a new QGIS plugin called dissolve with stats, which provides the functionality you are looking for.


5

In this case, it looks like you need to help the dissolve tool along by fixing the topology first. Here's how you can do this in GRASS. When you load the shapefile, this is how GRASS sees it: Each cross marks an area. You can see that there are some crosses on the boundary lines: These are the sliver polygons caused by the slight offset between the ...


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

Try this: Run Repair Geometry 1st and then run Dissolve.


4

I suspect Dissolve has difficulty intersecting all the circular arc segments that get created by the buffer operation. Therefore, try buffering with the dissolvetype = NONE, then run Densify to convert all the circular arcs to linear segments before running the Dissolve operation. I'd be interested in seeing performance comparison of ArcGIS 10.0 for ...


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

ST_Collect function is an "aggregate" function in the terminology of PostgreSQL "SELECT ST_Collect(GEOM) FROM GEOMTABLE GROUP BY ATTRCOLUMN" will return a separate GEOMETRYCOLLECTION for each distinct value of ATTRCOLUM http://postgis.net/docs/ST_Collect.html Note: ST_Collect is much faster than ST_Union


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 = ...



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