| SSIArcPolyClean |
from Spatial Solutions Inc.
available through www.spatial-online.com | |
| ...clean polylines from your ArcView or ArcGIS workstation | ||
SSIArcPolyClean produces clean line shape files from line shape files, describing boundaries of the polygons. It will close gaps and eliminate overshoots and sliver polygons within the user specified tolerances. It will always intersect lines, thus dealing with "spaghetti" digitizing.
Spatial Solutions also has a product to build polygons from these lines, SSIArcPolyBuild, or to both clean and build in one step, SSIArcPoly. If the polygons on the left and the right of each line are required, SSIArcPolyTopo will clean and build polygons, and produce a line file with links to the left and right polygons.
Return to Table of Contents
SSIArcPolyClean, amongst other ArcView and ArcGIS extensions, can be downloaded and
installed for a free trial from
www.spatial-online.com. Choose the installation for either ArcView or ArcGIS.
Double click on the downloaded file, and
an Install Wizard will guide you through the installation.
After installation,
the extension will be available through the usual ArcView extension directory or
will appear on the menu bar of your ArcMap.
Return to Table of Contents
To load the extension,
Download and Installation Instructions
Run from ArcView
After the extension is loaded, when the View Menu is visible, there will be
an ArcPoly option.

Information on the input parameters for SSIArcPolyClean are provided here.
Instructions on running SSIArcPolyClean directly from your Avenue script or calling it from C++ code are provided below.
Return to Table of Contents
After installation, the ArcPoly option will appear next time ArcMap is opened.
Run from ArcGIS

Return to Table of Contents
Beneath the ArcPoly option, the following items will appear:
SSIArcPolyClean Logfile will bring up an information box showing statistics on the last run of SSIArcPolyClean.
About SSIArcPolyClean will bring up the registration screen described below
if you have not purchased the product, followed by the about screen, also described below.
To run SSIArcPolyClean, make all line shape files that you
wish to utilize visible in a view.
Then choose ArcPoly > Clean Lines.
If you are running the software in trial mode, the registration screen described below
will appear first, then the following screen will appear.
Input Parameters
Clean Lines,
SSIArcPolyClean Help will bring up this help screen. It utilizes
EvokeBrowser to evoke the standard browser with
SSIArcPolyClean.htm.
SSIArcPolyClean Help,
About SSIArcPolyClean and
SSIArcPolyClean LogFile.

In the first line of the dialog, Line Files, all line files that were visible in your current view will be listed and selected. The ones selected are highlighted. You may toggle the selection by clicking on the name of the file. If it was selected, it will become de-selected. If it was not selected, it will become selected. You may also add new files to the list by clicking the Browse button. Any (ordinary, Z or M) line files can be used. If you browse for a shape file that is not a line file, an error message will appear. Otherwise the file will be added to the list and will be selected.
Tolerances can be specified by two means. The simplest means is to specify one tolerance. This tolerance, in Map Units is utilized for all cleaning processes. It defaults to 0. All tolerances are specified in Map Units.
Alternately, you can click on the Extended Tolerances button which will bring up the screen described below.
The next three lines on the main window provide default names for the shape files to be built. You may accept the default names or specify new names. The files are:
In the bottom right of the window, there are four more buttons:
When the process is complete, the boundary lines and both the unresolved lines and dangle points will be added to the active view.
The lines will have all of the attributes of the original lines if only one input file has been used. If more than one has been used, then attributes of the lines in the file with the most lines will be maintained. Other lines will not have their original attributes. As well as these, Length will provide the new length of the line in map units.
The results will be a map cleaned to the
requested tolerances. Overshoots, undershoots and sliver polygons
will be handled as below. Note, they are not
removed from the original data, but will not be in the new file.
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
Return to Table of Contents
When you click the Extended Tolerances button in the main dialog it will bring up the screen below.
Extended Tolerances

The first tolerance, representing an area, is defaulted to the square of the default tolerance on the main screen. The remaining four, representing lengths, are defaulted to the default tolerance. The diagram above would be the result of default tolerance being 5 (rather than the 0 shown in the main dialog above). All tolerances are specified in Map Units. The five cleaning tolerances are:
Return to Table of Contents
Included with the SSIArcPolyClean ArcView 3.x installation are two additional scripts.
SSIArcPolyClean.Run takes the program parameters and calls the DLL. SSIArcPolyClean.Sample
provides a sample script that will evoke SSIArcPolyClean.Run. To call SSIArcPolyClean
directly from your Avenue script, open a script and choose Script > Load System Script.
From the dialogue, scroll down to SSIArcPolyClean.Sample, choose it and click OK.
The sample code will be loaded into the open script. Change the names of the
files as indicated in the script. Alternately, choose
SSIArcPolyClean.Run to open the required DLL's directly.
Return to Table of Contents
To run SSIArcPolyClean directly from C++, include the following code:
Any number of line files can be included. To do this, format the first parameter
by concatenating all the files as done above with the two.
pOutputFile, pErrorFile and pDangleFile will contain the names of these files as chosen by the user.
They will not be more than 1000 characters in length.
All tolerance values can be set. In the above code, the default tolerance is 20. The detailed tolerances are as follows:
If the last variable is non-zero, the user will not have the opportunity to modify the parameters before the program runs
unless there are errors in the passed values.
Return to Table of Contents
If the product is still being evaluated, the registration screen below will
appear when the program is run or when the About SSIArcPolyClean button is clicked in ArcView or ArcGIS.
Run from Avenue Script
Run from C++
typedef DWORD (_cdecl *DWLPSSD)(LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR);
HINSTANCE hDll = NULL;
DWLPSSD lpProc = NULL;
hDll = LoadLibrary("c:\\Program Files\\Spatial Online\\SSIArcPolyClean\\SSIArcPolyCleanCI.DLL");
if (hDll) {
lpProc = (DWLPSSD)GetProcAddress(hDll, "SSIArcPolyClean");
} else {
AfxMessageBox("Could not Load Library");
return 0;
}
if (!lpProc) {
AfxMessageBox("GetProcAddress Failed");
FreeLibrary (hDll);
return 0;
}
char * pOutputFile;
pOutputFile = (char *) malloc (1000*sizeof(char));
pOutputFile[0] = 0;
char * pErrorFile;
pErrorFile = (char *) malloc (1000*sizeof(char));
pErrorFile[0] = 0;
char * pDangleFile;
pDangleFile = (char *) malloc (1000*sizeof(char));
pDangleFile[0] = 0;
int nReturn = (*lpProc)("(c:\\projects\\oursoftware\\data\\Simple\\SimpleLines.shp)(c:\\projects\\oursoftware\\data\\Simple\\SimpleLines2.shp))", "20.0",
pOutputFile, pErrorFile, pDangleFile,
"1", "2", "3", "4", "5", "0");
FreeLibrary (hDll);
if (nReturn) AfxMessageBox("Run successful");
else AfxMessageBox("Run failed");
free (pOutputFile);
free (pErrorFile);
free (pDangleFile);
return nReturn;
Registration

Clicking the Purchase SSIArcPolyClean button will evoke your browser with www.spatial-online.com to enable you to purchase single or multiple copies of the product. You can purchase on-line, through the Fax, via Purchase Order or with an invoice. Once you have purchased the product, you will be required to supply your site code(s) (just below the Purchase SSIArcPolyClean button). In return, you will get a product key for each site code. Insert that key into the Text Box next to Product Key and click OK to register the product. Once you have done this, this registration box will no longer appear.
To run the product in trial mode, click the Run in Demo Mode button. Below the button, the remaining trial period is shown.
Clicking the Cancel button will stop the process.
Return to Table of Contents
You may find it useful to first run SSIArcPolyClean with a 0 tolerance.
The error file for lines that do not form part of a polygon can be overlaid with
the original file to see what problems there are. This can help in choosing
a tolerance.
As one further consideration, the cleaning process is compute intensive.
With a tolerance of 0.0, the program runs considerably faster.
In SSIArcPolyClean you can specify a single tolerance to be used for all linear tests.
It's square is used for all area tests. Alternately, the different tolerances can be
individually specified. Click here to find out the details of the tolerances
that can be specified. Return to Table of Contents
Spatial Solutions Inc. offers four products for the cleaning and building of
polygons.
This help is provided from within ArcView by the assistance of a free utility
called EvokeBrowser. This product enables
one to evoke the default browser from within Avenue code.
Click here to download the free
utility EvokeBrowser.
While modifying the registry is dangerous, it is also sometimes necessary.
SSI provides a free utility to access the registry from within Avenue.
Click here to download the free
utility Registry.
Return to Table of Contents
If the product is not registered, the About Box below is shown.
Clicking Register will bring up the Registration Screen which will show the number
of days left in demo mode and provide you with the opportunity to go on-line and purchase. Once the product is registered,
this button will be replaced with notification that the product is registered.
SSIArcPolyClean Copyright
©1997-2002 is a product of Spatial Solutions Inc. All rights reserved.
Warning: This computer program
is protected by copyright law and international treaties. Unauthorized
reproduction of it, or any portion of it, may result in severe civil and
criminal penalties, and will be prosecuted to the maximum extent possible
under the law.
The software comes "as is".
Neither Spatial Solutions Inc. or www.spatial-online.com make any
warranty, representation, promise or guarantee of any kind, either expressed
or implied, statutory or otherwise, including, but not limited to the implied
warranties of quality, performance, non-infringement, merchantability and
fitness for a particular purpose. The entire risk as to the quality and
performance of the software is with the user. We do not warrant that the
functions contained in the software will meet your requirements or that
the operation of the software will be uninterrupted or error free.
Frequently Asked Questions
The critical distance for a map is the smallest distance between
two distinct objects. To have the objects remain distinct, even if there
is a problem with the polygon formation at that point, the tolerance
should be less than half the critical distance.
There are no software limitations.
SSIArcPolyClean was built to handle large data sets efficiently.
The cleaning time tends to be proportional to the number of lines that must
be cleaned.
All legend can be customized for both ArcView or ArcGis.
Other SSI Products
About SSIArcPolyClean
