GeoData services
A geodata service represents a connection to a geodatabase and is designed for distributed data management.
Use a geodata service to:
- Get information about the geodatabase
- Execute tabular and feature queries
- Extract and download data
- Replicate data
WSDL syntax
http://<host name>:<port number>/<arcgis instance>/services/<ServiceName>/GeoDataServer?wsdl
Working with geodata services
Getting information about the geodatabase
The following methods are provided to get information about the geodatabase referenced by the geodata service:
- GetDataElements: With this method you can get the list of feature classes, tables, relationship classes or other data elements in the geodatabase.
- GetDefaultWorkingVersion: If the geodatabase is an ArcSDE geodatabase, this method returns the version that is being accessed by the service.
- GetVersions: If the geodatabase is an ArcSDE geodatabase, this method returns the versions available in the geodatabase.
- GetWrappedWorkspaceType: Returns the type of geodatabase which can be an ArcSDE or file geodatabase.
Executing tabular and feature queries
Use TableSearch to query tables and feature classes in the geodatabase. The results of a query are returned in groups as defined by the GetMaxRecordCount. For example, if the query returns 1000 rows and the maximum record count restriction is 100, the first 100 rows from the query are returned. Calling GetNextResultPortion returns the next 100 rows. To get all of the rows, continue to call GetNextResultPortion until all rows have been returned.
Extracting and downloading data
Data extraction involves copying a portion of some data in a geodatabase. When extracting data, you first define the list of feature classes and tables to extract. To make sure the geodatabase data structures are extracted properly, call ExpandReplicaDatasets on the list. For example, if the feature class you want to extract is part of a topology, there is a dependency between this feature class and the others in the topology. To make sure the topology is properly extracted, you can call ExpandReplicaDatasets and it will automatically expand the list of datasets to extract to include the other topology feature classes.
With the list of feature classes and tables to extract, you can then apply spatial and attribute filters. This defines which rows within the feature classes and tables to extract.
The ExtractData method is then used to extract the data. Data extracted from other geodatabases or geodata services can also be imported using the ImportData method.
Replicating data
Geodatabase replication is the process of distributing data across two or more geodatabases so that they can periodically synchronize changes. To create a replica, use the CreateReplica method.
Once the replica is created, you can make changes to the replicated data in the geodatabases and synchronize changes. When changes are ready to be synchronized, call ExportReplicaDataChanges to export them to a transport file. You can then copy the file to the relative replica's geodatabase or geodata service location and import the changes using ImportReplicaDataChanges. When the changes are successfully imported, use ExportAcknowledgement to create an acknowledgement file. This file can then be sent back to the sender and imported using ImportAcknowledgement. Importing the acknowledgement validates that the changes that were sent earlier have been received and therefore don't need to be re-sent the next time changes are exported.
Methods are also available to apply schema changes across replica geodatabases. Here a schema change, such as adding a field, can be made on a replicated feature class or table and applied to the corresponding feature class or table in the relative replica geodatabase. To do this, first make the schema change and then call ExportReplicaSchema. This creates a file with the schema of the feature classes and tables in the replica. Next, copy the file to the relative replica's geodatabase or geodata service location and call CompareReplicaSchema. This compares the schema described in the file to the schema in the relative replica's geodatabase and creates a schema differences file. The schema differences file can then be imported to apply any schema differences using ImportReplicaSchemaChanges.
There are also methods to manage replicas. Use GetReplicas to get the list of the replicas in the geodatabase and UnregisterReplica to remove a replica that you no longer use.
Methods
Proxy method |
Description |
---|---|
Compares the schema of a replica with that of its relative, and returns a schema changes XML document. | |
Creates child replica containing a subset of data from a specified set of datasets. | |
Expands a set of replica datasets taking into consideration geodatabase constructs (topologies, relationship classes, etc.). | |
Export an acknowledgement message for a replica. | |
Exports data changes for a replica. | |
Exports the schema of a replica to an XML document. | |
Extract a set of data within a geodatabase. | |
Returns all the data elements in the workspace. | |
Returns the default working version for all operations/methods. | |
Returns the maximum number of records to be returned by a search. | |
Gets the next portion of the results. | |
Returns information on a specific replica in the geodatabase. | |
Returns information on the replicas in the geodatabase. | |
Returns information on the versions in the geodatabase. | |
Returns the type of the geodatabase the geodata service operates on. | |
Import an acknowledgement message for a replica. | |
Imports data into the workspace. | |
Import the data changes for a replica. | |
Updates the schema of the replica with the changes in an schema changes XML document. | |
Re-exports data changes for a replica. | |
Returns the records satisfying the specified query. | |
Removes a replica from the geodatabase. |