Geospatial Modelling Environment

splitdataset (Split Dataset)

Splits a vector dataset into several separate datasets based on an ID value in one of the attribute fields


This command writes the features and attribute table from a vector data source (a shapefile or geodatabase) and creates multiple new vector data sources based on an ID field that contains unique ID’s for each of the new datasets you wish to create. Typically these unique ID values will be integers, although text ID fields are also acceptable.

The new output can be a geodatabase, or even a new feature dataset within a new or existing geodatabase. See the section on ‘Working with geodatabases’ for further details.

GME has been designed to avoid the problem of having to split datasets. Many of the vector commands support the ‘where’ clause, which allows you to process a subset of features. It is highly recommended that you learn about the ‘where’ clause as it is one of the more powerful aspects of GME. See the ‘Strategic commands’ section and the ‘where’ section for further details.


splitdataset(in, uidfield, outws, prefix);

inthe input feature data source
uidfieldthe unique ID field of the input feature data source
outwsthe output workspace, which can either be a folder or a geodatabase (if a geodatabase, it must end with an exclamation mark – see full Help documentation for further details)
prefixthe prefix to use when naming the new feature data sources (the unique value is appended to the prefix)


splitdataset(in=”C:dataroads.shp”, uidfield=”ROADTYPE”, outws=”C:dataroadgdb!bytype!”, prefix=”RDTYPE”);

splitdataset(in=”C:datatelemetry.shp”, uidfield=”ANID”, outws=”C:dataanimals”, prefix=”ANIM”);


Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently 


Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn