GME

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

Description

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.

Syntax

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)

Example

splitdataset(in="C:\data\roads.shp", uidfield="ROADTYPE", outws="C:\data\roadgdb!bytype!", prefix="RDTYPE");

splitdataset(in="C:\data\telemetry.shp", uidfield="ANID", outws="C:\data\animals", prefix="ANIM");


Messages

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

An apology for failing to respond to correspondence in recent months  Read more...

Tips on how to use this interface efficiently  Read more...

Sign up for the newsletter if you wish to receive notification of updates, new functionality, bug fixes, and other related news

Links

Open Source GIS

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