points to polygons

2144
32
10-12-2012 12:29 PM
SiranErysian
New Contributor
I???m trying to delineate polygons along a river channel delineated by points representing different n values. I was wondering if anyone knew of a tool that would allow me to create polygons based on the same input value instead of what I am doing now which is connecting the dots. I tried Thiessen polygons but it gave me shapes that went way outside the boundaries of the points. Anyone know of such a function? See attachment for screen capture.
0 Kudos
32 Replies
T__WayneWhitley
Frequent Contributor
Okay, here's the deal -- I haven't heard back from you and I cannot use your incomplete attachment.  But what I'll do is send you back a more automated 'package'....unzip the file attachment provided (making sure all files go to the same root location you choose; it is 'relative pathed' so should still find file refs) and run the script tool (open the toolbox and double-click the script tool 'linref' inside...

It is now geared to run off of your shapefile (the one you sent, also included on the provided attachment in case yours has changed).
When the tool opens, insert the shapefile - you'll see it alongside as in the illustration provided (also attached).

Provided you have ArcGIS Desktop 10 license (Advanced), then it should run in about 20 sec (as tested on my machine) to overwrite all you see contained in the file gdb.  I left the test run feature classes in the gdb...but when you run it, it should overwrite everything.  No 'addmessages' statements were added to the script, so it's very plain.

Good luck - oh, one more thing, for anyone interested, to 'adapt' this for a script tool, I did nothing more than change a few lines and create a shapefile input parameter in creating a toolbox script tool within Catalog...below are the critical line changes at the beginning of the script:

import arcpy, sys, os
scriptPath = sys.argv(0)
origData = arcpy.GetParameterAsText(0)
arcpy.env.workspace = scriptPath.replace(scriptPath.split(os.sep)[-1], 'stage.gdb')

That's all!  Enjoy.  Make sure the errors get posted next time, if there are any.

-Wayne
0 Kudos
SiranErysian
New Contributor
The tool ran fine I think because it created the routes, outer poly, channel and break polys. However, attached is a list of errors that came up after the tool completed. I will still have to manually add the n-values field to those polygons to see where they change. This information is in the point files. Aside from that, I think this should work for my purposes. I'm not sure if correcting the errors will give us those values I still need but I can enter them in a new field in the polygon feature classes.
0 Kudos
T__WayneWhitley
Frequent Contributor
Right, so you must not be using ArcInfo (the Advanced license) - there are certain tools you must have the advanced license to run, Feature To Polygon is one of them.


EDIT:  If you cannot borrow an ArcInfo license or you do not have time to study/modify the Python code to work around the licensing disadvantage, I suggest you download/install a free utility such as ET GeoWizards at ian-ko.com.  The Build Polygon Wizard is completely free and works well.
0 Kudos