Description | Example | Return Message | Group

GIS Import

Import GIS shapefile into current scenario

Syntax

GIS <ScenarioPath> Import "<ShapefilePath>" {ObjectType} [<ImportOptions>]

Description

The Import GIS command allows you to import GIS shapefiles into the current scenario as STK objects.

The "<ShapefilePath>" is the full directory and path to the shapefile you wish to import.

{ObjectType} is the type of object to be created from the data in the shapefile. Valid values for {ObjectType} are Target, Facility, AreaTarget, LineTarget or Auto. If {ObjectType} is Auto, the object type is automatically determined based on the type of data in the shapefile.

The following table describes the <ImportOptions>.

<ImportOptions> Description
NameBy <Name> If you wish to specify how the new STK objects are named, include the NameBy option. The <Name> parameter is completely dependent on the shapefile being imported. It is based on the categories contained in the associated *.dbx file that is also needed to import the shapefile. To use the NameBy option, you must know the categories contained the file before importing the file. If you don't specify NameBy, object names are based on the shapefile NAME field. If a NAME field is not found, the first field with "Name" in the title is used. If no fields have "Name" in their title, the first field is used.
Constellation If this option is included, then a constellation will be created, using the shapefile name, and containing the objects created from the shapefile.
RegionFile "<FilePath>" [NoAreaTarget] If the RegionFile option is entered, then a region file will be created. "<FilePath>" is the name of the created region file. If the NoAreaTarget keyword is included then no objects will be created, only the region file will be created.

Note: This option is only valid if {ObjectType} is AreaTarget.

ReducePoints <Percent> <MinimumPoints> This option will allow the user to specify the percent of points to be used in the shapefile-to-area-target conversion. If the reduction of points results in the number of points being less than the minimum points, a warning will appear on the message viewer. <Percent> must be between 1 and 100; <MinimumPoints> must be greater than 3.

Note: This option is only valid if {ObjectType} is AreaTarget.

ImportTo <CBName> Enter the name of central body that the shapefile should be imported to.

As a precautionary measure, the maximum number of objects that can be read in from a shapefile is specified by the environment variable AGI_GIS_IMPORT_MAX. If the environment variable isn't defined, the default value of 500 is used.

Example

To import the UnitedStates shapefile as an area target:

GIS * Import "C:\GIS\UnitedStates.shp" AreaTarget

To import the MyAtTest2 shapefile as area targets, but only creating a Region File and not creating the AreaTarget objects, and reducing the points used in the AreaTargets:

GIS * Import "C:\STKUser\GISTest\MyAtTest2.shp" AreaTarget RegionFile "C:\GISTest\MyAtTest3.rl" NoAreaTarget ReducePoints 68.0 3

To import the IoSwath shapefile as an area target on Io:

GIS * Import "C:\GIS\IoSwath.shp" AreaTarget ImportTo Io

ReturnMessage

If activated, Connect returns an acknowledgement message.

Group Membership

This command belongs to the following group(s):

GIS

Scenarios

Version

11

STK Programming Interface 11.0.1