Alternative to dissolve.

4642
19
02-22-2011 11:12 AM
OvidioRivero
New Contributor III
I have been trying to dissolve a very large polygon feature class.  This dataset is composed of about 3 million polygons that were generated by buffering points.   All attempts in arcmap have been unsuccesful.

I am trying to see if I can accomplish the same operation in Oracle.  Has anyone in this forum been able to do that?

My basic query I am trying to use now is very slow but it seems to produce the right number of records when I run it on a small dataset but it is slower than actually running the dissolve tool.  It would seem that dissolving directly on the database should be faster but it is not. This is my currect query.

select TRANSTECH,MAXADDOWN,MAXADUP,HOCONUM,HOCONAME,SDO_AGGR_UNION(
  MDSYS.SDOAGGRTYPE(c.shape, 0.005))SHAPE
   FROM ADDRESS_EXTRACT_FC_BUFFER_RI c
  group by TRANSTECH,MAXADDOWN,MAXADUP,HOCONUM,HOCONAME;


Any help will be greatly appreciated,
0 Kudos
19 Replies
FelixMuyoba
New Contributor
orivero,
not sure whether your problem was dissolved but what one can normally do is to add a dummy field (preferrably short integer which will automatically be populated with zeros) and dissolve based on that dummy field. it should work.

felix
0 Kudos
OvidioRivero
New Contributor III
Thank you for the tip but that is not what I want to do. I want to dissolve based on the five fields in the query above.  If I used a dummy field I would reduce the data to one polygon.

Thanks,

Ovidio
0 Kudos
VinceAngelo
Esri Esteemed Contributor
How many vertices were generated for each polygon?

How many features (min/max/mean) are unioned by the compound key
(and how many vertices exist in the unioned shapes)?  Is this simply
a too-many-vertices issue?

- V
0 Kudos
OvidioRivero
New Contributor III
With the dissolve tool it looks like the number of features is the problem, not the vertices per feature.
The polygons are 37 vertices each.  They were generated by buffering points by 500 feet.
I export up to about 200,000 features and I can dissolve them. Between 200,000 and 500,000 it works part of the time beyond 500,000 it runs for 10-17 hours and then it crashes.

I will check the number of points in the sample output dataset and put them here. It will take me some time because I just deleted my test table.
0 Kudos
VinceAngelo
Esri Esteemed Contributor
I was afraid there would be 361 vertices per circle.  Should the circles with similar attributes
overlap, or are you making multi-part features? 

You can estimate the worst-case vertex count by doing a:

CREATE TABLE tmp_union_driver AS
SELECT transtech,maxaddown,maxadup,hoconum,hoconame,count(*) num_rows
FROM address_extract_fc_buffer_ri
GROUP BY transtech,maxaddown,maxadup,hoconum,hoconame
ORDER BY transtech,maxaddown,maxadup,hoconum,hoconame;

then

SELECT min(num_rows)*37 min_verts, avg(num_rows)*37 avg_verts, max(num_rows)*37 max_verts
FROM tmp_union_driver;

- V
0 Kudos
OvidioRivero
New Contributor III
Vince,

I get this from your query

MIN_VERTS              AVG_VERTS              MAX_VERTS             
---------------------- ---------------------- ----------------------
37                     31228                            121360                

With my query I was expecting to get multipart features and later I was going to make them single part.  The user I am doing this for wanted both.

121360  is a lot of vertices. You think that dissolve  crashes because the output has too many vertices?  If that is the case; how can I limit that?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
120k vertices is a lot, but it's smaller than Russia in most 1:1m COUNTRIES tables.

I wonder if you can't try the processing the other direction, and union the points
into multi-part shapes, then buffer the points.

- V
0 Kudos
OvidioRivero
New Contributor III
I checked my layer in Oracle. Four polygons, 3 polygons had 37 vertices, 1 had 18344. Before dissolving using my query I had 3336.
0 Kudos
OvidioRivero
New Contributor III
I can try what you suggest.  Let me see if I understood it right.

1) Union the points based on the attributes. That would make them multipart.
2) Buffer the result?

That would be using the tools in ArcGIS not a sql query?
0 Kudos