ServiceAreaResult

概要

An object containing the results of a service area analysis that can be used to access outputs and solver messages.

ディスカッション

Instances of this class cannot be created directly. Instead, they are returned by the solve method of the ServiceArea class.

プロパティ

プロパティ説明データ タイプ
isPartialSolution
(読み取り専用)

Returns True if the solver produced a partial solution, meaning that not all inputs were included in the results. This can occur if one of the inputs is unlocated and the solver class's ignoreInvalidLocations property is set to True.

Boolean
solveSucceeded
(読み取り専用)

Returns True if the solve was successful.

Boolean

手法の概要

手法説明
count (output_type)

Returns the number of rows for an output type.

export (output_type, output_features)

The output features will be created in the spatial reference of the network dataset used for the analysis. If the arcpy.env.outputCoordinateSystem environment is set, the output features will be created with the specified coordinate system instead.

Exports the analysis results to a feature class or table.

fieldNames (output_type)

Returns a list of field names supported by a specified output type.

saveAsLayerFile (file_name)

Save the analysis result and settings to a layer file. The layer file can be opened in ArcGIS Desktop or ArcGIS Pro as a record of the analysis settings or to visualize the results.

The method returns a RuntimeError exception if the allowSaveLayerFile property on the solver object is set to False.

searchCursor (output_type, field_names, {where_clause})

Establishes a search cursor on the specified output type. This cursor can be used to read rows directly from the output.

solverMessages (severity)

Get error, warning, and informational messages returned by the solver.

手法

count (output_type)
パラメーター説明データ タイプ
output_type

The type of output features to count.

The parameter should be set using the ServiceAreaOutputDataType enumeration.

Object
戻り値
データ タイプ説明
Integer

The number of rows.

Raises no exception.

export (output_type, output_features)
パラメーター説明データ タイプ
output_type

The type of output to export.

The parameter should be set using the ServiceAreaOutputDataType enumeration.

Object
output_features

The catalog path to the output feature class or table that will contain the exported features.

String
fieldNames (output_type)
パラメーター説明データ タイプ
output_type

The type of output for which to return a list of field names.

The parameter should be set using the ServiceAreaOutputDataType enumeration.

Object
戻り値
データ タイプ説明
String

A list of field names supported by the specified output type.

saveAsLayerFile (file_name)
パラメーター説明データ タイプ
file_name

The catalog path of the output layer file (.lyr) to write.

String
searchCursor (output_type, field_names, {where_clause})
パラメーター説明データ タイプ
output_type

The type of output to read.

The parameter should be set using the ServiceAreaOutputDataType enumeration.

Object
field_names
[field_names,...]

A list of field names of the output type whose values the cursor will return. You can get the names of the fields that are supported by an output type using the fieldNames method. In addition to regular fields, you can also access the geometry of the output using one of the following geometry tokens:

  • SHAPE@XYフィーチャの重心を表す X 座標と Y 座標の組み合わせ
  • SHAPE@XYZフィーチャの重心を表す XYZ 座標の組み合わせ このトークンは、ジオメトリが Z 対応である場合にのみサポートされます。
  • SHAPE@JSON ジオメトリを表す Esri JSON 文字列
  • SHAPE@WKBOGC ジオメトリの WKB (Well-Known Binary) 表現。ジオメトリ値の汎用的な表現が、連続的なバイト ストリームとして提供されます。
  • SHAPE@WKTOGC ジオメトリの WKT (Well-Known Text) 表現。ジオメトリ値の汎用的な表現が、テキスト文字列として提供されます。
  • SHAPE@フィーチャのジオメトリ オブジェクト

The SHAPE@XY and SHAPE@XYZ tokens are only supported for point-based output types.

String
where_clause

返されるレコードを制限するオプションの条件式。 WHERE 句と SQL ステートメントの詳細については、クエリ式で使用されるエレメントの SQL リファレンスをご参照ください。

(デフォルト値は次のとおりです None)

String
戻り値
データ タイプ説明
Object

A SolverResultSearchCursor object that reads rows from the output.

solverMessages (severity)
パラメーター説明データ タイプ
severity

The type of messages to be returned.

The parameter should be specified using the MessageSeverity enumeration.

Object
戻り値
データ タイプ説明
List

The messages are returned as a list of lists. The inner list contains two values; the first is a number representing the message code, and the second value is the message text.

An example of a list of messages returned from a failed origin destination cost matrix analysis.

[[-2147200995, '0 location(s) in "Destinations" are valid.  Need at least 1 valid location(s).'],
 [30024, 'Solve returned a failure.'],
 [-2147200995, 'Insufficient number of valid locations in "Origins" or "Destinations".']]