split by attribute

8431
11
11-04-2011 03:29 AM
TilottamaGhosh
New Contributor III
Hi,

Is there a way of splitting a shapefile (point, line or polygon) on the basis of a particular field in the attribute table? I have a point shapefile which shows Points of Interests on the basis of different categories. I want to split the shapefile on the basis of those categories, so that I get separate point shapefile for each of those categories. Is there an inbuilt tool in ArcGIS 10 for that? The split tool won't help as it does it on the basis of another feature class, and that is not what I am looking for. I found this tool through my search online http://www.umesc.usgs.gov/management/dss/split_by_attribute_tool.html, but couldn't make it work. I am looking for a tool like this. Any kind of help or suggestion will be greatly appreciated.

Thanks in advance,

Tilo
0 Kudos
11 Replies
AndreasElmelund_Hass
New Contributor

Hi Dan. Thank you for a great tool. I've used it a couple of times before, but now it runs into a problem that i have difficulties with solving.

If you have time and would like to help I've pasted the error message below.

GST_LINTXT is being queried for unique values.

Failed script SplitLayerByAttributes...

Traceback (most recent call last):

  File "M:\HAL\TeamNIS\Arbejdsdata\ANDEH\CoastlineL\Tools\SplitLayerByAttributes.py", line 121, in <module>

    aString = aString + " " + str(aVal)

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 7: ordinal not in range(128)

Failed to execute (Split Layer By Attributes).

Failed at Tue Jul 21 15:30:10 2015 (Elapsed Time: 0,95 seconds)

Is it my attributes in the column GST_LINTXT that might contain values inapplicable for this tool. The format is string.

Best regards

0 Kudos
DanPatterson_Retired
MVP Emeritus

Unicode characters...not fixed yet

0 Kudos