| OverlapPoly |
from Spatial Development
available through www.spatial-online.com | |
| ...determine the containing polygon for each line or point in your shape file | ||
OverlapPoly determines the containing polygon(s) for each line in a shape file. It builds a link table containing an entry for each point or portion of a line in a polygon. As well as identifying the feature and the polygon, it contains the type of overlap (boundary or interior), and for lines, the length of the overlap.
OverlapPoly compliments PointPoly and LinePoly which update the point and line database with information from the containing polygon.
Return to Table of Contents
OverlapPoly, amongst other ArcView extensions, can be downloaded and
installed for a free trial from
www.spatial-online.com. The file that is
downloaded is called OverlapPoly.exe. Double click on the file, and
an Install Wizard will guide you through the installation.
After installation,
the extension will be available through the usual ArcView extension directory.
To load the extension,
When the required line or point and polygon files are visible, select OverlapPoly
to run OverlapPoly.
Instructions on running OverlapPoly directly from your
Avenue script
or calling it from C++ code are provided below.
Return to Table of Contents
To run OverlapPoly from ArcView, make all line or point and polygon shape files that you
are interested in visible in a view.
Then choose Polygon > OverlapPoly.
If the product is still being evaluated, the registration screen below will
appear next.
Clicking the Purchase OverlapPoly button will evoke your browser with
www.spatial-online.com
to enable you to purchase the product on-line, through the Fax or via Purchase
Order. When you purchase the product, you will be required to supply your site
code (just below the Purchase button). In return, you will get a product key.
Insert that key into the Edit 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.
The OverlapPoly process will be evoked. It will provide the dialog below.
The line and point files in your current view will be listed in the top combo box beside
Point/Line File with the first selected.
The polygon files in your current view will be listed in the next combo box beside Polygon File with the first selected.
A default table name will be in the box labeled Table.
In the leftmost column below, default names for the attributes in the resulting table
are provided.
Beside the boxes to receive the line or point key and the polygon key, there are combo
boxes containing the attributes of the line or point, and polygon file.
Note: The text at the bottom of the box, "Click OK when parameters selected" in the diagram
below, supplies instructions and error messages. If the process does not seem to
be proceeding as expected, check the text and it will explain why.
Before clicking OK to run the process, the following must be specified:
Of the three remaining buttons, Help will evoke the browser with this
help, Cancel will cancel the process, and OK will start the
process.
After clicking the OK button, check the line of text at the bottom of
the screen. If there is a problem, it will be identified there.
When the process is complete, the link table will be brought up in ArcView.
It will be linked to the point/line and polygon tables.
Return to Table of Contents
Included with the OverlapPoly installation are two additional scripts.
OverlapPoly.Run takes four or five parameters and calls the DLL.
OverlapPoly.Sample
provides a sample script that will evoke OverlapPoly.Run.
To call OverlapPoly
directly from your Avenue script, open a script and choose Script > Load System Script.
From the dialogue, scroll down to OverlapPoly.Sample, choose it and click OK.
The sample code will be loaded into the open script. The meaning and format
of the parameters is described in the script.
Alternately, choose
OverlapPoly.Run to get details on running the required DLL's directly.
Note there is an additional boolean parameter.
If it is set true, the program will run without
user interaction. In this mode, the dialog will be presented to monitor progress,
but the user will not be able to modify anything unless the parameters will not
work, such as a file not being available.
Return to Table of Contents
To run OverlapPoly directly from C++, ensure that ssi08.dll and EvokeBrowser.dll are
within your path and include the following code:
The middle 4 parameters are used to return the values actually chosen by the user. The first three should thus
be allocated sufficient room to hold the longest path length. The fourth needs to hold 6 attributes plus 7 punctuation
marks.
The values of the parameters can be set to blank or given values.
The format for the shape files, that
is pzFeatureFile and pzPolygonFile, is
Note the first parameter specifies the placement of the help file, and there is an additional final boolean parameter.
If it is set true, the program will run without
user interaction. In this mode, the dialog will be presented to monitor progress,
but the user will not be able to modify anything unless the parameters will not
work, such as a file not being available.
Return to Table of Contents
Return to Table of Contents
Spatial Development offers other products for determining overlap with
polygons.
Return to Table of Contents
OverlapPoly Copyright
©1999 is a product of Spatial Development. 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 Development nor 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.
Installation Instructions
After the extension is loaded, when the View Menu is visible, there will be
a Polygon option. Beneath this button will be items
OverlapPoly, and
The latter will bring up this help screen. It utilizes
EvokeBrowser to evoke the standard browser with
OverlapPoly.htm which will reside under the Help subdirectory of your ArcView
installation.
OverlapPoly Help.
Run from ArcView
Run from Avenue Script
Run from C++
HINSTANCE hDllEvokeBrowser = NULL;
hDllEvokeBrowser = LoadLibrary("c:\\Esri\\Av_gis30\\Arcview\\Bin32\\EvokeBrowser.DLL");
if (!hDllEvokeBrowser) {
AfxMessageBox("Could not Load EvokeBrowser");
return 0;
}
typedef DWORD (CALLBACK *DWLPSSD)(LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, BOOL);
HINSTANCE hDll = NULL;
DWLPSSD lpProc = NULL;
hDll = LoadLibrary("c:\\Esri\\Av_gis30\\Arcview\\Bin32\\OverlapPoly.DLL");
if (hDll) {
lpProc = (DWLPSSD)GetProcAddress(hDll, "OverlapPoly");
} else {
AfxMessageBox("Could not Load Library");
return 0;
}
if (!lpProc) {
AfxMessageBox("GetProcAddress Failed");
FreeLibrary (hDll);
return 0;
}
char * pzFeatureFile[_MAX_PATH];
char * pzPolygonFile[_MAX_PATH];
char * pzTable[_MAX_PATH];
char * pzAttributes[6*MaxAttributeNameLength+7];
// Set the file and attribute values
int nReturn = (*lpProc)("c:\Esri\gis_30\ArcView\Help\OverlapPoly.htm",
pzFeatureFile,
pzPolygonFile,
pzTable,
pzAttributes,
false);
FreeLibrary (hDll);
if (nReturn) AfxMessageBox("Run successful");
else AfxMessageBox("Run failed");
return nReturn;
(path\\file1.shp)[(path\\file2.shp)...]
Zero or any number can be specified.
All specified will be in the combo
box and the first will be the default selection. The format for the database table to be produced, that is pzTable, is
(path\\file1.dbf)[(path\\file2.dbf)...]
Zero or any number can be specified.
All specified will be in the combo box and the first will be the default selection. If none are specified, a default table
name is derived.
The format for the attributes, that is pzAttributes, is (Feature|FeatureAtt|Polygon|PolygonAtt|Type|Length)
Zero or any number can be specified. The meaning of the attribute is determined by its position. Any value that
is not specified will be defaulted.
Frequently Asked Questions
Look at the message along the bottom of the screen and it will
tell you why.
That may be the problem. Pointpoly is run from a DLL, and
sometimes ArcView grabs hold of the file and will not let other excutables write to it. Please make
sure that you are not editing the point file with edits not yet saved. If that does not work, please
close the table editing screen, and make sure in a shared environment that other people are not editing
the table.
Many computers running ArcView have the Microsoft Jet Database
already installed. For this reason, we do not include it in the product installation as it significantly
increases the size of the download file. Click here
to download and install Jet Database, after which you will not see this message again.
Other Spatial Development Products
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 a free
copy EvokeBrowser.
About OverlapPoly